Small sample bearing fault diagnosis method based on time-frequency diagram double-flow CNN and SVM
Through the method of time-frequency graph dual-stream CNN and SVM, combined with short-time Fourier transform and synchronous compressed wavelet transform, the limitations of signal processing in small sample bearing fault diagnosis are solved, and efficient classification and identification of bearing faults are achieved.
Patent Information
- Application Number
- CN202410744218.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Under small sample conditions, traditional bearing fault diagnosis methods are difficult to achieve accurate classification and identification, especially due to the nonlinear and non-stationary characteristics of bearing fault signals, which leads to limitations in signal processing and feature extraction.
A small-sample bearing fault diagnosis method based on time-frequency graph dual-stream CNN and SVM is used. Short-time Fourier transform and synchronous compressed wavelet transform are used for signal processing simultaneously. Dual-stream CNN performs feature extraction and classification through SVM, which overcomes the traditional method. Inadequacy in small sample data.
It improves the classification accuracy and identification ability of small sample bearing faults, overcomes the problem of poor performance of traditional methods on small sample data, and achieves effective classification of nonlinear and high-dimensional data.
Smart Images

Figure CN118760959A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bearing fault diagnosis, and in particular to a small sample bearing fault diagnosis method based on time-frequency graph dual-stream CNN and SVM. Background Art
[0002] With the development of industrial technology, mechanical equipment is increasingly used in the fields of manufacturing, transportation, and energy industries. As an important component of mechanical equipment, the operating status of bearings directly affects the working performance and service life of the entire equipment. Early diagnosis and prediction of bearing faults are of great significance to ensure the safe operation of mechanical equipment. However, bearing fault signals usually show nonlinear and non-stationary characteristics, which brings great challenges to fault diagnosis.
[0003] Traditional bearing fault diagnosis methods mainly rely on single signal processing techniques such as time domain analysis, frequency domain analysis and time-frequency analysis. However, these methods often show certain limitations when processing complex signals and small sample data, and it is difficult to extract signal features comprehensively and accurately. In recent years, multimodal signal extraction methods that combine multiple signal processing methods and machine learning techniques have gradually become a research hotspot. By integrating multiple signal features, multimodal signal extraction methods can more comprehensively reflect the essential characteristics of the signal, thereby improving the accuracy and robustness of fault diagnosis. In this context, researchers have successively proposed many algorithms for fault feature extraction, such as short-time Fourier transform (STFT), wavelet transform (WT), empirical mode decomposition (EMD), etc.
[0004] As two commonly used analysis methods, short-time Fourier transform (STFT) and wavelet transform (WT) have their own advantages. STFT can better describe the time-frequency characteristics of the signal by performing Fourier transform through a fixed-length window function; while WT can effectively extract the multi-scale characteristics of the signal through multi-scale decomposition. Combining these two methods can fully explore the signal characteristics in terms of time-frequency and multi-scale, providing richer information for fault diagnosis.
[0005] Patent CN202410158516.2 discloses a bearing automatic fault diagnosis method and system based on energy ratio and energy sum. The original acceleration vibration signal is subjected to a fast Fourier transform, and the data of a frequency band after the fast Fourier transform is taken to calculate the energy sum, thereby realizing further extraction of fault information; however, the fast Fourier transform cannot handle non-stationary signals well, and is not as good as the short-time Fourier transform in describing the time-frequency characteristics of the signal. In addition, in patent CN202410354193.4, the researchers performed continuous wavelet transform on the multi-source heterogeneous signals when the motor is running, and generated wavelet time-frequency diagrams respectively, to realize fault feature extraction and facilitate subsequent processing. In response to the wavelet transform method, the researchers further proposed a synchronous extraction wavelet transform method, which has slightly improved the effect of bearing fault feature extraction.
[0006] However, in practical applications, the sample size of bearing fault data is usually small, and traditional big data training methods are difficult to work. Therefore, making full use of multimodal signals to improve the accuracy of bearing fault diagnosis under small sample conditions has become a practical problem that needs to be solved in the field of bearing diagnosis. Summary of the invention
[0007] The purpose of the present invention is to provide a small sample bearing fault diagnosis method based on time-frequency graph dual-stream CNN and SVM, which uses SWT and STFT to simultaneously perform signal processing, dual-stream CNN to perform feature extraction, and SVM to perform classification. The small sample bearing fault diagnosis method can achieve accurate classification and identification of bearing faults in small sample conditions.
[0008] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is specifically: a small sample bearing fault diagnosis method based on time-frequency graph dual-stream CNN and SVM, comprising the following steps:
[0009] Step S1: signal acquisition and processing, obtaining the original vibration data of rolling bearings with different fault damage degrees, processing the data, selecting samples of the same length under each fault state, extracting and storing them in a matrix according to the state and labeling them, merging all the data and saving the processed data set.
[0010] Step S2: Set the sampling frequency, window length, window overlap number and discrete Fourier transform points, and generate a short-time Fourier transform image of the data. Perform a short-time Fourier transform on each sample signal, generate an image, normalize it, and save the image data for subsequent model training.
[0011] Step S3: Set the parameters of synchronous compression wavelet transform, perform synchronous compression wavelet transform (SWT) processing on each sample signal, generate an image, normalize it, and save the image data for use in subsequent steps.
[0012] Step S4: Establish a fault diagnosis model of a multi-input neural network model, load the data processed in steps S2 and S3 at the same time, divide them into training sets and test sets, and divide each type of data according to the proportion. Construct a multi-input neural network model, which includes two input branches to process STFT and SWT features respectively. Set the structure of each layer of the neural network, including convolution layer, pooling layer, batch normalization layer and fully connected layer.
[0013] Step S5: Input the fusion features obtained by the two-stream neural network into the support vector machine (SVM) for training and testing, and finally calculate the prediction accuracy of the SVM.
[0014] Furthermore, in step S2, short-time Fourier transform is used for processing, and the amplitude spectrum is used to visualize the time-frequency characteristics of the signal:
[0015]
[0016] Among them, x(τ) is the input signal, w(τ-t) is the window function, and e -j2πfτ is the Fourier basis function.
[0017] Further, in step S2, the result of the calculation is a complex matrix S(t,f), in which each element represents a complex value at time t and frequency f. This complex number contains amplitude and phase information. The amplitude |S(t,f)| represents the strength of the signal at a given time and frequency. The calculation method is as follows:
[0018]
[0019] Where Re(S(t,f)) and Im(S(t,f)) represent the real part and imaginary part of the complex number S(t,f), respectively.
[0020] Further, in step S2, in order to better represent and analyze the spectrum information, the amplitude or power spectrum density is converted to a logarithmic scale. Taking the logarithm of the amplitude gives the amplitude spectrum and converts it into a video image. The amplitude spectrum is used to visualize the time-frequency characteristics of the signal because it more intuitively shows the intensity changes of the signal at different times and frequencies. The calculation method is as follows:
[0021] Magnitude (dB) = 20·log 10 (|S(t,f)|) (3)
[0022] Furthermore, in step S3, a synchronous compression wavelet transform image is generated: parameters of the synchronous compression wavelet transform are set, each sample signal is processed, an image is generated and its image parameters are saved for use in subsequent steps.
[0023] Synchronous compression wavelet transform (SWT) is an improved wavelet transform technology that combines the advantages of synchronous transform and wavelet transform to more accurately represent the time-frequency characteristics of the signal. SWT is based on continuous wavelet transform (CWT) and combines synchronous compression technology to give the result a higher time-frequency resolution. This technology is used to adjust the time-frequency distribution of the wavelet transform to make the energy more concentrated. The formula is as follows:
[0024]
[0025] Where f is the frequency, W x (a, b) is the result of CWT, and its basic formula is as follows:
[0026]
[0027] Where x(t) is the signal, ψ is the mother wavelet, a and b are the scale and displacement parameters respectively, and ψ * is the complex conjugate of the mother wavelet. The scale a is usually determined by the number of octave divisions N. v and scale level j, and its formula is expressed as follows:
[0028]
[0029] Further, in step S3, after undergoing SWT, the SWT complex matrix is obtained, which represents the complex amplitude of the signal at different times and frequencies. The modulus of the complex number is the amplitude, and the phase describes the phase information of the signal in the time-frequency domain. The matrix is converted into a visualized two-dimensional synchronous compressed wavelet transform time-frequency diagram.
[0030] Further, in step S4, a fault diagnosis model of a multi-input neural network model is established, and the processed STFT and SWT feature image data are loaded and divided into a training set and a test set, and each type of data is divided according to the proportion. A multi-input neural network model dual-stream convolutional neural network (dual-stream CNN) is constructed. The model includes two input branches, which process the STFT and SWT feature images respectively. The structure of each layer of the neural network is set, including a convolution layer, a pooling layer, a batch normalization layer, and a fully connected layer. Features are extracted through multi-level convolution and pooling operations. This method usually performs convolution and pooling at different scales to obtain features at different levels.
[0031] Furthermore, in step S4, for the input feature map X and the convolution kernel W, the output Y of the convolution operation can be expressed as:
[0032]
[0033] Where X is the input feature map, size is H×W×C; W is the convolution kernel, size is H f ×W f ×C×K; C is the number of channels, and K is the number of input channels; b k is the bias of the kth convolution kernel; Y is the output feature map, with a size of H′×W′×k.
[0034] After the convolution operation, the ReLU activation function is applied:
[0035] Z i,j,k =ReLU(Y i,j,k )=max(0,Y i,j,k ) (8)
[0036] Batch normalization is used to speed up training and stabilize the network:
[0037]
[0038] where μ k is the mean of the kth feature map, is the variance of the kth feature map, and ∈ is a small constant used to prevent division by zero errors.
[0039] Perform the maximum pooling operation:
[0040]
[0041] Perform an average pooling operation:
[0042]
[0043] Expand the pooled feature map into a one-dimensional vector and input it into the fully connected layer:
[0044]
[0045] Among them: P is the feature vector after pooling, V is the weight matrix of the fully connected layer, and ci is the bias of the fully connected layer.
[0046] Fusion of features from two different paths, STFT and SWT:
[0047] F fusion =F1+F2 (13)
[0048] where F1 and F2 are features extracted from the STFT and SWT pathways, respectively.
[0049] Furthermore, in step S5, features are extracted from the trained CNN and input into a support vector machine (SVM) for training and testing, and finally the prediction accuracy of the SVM is calculated. The mathematical formula of the decision function of the SVM is expressed as follows:
[0050]
[0051] Where: α i is the Lagrange multiplier; y i is the label of the training sample; K(x i ,x) is the kernel function; b is the bias.
[0052] After that, fault classification is achieved by corresponding the decision function f(x) to the label.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] 1. The small sample bearing fault diagnosis method based on time-frequency graph dual-stream CNN and SVM provided by the present invention can overcome the selective loss problem of synchronous compression wavelet transform, so that the frequency information at each time point can be better preserved, ensuring that the spectrum information of the signal is not ignored, which can greatly improve the accuracy of small sample fault classification.
[0055] 2. The present invention combines short-time Fourier transform and synchronous compressed wavelet transform, and can simultaneously utilize the advantages of fixed window frequency analysis and multi-scale analysis, making the feature extraction of subsequent signals more comprehensive and accurate.
[0056] 3. The present invention combines a dual-stream convolutional neural network with a support vector machine to create a multi-input branch for model training. It has excellent classification effects on small samples, nonlinear and high-dimensional data, and can achieve efficient classification and identification of bearing faults in small sample conditions.
[0057] 4. The model has made significant progress in the classification ability of small sample faults, realized the diagnosis of small sample bearing faults, and effectively overcame the problem of poor classification performance of traditional bearing diagnosis methods for small sample bearing faults. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0059] Figure 1 The overall flow chart of the small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph in the method of the present invention.
[0060] Figure 2 The original signal in the method of the present invention is an image after synchronous compression wavelet transformation.
[0061] Figure 3 The image of the original signal after short-time Fourier transformation in the method of the present invention.
[0062] Figure 4 The embodiment of the present invention adopts the traditional synchronous compression wavelet transform-convolutional neural network-support vector machine (SWT-CNN-SVM) method to diagnose the fault results of the CWRU data set.
[0063] Figure 5 The embodiment of the present invention adopts the traditional short-time Fourier transform-convolutional neural network-support vector machine (STFT-CNN-SVM) method to diagnose the fault results of the CWRU data set.
[0064] Figure 6 The embodiment of the present invention uses a synchronous compressed wavelet transform-short time Fourier transform-two-stream convolutional neural network (STFT-SWT-two-stream CNN) method to diagnose the fault results of the CWRU data set.
[0065] Figure 7 The embodiment of the present invention uses a small sample bearing fault diagnosis method based on time-frequency graph dual-stream CNN and SVM to diagnose the fault results of the CWRU data set.
[0066] Figure 8 Schematic diagram of the two-stream convolutional neural network structure used in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.
[0068] Example 1
[0069] See also Figure 1 and Figure 8 The technical solution provided by this embodiment is a small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph.
[0070] The Case Western Reserve University (CWRU) bearing dataset, referred to as the CWRU dataset, is a rolling bearing fault dataset publicly provided by the Bearing Data Center of the Electrical Laboratory of Case Western Reserve University. The experiment uses a 2-horsepower motor, a torque sensor, a power tester, etc. The rolling bearing models at the drive end and the fan end are 6205-2RS SKF and SKF6203 deep groove ball bearings, respectively. The parameter information is shown in Table 1. The experiment uses electrospark machining to introduce single-point faults to the experimental bearings, and the fault diameters are 7, 14, 21, 28, and 40 mils (mil, 1 mil = 0.001 inch = 0.0254 mm). The vibration data is collected using an accelerometer and connected to the housing with a magnetic base. The accelerometer is placed at the 12 o'clock position on the drive end and the fan end of the motor housing. In the experiment, the vibration signals collected by the recorder are post-processed in the Matlab environment. All data files are in Matlab (*.mat) format. Digital data was collected at 12,000 samples per second and the drive-end bearing fault data was collected at 48,000 samples per second. The outer raceway fault is a stationary fault, so the location of the fault relative to the bearing load zone directly affects the vibration response of the motor / bearing system.
[0071] To quantify this effect, experiments were conducted on fans and drive-end bearings with external channel faults at 3 points (directly in the load zone), 6 points (orthogonal to the load zone), and 12 points. The entire experiment used a 16-channel DAT recorder to collect vibration signals at motor speeds of 1797 rpm (0 load), 1750 rpm (1 load), 1730 rpm (2 loads), and 1722 rpm (3 loads), with a sampling frequency of 12 kHz. There are 10 states at each speed, namely the fault state at three positions of the inner ring of the bearing, the fault state at three positions of the outer ring of the bearing, the fault state at three positions of the rolling element, and the normal operation state, as shown in Table 2.
[0072] Table 1 Rolling bearing parameter information
[0073]
[0074] Step S1: Signal acquisition and processing, obtain the original vibration data of rolling bearings with different fault damage degrees, a total of ten fault types. Process the data, select samples of the same length under each fault state, extract and store them in the matrix according to the state and label them, merge all the data and save the processed data set.
[0075] This example uses 48K drive-side data, 9 types of fault data and 1 normal data, totaling 10 fault states, as the entire data set. Set the sliding window size to 1000, take 100 samples for each fault sample, and each sample contains 2048 vibration data.
[0076] Table 2 Schematic diagram of bearing failure
[0077] Serial number Fault location Fault Size (mils) Label Corresponding data file 1 normal a1 97.mat 2 Inner Circle 7 a2 105.mat 3 Rolling element 7 a3 118.mat 4 Outer ring 7 a4 130.mat 5 Inner Circle 14 a5 169.mat 6 Rolling element 14 a6 185.mat 7 Outer ring 14 a7 197.mat 8 Inner Circle 21 a8 209.mat 9 Rolling element 21 a9 222.mat 10 Outer ring 21 a10 234.mat
[0078] Extract 100 samples from the normal state data 97.mat. Each sample is intercepted from the original data by a data segment of length 2048, and the starting position is calculated according to the sliding window. The result is a 100×2048 matrix D0. Repeat the process to process the other nine state data to obtain matrices D1 to D9. The data matrices of the 10 states are vertically spliced into a large matrix data with a dimension of 1000×2048 (100 samples per state, a total of 10 states). After this, labels are added to the data of each state, and the label value is the state number, from 1 to 10. The new label column is added to the last column of the data matrix to form a new file DATA.
[0079] Step S2, setting parameters such as sampling frequency, window length, window overlap number and discrete Fourier transform point number to perform short-time Fourier transform on each sample signal, generate a time-frequency image and save it for subsequent model training.
[0080] Load the data DATA processed in step S1, first remove the last label column of the data, use the data part to perform short-time Fourier transform on it, set the short-time Fourier transform parameters and calculate the short-time Fourier transform to generate the corresponding time-frequency graph, and adjust the image size to 64×64 pixels.
[0081] The mathematical expression formula of short-time Fourier transform is as follows:
[0082]
[0083] In this embodiment, x(τ) is the input signal, f is the frequency 12000, t is the window position, e -j2πfτ is the Fourier basis function, w(τ-t) is the Hamming window. The window length is 32, the number of window overlap samples is 5, and the step length is the window length minus the number of window overlap samples, which is 27; the number of discrete Fourier transform points is 2048, combined with the previous frequency of 12000, the frequency resolution can be calculated to be 5.859375. The generated image is as follows Figure 2 shown.
[0084] The image data is converted to double precision and normalized to the range [0,1]. The processed image and the corresponding label are then stored in a cell array.
[0085] Step S3: Synchronous Compression Wavelet Transform (SWT) image generation, set the parameters of synchronous compression wavelet transform, perform SWT processing on each sample signal, and extract the image data after generating the image for use in subsequent steps. The generated image is as follows Figure 3 shown.
[0086] Load the data DATA processed in step S1, first remove the last column of the data, use the data part, calculate the synchronous compression wavelet transform and generate its image, process the generated wavelet transform image, and adjust the image size to 64×64 pixels. The synchronous compression wavelet transform formula is as follows:
[0087]
[0088] In this embodiment, f is the frequency 12000, x(t) is the input signal, ψ is the mother wavelet, a and b are the scale and displacement parameters, respectively, which are automatically calculated and processed according to the input signal. * It is the complex conjugate of the mother wavelet. The mother wavelet function is Morlet, and the number of divisions in each octave is 12.
[0089] The image data is converted to double precision and normalized to the range [0,1]. The processed image and the corresponding label are then stored in a cell array.
[0090] Step S4: Establish a fault diagnosis model of a multi-input neural network model, load the STFT and SWT feature image data processed at the same time and divide them into a training set and a test set, and divide each type of data according to a ratio. The ratio used in the embodiment is 20% for the training set and 80% for the test set. Construct a multi-input neural network model, which includes two input branches to process the STFT and SWT feature images respectively. Set the structure of each layer of the neural network, including a convolutional layer, a pooling layer, a batch normalization layer, and a fully connected layer.
[0091] Step S4.1: Load the STFT and SWT data processed in steps S2 and S3, store them in two arrays respectively, and use another variable to store the labels.
[0092] Step S4.2: There are 100 sets of data for each group of faults. In this embodiment, 20 sets are used for training and 80 sets are used for testing, that is, the first 200 samples are used for training and the last 800 samples are used for testing.
[0093] Step S4.3: Define a convolutional neural network with two input channels to form a two-stream convolutional neural network. Each input channel has independent convolution and pooling layers, and finally merged through an addition layer.
[0094] The two-stream convolutional neural network structure is as follows Figure 8 As shown in the figure, the following steps are taken on each branch: define a convolutional layer (Convolutional Layers), use 3x3 convolution kernels, the number is 16, the step size is 1, and the "same" padding method is used to keep the input and output sizes the same; apply batch normalization layers (Batch Normalization Layers) to improve the stability of the model and accelerate convergence; apply ReLU (rectified linear unit) activation function to introduce nonlinear characteristics; define a maximum pooling layer (Max Pooling Layers), use a 2x2 pooling window, a step size of 2, and perform maximum pooling while keeping the input and output sizes the same; define a Dropout layer (Dropout Layers) with a drop ratio of 10% to reduce overfitting; define a fully connected layer (Fully Connected Layers) containing 64 channels; define an addition layer (Addition Layers) to add multiple inputs, which is used here to connect the outputs of two branches; define a Softmax layer to convert the output of the network into a probability distribution so that the output value can be interpreted as the probability of each category.
[0095] Step S5: Extract features from the trained CNN, input them into the support vector machine for training and testing, and finally calculate the prediction accuracy of the SVM. In the whole process, CNN is used for feature extraction and preliminary classification, while SVM is used for further classification and decision making.
[0096] Step S5.1: Extract the output of the fully connected layer of the CNN network as the input feature of the SVM, that is, the feature data of the training set and the test set after CNN, and call Matlab's own SVM function for training, in which the kernel function type is specified as a linear kernel function, the penalty parameter is 500, and the kernel function width is set to 0.01.
[0097] Step S5.2: Use the trained SVM model to predict the test set and obtain the predicted label result. Compare the predicted label result with the true label to analyze the prediction accuracy.
[0098] The accuracy index is used as the evaluation index of the test set, and the calculation formula is as follows:
[0099]
[0100] In the formula, Acc is the classification accuracy, the closer its value is to 1, the better, TP (true positive) represents the number of positive samples judged as positive samples, TN (true negative) represents the number of negative samples judged as negative samples, and ALL represents the number of all samples.
[0101] Table 3 Diagnostic effect
[0102]
[0103]
[0104] In the bearing diagnosis simulation of this embodiment, several methods including traditional synchronous compression wavelet transform-convolutional neural network-support vector machine (SWT-CNN-SVM), traditional short-time Fourier transform-convolutional neural network-support vector machine (STFT-CNN-SVM), synchronous compression wavelet transform-short-time Fourier transform-two-stream convolutional neural network (SWT-STFT-two-stream CNN) and the synchronous compression wavelet transform-short-time Fourier transform-two-stream convolutional neural network (STFT-SWT-two-stream CNN) of the present invention are used for comparison.
[0105] Table 3 shows the fault diagnosis effects of several small sample diagnosis methods on the CWRU data set, including traditional synchronous compressed wavelet transform-convolutional neural network-support vector machine (SWT-CNN-SVM), traditional short-time Fourier transform-convolutional neural network-support vector machine (STFT-CNN-SVM), synchronous compressed wavelet transform-short-time Fourier transform-two-stream convolutional neural network (STFT-SWT-two-stream CNN) and the synchronous compressed wavelet transform-short-time Fourier transform-two-stream convolutional neural network-support vector machine (STFT-SWT-two-stream CNN-SVM) of the present invention.
[0106] As shown in Table 3, the overall fault classification accuracy of traditional SWT-CNN-SVM and STFT-CNN-SVM is not very high, while SWT-STFT-dual-stream CNN and STFT-SWT-dual-stream CNN-SVM combine the advantages of SWT and STFT, and use the advantages of fixed window frequency analysis and multi-scale analysis, making the classification accuracy better than single SWT or STFT processing. And STFT-SWT-dual-stream CNN-SVM combines two-stream convolutional neural network and support vector machine, making its classification effect for small samples, nonlinear and high-dimensional data better than SWT-STFT-dual-stream CNN. In the specific fault classification, the four methods are not very good at classifying and identifying the three rolling element faults, but STFT-SWT-dual-stream CNN-SVM can still achieve a classification accuracy of more than 90%; the classification effect of SWT-STFT-dual-stream CNN is also higher than the method of extracting faults by STFT or SWT single method. At the same time, SWT-CNN-SVM is inferior to the other three methods in the classification effect of the three faults of the outer ring, while STFT-CNN-SVM is inferior to the other three methods in the classification effect of the three faults of the inner ring. Compared with the above traditional algorithms, the small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph of the present invention combines short-time Fourier transform and synchronous compression wavelet transform. From the results, the effect is significant, and both inner and outer ring faults can have good classification performance. By combining dual-stream convolutional neural network and support vector machine, the classification effect of small sample, nonlinear and high-dimensional data is excellent. Therefore, the small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph provided by the present invention can effectively improve the diagnosis effect of bearing faults.
[0107] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph, characterized in that: The following steps are involved: Step S1: signal acquisition and processing, obtaining the original vibration data of rolling bearings with different fault damage degrees, processing the data, selecting samples of the same length under each fault state, extracting and storing them in a matrix according to the state and labeling them, merging all the data and saving the processed data set; Step S2: Set the sampling frequency, window length, window overlap number and discrete Fourier transform points, generate a short-time Fourier transform graph for the data, perform a short-time Fourier transform on each sample signal, generate an image and normalize it, and save the image data for subsequent model training; Step S3: setting the parameters of synchronous compression wavelet transform, performing synchronous compression wavelet transform (SWT) processing on each sample signal, generating an image, normalizing it, and saving the image data for use in subsequent steps; Step S4: Establish a fault diagnosis model of a multi-input neural network model, load the data processed by steps S2 and S3 at the same time, divide them into a training set and a test set, divide each type of data according to the proportion, and build a multi-input neural network model. The model includes two input branches, which process STFT and SWT features respectively, and set the structure of each layer of the neural network, including convolution layer, pooling layer, batch normalization layer and fully connected layer; Step S5: Input the fusion features obtained by the two-stream neural network into the support vector machine SVM for training and testing, and finally calculate the prediction accuracy of the SVM.
2. The small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph according to claim 1 is characterized in that: In step S2, short-time Fourier transform is used for processing, and the amplitude spectrum is used to visualize the time-frequency characteristics of the signal: Among them, x(τ) is the input signal, w(τ-t) is the window function, and e -j2πfτ is the Fourier basis function.
3. The small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph according to claim 1 is characterized in that: In step S2, the result of the calculation is a complex matrix S(t,f), in which each element represents a complex value at time t and frequency f. This complex number contains amplitude and phase information. The amplitude |S(t,f)| represents the strength of the signal at a given time and frequency. The calculation method is as follows: Where Re(S(t,f)) and Im(S(t,f)) represent the real part and imaginary part of the complex number S(t,f), respectively.
4. The small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph according to claim 1 is characterized in that: In step S2, the amplitude or power spectral density is converted to a logarithmic scale. Taking the logarithm of the amplitude gives the amplitude spectrum and converts it into a video image. The amplitude spectrum is used to visualize the time-frequency characteristics of the signal because it shows the intensity changes of the signal at different times and frequencies. The calculation method is as follows: Magnitude(dB)=20·log 10 (|S(t,f)|) (3)。 5. The small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph according to claim 1 is characterized in that: In step S3, synchronous compression wavelet transform image generation: setting synchronous compression wavelet transform parameters, processing each sample signal, generating an image and saving its image parameters for use in subsequent steps; Synchronous compression wavelet transform (SWT) is an improved wavelet transform technology that combines the advantages of synchronous transform and wavelet transform and is used to represent the time-frequency characteristics of signals. SWT is based on continuous wavelet transform (CWT) and combines synchronous compression technology to make the result have higher time-frequency resolution. This technology is used to adjust the time-frequency distribution of wavelet transform to make the energy more concentrated. The formula is as follows: Where f is the frequency, W x (a, b) is the result of CWT, and its basic formula is as follows: Where x(t) is the signal, ψ is the mother wavelet, a and b are the scale and displacement parameters respectively, and ψ * is the complex conjugate of the mother wavelet, and the scale a is usually determined by the number of octave divisions N v and scale level j, and its formula is expressed as follows:
6. The small sample bearing fault diagnosis method based on time-frequency graph dual-stream CNN and SVM according to claim 1 is characterized in that: In step S3, after undergoing SWT, the SWT complex matrix is obtained, which represents the complex amplitude of the signal at different times and frequencies, where the modulus of the complex number is the amplitude and the phase describes the phase information of the signal in the time-frequency domain. The matrix is converted into a visual two-dimensional synchronous compressed wavelet transform time-frequency diagram.
7. The small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph according to claim 1 is characterized in that: In step S4, a fault diagnosis model of a multi-input neural network model is established, and the processed STFT and SWT feature image data are loaded and divided into a training set and a test set. Each type of data is divided according to a proportion, and a multi-input neural network model, a two-stream convolutional neural network, a two-stream CNN is constructed. The model includes two input branches, which process the STFT and SWT feature images respectively, and set the structure of each layer of the neural network, including a convolution layer, a pooling layer, a batch normalization layer and a fully connected layer, and extracts features through multi-level convolution and pooling operations.
8. The small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph according to claim 1 is characterized in that: In step S4, for the input feature map X and the convolution kernel W, the output Y of the convolution operation is expressed as: Where X is the input feature map, size is H×W×C; W is the convolution kernel, size is H f ×W f ×C×K; C is the number of channels, and K is the number of input channels; b k is the bias of the kth convolution kernel; Y is the output feature map, with a size of H′×W′×k; After the convolution operation, the ReLU activation function is applied: Z i,j,k =ReLU(Y i,j,k )=max(0,Y i,j,k ) (8) Batch normalization is used to speed up training and stabilize the network: where μ k is the mean of the kth feature map, is the variance of the kth feature map, ∈ is a small constant used to prevent division by zero errors; Perform the maximum pooling operation: Perform an average pooling operation: Expand the pooled feature map into a one-dimensional vector and input it into the fully connected layer: Where: P is the feature vector after pooling, V is the weight matrix of the fully connected layer, and ci is the bias of the fully connected layer; Fusion of features from two different paths, STFT and SWT: F fusion =F1+F2 (13) where F1 and F2 are features extracted from the STFT and SWT pathways, respectively.
9. The small sample bearing fault diagnosis method based on dual-stream CNN and SVM of time-frequency graph according to claim 1 is characterized in that: In step S5, features are extracted from the trained CNN and input into the support vector machine SVM for training and testing. Finally, the prediction accuracy of the SVM is calculated. The mathematical formula of the decision function of the SVM is expressed as follows: Where: α i is the Lagrange multiplier; y i is the label of the training sample; K(x i ,x) is the kernel function; b is the bias; Fault classification is achieved by corresponding the decision function f(x) to the label.
Citation Information
Patent Citations
Bearing automatic fault diagnosis method and system based on energy ratio and energy sum
CN117686226A
Motor fault diagnosis method and device based on improved transfer learning model
CN117949823A
Bearing fault diagnosis method based on multi-input CNN
CN114624027A
Bearing fault diagnosis method based on fused convolutional neural network and optimized SVM
CN115034262A
Aero-engine bearing fault diagnosis method based on variational mode decomposition and residual network
US20230358638A1
Cited By
Bearing life prediction method based on amplitude-phase characteristics and time-frequency domain self-supervision
CN119004122A
Weak damage diagnosis method and system for tapered roller bearing
CN119860921A
A method and system for diagnosing a slight damage of a tapered roller bearing
CN119860921B
Method and device for detecting unknown attack of Internet of Things and medium
CN120415924A
Fault identification method for permanent magnet synchronous motor
CN121348085A
