Method for generating grayscale images as input to convolutional neural networks for bearing fault detection
By calculating the moving average value and second-order difference of the bearing one-dimensional vibration signal, a grayscale diagram is generated as the input of the convolutional neural network, which solves the problem of information loss, calculation of complex and multi-dimensional signal representation in the prior art, and realizes efficient and accurate bearing fault detection.
Patent Information
- Application Number
- CN202411210609.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-08-30
AI Technical Summary
Existing bearing fault detection methods may lose original information when processing one-dimensional vibration signals, have high computational complexity, and are difficult to effectively represent multi-dimensional signals.
By calculating the moving average and second-order difference of the bearing one-dimensional vibration signal, a list of numerical pairs is constructed, and a grayscale graph is generated based on these numerical pairs as input to the convolutional neural network.
This method can effectively retain bearing fault characteristics information, reduce noise impact, simplify calculation complexity, and improve the accuracy and efficiency of fault detection.
Smart Images

Figure BDA0005020220880000031 
Figure BDA0005020220880000032 
Figure BDA0005020220880000042
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method for generating a grayscale image as an input of a convolutional neural network for bearing fault detection. Background Art
[0002] The use of deep learning models for bearing fault detection is an advanced technology that can effectively identify and classify different types of faults through automated data collection, analysis, and feature extraction. This method relies on the mapping calculation of the bearing vibration signal by a neural network model, which can automatically learn and extract important patterns and features from the raw data. Compared with traditional rule-based or shallow machine learning methods, deep learning models perform well when processing large-scale data and complex signals. It can process data in real time or near real time, making online monitoring and early fault detection possible. The main advantage of this technology is its high degree of automation and ability to handle complex data structures, which is suitable for efficient equipment monitoring and maintenance systems in industry.
[0003] Research shows that bearing failures are closely related to their vibration signals. There are two main modes of using deep learning to detect bearing failures: the first mode directly inputs the one-dimensional vibration signal of the bearing into the neural network model for signal analysis and calculation. The second mode converts the one-dimensional vibration signal into an image, which is then input into the neural network model for mapping calculation.
[0004] For example, Chinese patent application 202211293256.7 discloses a bearing fault detection method based on recursive graphs and deep adaptive Transformers. First, the bearing vibration signal training data is collected, and the one-dimensional vibration signal is converted into a two-dimensional texture image through recursive graph coding technology to form a feature map. Then, a bearing fault detector based on a deep adaptive Transformer is constructed, and the data set data is used for model training, parameter optimization, and model testing to complete bearing fault detection.
[0005] For example, Chinese patent application 202111561899.0 discloses a method for obtaining vibration data of petrochemical rotating machinery failures through an EMT490 sensor, decomposing the collected original vibration signal into an efficient inherent mode function, performing data segment collection on the processed original vibration signal, and constructing a grayscale image as a two-dimensional input of a convolutional neural network; then, the convolutional neural network is used to identify and extract deep features for fault assessment and detection.
[0006] For another example, Chinese patent application 202111044408.5 discloses a method for processing rolling bearing fault data. First, the time domain vibration signal of the rolling bearing in different fault conditions is collected; the time domain vibration signal is subjected to variational modal decomposition to obtain multiple two-dimensional images; based on the two-dimensional image, the corresponding image features are extracted using the directional gradient histogram algorithm; the image features are subjected to dimensionality reduction processing using a multidimensional scaling analysis algorithm, and the fault data corresponding to the current fault condition is obtained through processing. This solution converts the fault detection problem into an image recognition method, and converts the traditional feature parameter calculation process into the grayscale value calculation process of the grayscale image, which greatly shortens the feature calculation time and simplifies the processing process.
[0007] It has been verified in practice that the second mode has the following advantages over the first mode:
[0008] 1. Enhanced feature extraction capability: When using convolutional neural networks (CNNs), image representation allows the neural network to automatically extract more complex and rich features. This method can capture the time-frequency characteristics, trend changes, and patterns in the signal, which may be difficult to capture directly in one-dimensional signals.
[0009] 2. Ability to process multi-dimensional data: If the vibration signal contains data from multiple sensors, image representation can process these multi-dimensional data and integrate them into one image. Images of different channels can represent signals from different sensors. This method is very useful when processing multi-channel signals.
[0010] 3. Improved classification performance: In some cases, image representation and the use of convolutional neural networks can significantly improve classification performance. Convolutional neural networks can effectively learn and capture spatial structural features in data, especially for data sets containing complex patterns and nonlinear relationships. The advantages of convolutional neural networks are more obvious.
[0011] Traditional methods for converting one-dimensional vibration signals of bearings into images include MTF (Markov transfer field), CWT (continuous wavelet transform), RP (regression map), etc. These methods have some shortcomings:
[0012] 1. Some original information may be lost when processing one-dimensional signals. For example, MTF may lose the details of the original signal during the discretization and state transfer expression process, which may lead to the loss of key fault features and affect the accuracy of fault classification.
[0013] 2. Complex calculations: For example, CWT requires a large amount of calculations and takes a long time to process. Especially when processing high-frequency data or long time series, it takes up a lot of computing resources and is not conducive to use in mobile machines and real-time monitoring situations.
[0014] 3. Challenge of data dimension: For multi-dimensional vibration signals, it is a challenge to effectively represent different dimensions or signal channels in the image. Summary of the invention
[0015] In order to solve the problems in the prior art, the purpose of the present invention is to provide a method for generating a grayscale image as an input of a convolutional neural network for bearing fault detection.
[0016] To achieve the above object, the present invention provides the following technical solutions:
[0017] A method for generating a grayscale image as an input to a convolutional neural network for bearing fault detection comprises the following steps:
[0018] Step S1, calculate the one-dimensional vibration signal sample X of the bearing collected by the sensor = (a 1 ,a 2 ...,a n ) in each vibration signal data point a 1 ,a 2 ...,a n The moving average of is as follows:
[0019]
[0020] Among them, A t is the moving average of the t-th vibration signal data point, u is the window step size when calculating the moving average, which indicates the number of data points included in the moving average calculation. It is a positive integer, and u<n, to obtain the calculated signal sample
[0021]
[0022] Step S2: Calculate signal samples The second-order difference of each data point in is as follows:
[0023] Δ 2 A i =A i -2A i-1 +A i-2 (2)
[0024] Among them, A i is the moving average of the vibration signal data points at the current time point, A i-1 and A i-2 are the moving averages of the vibration signal data points at the first two time points, and the calculated signal samples are obtained Assuming that the sampling frequency of the vibration signal is 20KHZ, there are 20,000 sampling points in 1 second, and each sampling point corresponds to a time point that is spaced apart from each other.
[0025] Step S3: construct a value pair (A t ,Δ 2 A t ), where A t is the moving average of the tth vibration signal data point, Δ 2 A t Yes A t The corresponding second-order difference value is obtained, and the value pair list M = [(A 1 ,Δ 2 A 1 ),(A 2 ,Δ 2 A 2 )…(A n ,Δ 2 A n )]
[0026] Step S4: Generate the image size W*H as needed, where W is the width of the image and H is the length of the image. Calculate each value pair (At, Δ 2 At) and Δ 2 The scaled value of At is obtained by scaling the value pair (A W ,Δ 2 A H ), thus obtaining a list of scaled value pairs
[0027] Specifically include:
[0028] Step 4-1, normalize all value pairs (A t ,Δ 2 A t ) t and Δ 2 A t The value of
[0029]
[0030] Step 4-2: Calculate the scaling value A in the W direction tW , the formula is as follows
[0031]
[0032] Step 4-3: Calculate the scaling value Δ in the H direction 2 A tH , the formula is as follows
[0033]
[0034] Step 4-4, A tW ,Δ 2 A tH The calculation result is rounded to get the scaled value pair (AW ,Δ 2 A H ), thus obtaining a list of scaled value pairs Step S5: list the scaled values Generate a grayscale image, including:
[0035] Step 5-1, initialize a two-dimensional image of size W*H, mark the pixel values of all pixels as 0; obtain a W*H matrix, in which all element values are 0, and the formula is as follows:
[0036] I(x,y)=0 (7)
[0037] Where x∈[0,W-1], y∈[0,H-1];
[0038] Step 5-2: List the value pairs Each value pair in corresponds to each pixel point P(x,y) in the two-dimensional image, where x and y are the coordinates of the pixel point;
[0039] Step 5-3: Assign values to the pixel points. The value of the pixel point P(x, y) is equal to all the value pairs corresponding to the pixel point (A Wi ,Δ 2 A Hi ) is calculated using the following formula:
[0040]
[0041] Among them, δ((x,y),(A Wi ,Δ 2 A Hi )) is an indicator function, when (x,y)=(A Wi ,Δ 2 A Hi ), that is, when the pixel coordinates and the value pair are equal, δ=1, otherwise δ=0, and the maximum value of each pixel is 255, thus obtaining a grayscale image.
[0042] The one-dimensional bearing vibration signal grayscale image generated by the present invention can be applied to deep learning neural network models, including but not limited to CNN, ResNet, DenseNet, LSTM, and Transformer models.
[0043] The beneficial effects of the present invention are mainly reflected in:
[0044] (1) By processing each one-dimensional vibration signal data point of the bearing, it is ensured that the key information of the bearing fault characteristics that can potentially reflect the bearing fault characteristics in the one-dimensional vibration signal of the bearing is not easily lost, and finally retained in the grayscale image. It can be understood that the different grayscale values of each pixel in the grayscale image are combined into an image, which implicitly represents the bearing fault characteristics. This series of grayscale images is used as the input of the convolutional neural network. The mapping calculation of the neural network can extract the bearing fault characteristics implicit in the image, preventing omissions and causing inaccurate bearing fault detection.
[0045] (2) A smooth signal is obtained by calculating the moving average of each bearing's one-dimensional vibration signal data point, thereby effectively reducing the impact of noise and improving data quality. This is especially important for data from different sensors, because data from different sensors may have different noise levels and signal characteristics.
[0046] (3) The computational complexity of the method of the present invention is not high, which effectively saves computing resources and is suitable for different industrial scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flow chart of a preferred embodiment of the present invention;
[0048] Figure 2 and Figure 3 These are two different grayscale images formed by the method of the present invention, respectively representing two different fault signals. DETAILED DESCRIPTION
[0049] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Figure 1 As shown, the present invention discloses a method for generating a grayscale image as an input of a convolutional neural network for bearing fault detection, comprising the following steps:
[0050] Step S1, calculate the one-dimensional vibration signal sample X of the bearing collected by the sensor = (a 1 ,a 2 ...,a n ) in each vibration signal data point a 1 ,a 2 ...,a n The moving average of is as follows:
[0051]
[0052] Among them, A t is the moving average of the t-th vibration signal data point, u is the window step size when calculating the moving average, which indicates the number of data points included in the moving average calculation. It is a positive integer, and u<n, to obtain the calculated signal sample In practical applications, bearing vibration signals may contain various noises that interfere with the analysis of the true characteristics of the signal. The present invention can significantly reduce the impact of high-frequency noise by calculating the moving average, thereby highlighting the useful information in the data. When performing subsequent differential calculations or feature extraction, the data smoothed by this step is easier to process and analyze. On the one hand, it simplifies the model training and tuning process and reduces computational complexity. On the other hand, by adjusting the window size of the moving average, the degree of smoothing can be controlled to adapt to different application scenarios. For example, when processing very noisy data, a larger window can be used to smooth the noise more effectively; and when more detailed features need to be retained, a smaller window can be used.
[0053] Step S2: Calculate signal samples The second-order difference of each data point in is as follows:
[0054] Δ 2 A i =A i -2A i-1 +A i-2 (2)
[0055] Among them, A i is the moving average of the vibration signal data points at the current time point, A i-1 and A i-2 are the moving averages of the vibration signal data points at the first two time points, and the calculated signal sample set is obtained The second-order difference calculated by the present invention can highlight the acceleration change in the signal, that is, the mutation point or inflection point. This is very useful for detecting abnormal changes in bearing fault signals (such as sudden failures, sudden state changes). The moving average calculated in step S1 of the present invention can smooth out short-term fluctuations in the signal and retain medium- and long-term trends or periodic characteristics. On this basis, the second-order difference calculated in step S2 can more clearly show the acceleration characteristics of periodic changes in the signal, which is particularly useful for detecting periodic faults or oscillations.
[0056] Step S3: construct a value pair (A t ,Δ 2 A t ), where A t is the moving average of the tth vibration signal data point, Δ 2 A t Yes A t The corresponding second-order difference value is obtained, and the value pair list M = [(A 1 ,Δ 2 A 1 ),(A 2 ,Δ 2 A 2 )…(An ,Δ 2 A n )].
[0057] Step S4: Generate the image size W*H as needed, where W is the image width pixel value, H is the image length pixel value, calculate the scaling value of each value pair M, and obtain the scaled value pair (A W ,Δ 2 A H ), thus obtaining a list of scaled value pairs
[0058] Specifically include:
[0059] Step 4-1, normalize all value pairs (A t ,Δ 2 A t ) t and Δ 2 A t The value of
[0060]
[0061] Step 4-2: Calculate the scaling value A in the W direction tW , the formula is as follows
[0062]
[0063] Step 4-3: Calculate the scaling value Δ in the H direction 2 A tH , the formula is as follows
[0064]
[0065] Step 4-4, A tW ,Δ 2 A tH The calculation result is rounded to get the scaled value pair (A W ,Δ 2 A H ), thus obtaining a list of scaled value pairs Step S5: list the scaled values Generate a grayscale image, including:
[0066] Step 5-1, initialize a two-dimensional image of size W*H, and mark the pixel values of all pixels as 0. That is, create a W*H matrix, in which all element values are 0 (i.e., a completely black image), and the formula is as follows:
[0067] I(x,y)=0 (7)
[0068] Where x∈[0,W-1], y∈[0,H-1];
[0069] Step 5-2: List the scaled value pairs Each value pair in corresponds to each pixel point P(x,y) in the two-dimensional image, where x and y are the coordinates of the pixel point;
[0070] Step 5-3: Assign values to the pixel points. The value of the pixel point P(x, y) is equal to all the value pairs corresponding to the pixel point (A Wi ,Δ 2 A Hi ) is calculated using the following formula:
[0071]
[0072] Among them, δ((x,y),(A Wi ,Δ 2 A Hi )) is an indicator function, when (x,y)=(A Wi ,Δ 2 A Hi ), that is, when the pixel coordinates and the value pair are equal, δ = 1, otherwise δ = 0, and the maximum value of each pixel is 255 (white), thus obtaining a grayscale image.
[0073] It is well known to those skilled in the art that the definition of a grayscale image is that the value range of the pixels constituting the image is between 0 and 255, so a grayscale image is a black and white image, and the value of the pixel is reflected in the color as different grayscale. The purpose of step 5-3 of the present invention is to find the pixel points corresponding to all the value pairs in the initialized grayscale image, and the value pairs may be repeated, that is, one pixel may correspond to multiple value pairs, and the pixel value of each pixel is the cumulative number of all value pairs at the point, so the values of the pixels in the constructed grayscale image are different. In conjunction with the subsequent applications of the present invention, the grayscale image is used as the input of the neural network, and the fault features hidden in the image can be extracted through the mapping calculation of the neural network. It can be understood that the different grayscale values of each pixel are combined into an image, which implies the bearing fault feature information.
[0074] The processed data is converted into a grayscale image through the above steps, in which the value of each pixel represents a certain feature representation of the vibration signal. The deep learning network model (such as CNN) gradually extracts different levels of feature representations from the grayscale image generated by the present invention through multi-layer convolution and pooling operations, including low-level features (such as edges and textures) and global features (such as shapes). This process enables CNN to capture rich information in fault diagnosis, thereby helping the classifier to more accurately identify the type of fault. In order to intuitively illustrate the effectiveness of this method, the present invention selects two vibration signals to generate two grayscale images, as shown in Figure 2. Figure 2and Figure 3 As shown, it is obvious that the two vibration signals and the grayscale images generated by them are different. Each grayscale image contains implicit fault features, and a deep learning network model can be used for fault diagnosis and detection. Of course, those skilled in the art should also be aware that the grayscale image containing bearing fault signal information generated by the present invention can be used in addition to the standard version of the convolutional neural network CNN as an example, other deep learning models can also be used, such as ResNet, DenseNet, LSTM, Transformer models, etc.
[0075] The present invention conducts experiments on four types of faults at a speed of 1000 rpm, namely: normal, inner race fault (IF), outer race fault (OF) and ball fault (BF). Compare the methods of generating images from time series signals such as MTF, CWT, RP, etc. commonly used in deep learning network models, and evaluate the accuracy in different classification models Among them, TP, TN, FP and FN represent true positive, true negative, false positive and false negative respectively. The experimental results are as follows:
[0076]
[0077] It can be seen that the fault type detection accuracy of the image constructed by the method of the present invention in different deep learning models is higher than that of other commonly used methods.
[0078] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for generating a grayscale image as an input to a convolutional neural network for bearing fault detection, characterized in that: The following steps are included: Step S1, calculate the one-dimensional vibration signal sample X of the bearing collected by the sensor = (a1, a2..., a n ) in each vibration signal data point a1, a2..., a n The moving average of is as follows: Among them, A t is the moving average of the t-th vibration signal data point, u is the window step size when calculating the moving average, which indicates the number of data points included in the moving average calculation. It is a positive integer, and u<n, and the calculated one-dimensional bearing signal sample is obtained. Step S2: Calculate the one-dimensional signal sample of the bearing after step S1 The second-order difference of each vibration signal data point in is as follows: Δ 2 A i =A i -2A i-1 +A i-2 (2) Among them, A i is the moving average of the vibration signal data points at the current time point, A i-1 and A i-2 are the moving averages of the vibration signal data points at the first two time points, and the calculated signal samples are obtained Step S3: construct n value pairs (A t ,Δ 2 A t ), where A t is the moving average of the tth vibration signal data point, Δ 2 A t Yes A t The corresponding second-order difference value is obtained, and the value pair list M=[(A1,Δ 2 A1),(A2,Δ 2 A2)…(A n ,Δ 2 A n )]; Step S4: Generate the image size W*H of the grayscale image as needed, and calculate each value pair (A t ,Δ 2 A t ) t and Δ 2 A t The scaled value is rounded, where W is the width of the image and H is the length of the image, and the scaled value pair (A W ,Δ 2 A H ), and then get the list of scaled value pairs Step S5: list the scaled values Generate a grayscale image, including: Step 5-1, initialize a two-dimensional image of size W*H, mark the pixel values of all pixels as 0; obtain a W*H matrix, in which all element values are 0, and the formula is as follows: I(x,y)=0(7) Where x∈[0,W-1], y∈[0,H-1]; Step 5-2: List the scaled value pairs Each value pair in corresponds to each pixel point P(x,y) in the two-dimensional image, where x and y are the coordinates of the pixel point; Step 5-3: Assign values to the pixel points. The value of the pixel point P(x, y) is equal to all the value pairs corresponding to the pixel point (A Wi ,Δ 2 A Hi ) is calculated using the following formula: Among them, δ((x,y),(A Wi ,Δ 2 A Hi )) is an indicator function, when (x,y)=(A Wi ,Δ 2 A Hi ), that is, when the pixel coordinates and the value pair are equal, δ=1, otherwise δ=0, and the maximum value of each pixel is 255, thus obtaining a grayscale image.
2. The method according to claim 1, characterized in that The step S4 specifically includes: Step 4-1, normalize all value pairs (A t ,Δ 2 A t ) t and Δ 2 A t The value of Step 4-2: Calculate the scaling value A in the W direction tW , the formula is as follows Step 4-3: Calculate the scaling value Δ in the H direction 2 A tH , the formula is as follows Step 4-4, A tW ,Δ 2 A tH The calculation result is rounded to get the scaled value pair (A W ,Δ 2 A H ), thus obtaining a list of scaled value pairs 3. Grayscale image of one-dimensional vibration signal of bearing, characterized in that: Generated by the method of claim 1 or 2.
4. The one-dimensional vibration signal grayscale image of the bearing according to claim 3, characterized in that: Neural network models that can be applied to deep learning include CNN, ResNet, DenseNet, LSTM, and Transformer models.
Citation Information
Patent Citations
A fault data processing method, system and fault prediction method
CN113762151B
Intelligent fault diagnosis method based on empirical mode decomposition and image conversion
CN115186692A
Bearing fault detection method and system based on recurrence plot and depth adaptive Transform
CN115586005A
Fault detection method and fault detection apparatus used for shafting device
CN104964821A
Bearing fault identification method based on vibration grayscale image and convolutional neural network
CN110595780A