A Bearing Fault Diagnosis Method Based on Dictionary Learning and Parameter-Optimized Support Vector Machine

Aiming at the problem of fault diagnosis, a novel method based on dictionary learning and parameter-optimized Support Vector Machine (SVM) was proposed in this paper and applied it to bearing fault diagnosis. Firstly, the collected bearing fault signals are transformed into gray images after data processing. Then, using dictionary learning, the gray images are denoised and output them as signal data. Finally, the SVM multi-classification model obtained by using Grid Search (GS) algorithm to optimize penalty parameter c and kernel function parameter g is used to classify and identify the fault type. This paper is based on data from Case Western Reserve University Bearing Center for experimental verification. The results show that the proposed model can continuously achieve the accuracy of 100% in the process of bearing fault diagnosis in different environments, which proves that the proposed method can accurately and effectively realize the fault diagnosis classification of bearings.


Introduction
Bearing is one of the most important parts in mechanical equipment [1][2][3]. In addition, the development of machinery and equipment will directly affect the development of multiple industries such as manufacturing, transportation, and aerospace. Therefore, it is of great significance to study bearing fault diagnosis methods. Different solutions available in the literature to solve this problem have been reviewed [4][5][6]. For example, In [7], the authors use empirical mode decomposition and energy operator demodulation to extract the features of the fault signal, and then use the feature vector for classification and recognition. By processing the original signal data from multiple methods such as time domain, frequency domain and time-frequency, features are extracted from the encoder to obtain a good diagnosis result in [8]. Sun [9] uses compressed sensing to compress the data, and then uses SAE to extract fault features. This method can still have a good diagnosis effect when it is used in an industrial environment with a large amount of data. Sohaib [10] and others combine a hybrid feature pool with a deep neural network based on sparse stacked self-coding to propose a two-layer rolling bearing fault diagnosis model. In [11], Eren et al proposed a general-purpose rolling bearing intelligent fault diagnosis system based on a compact adaptive one-dimensional convolutional neural network, which provides a new idea to solve the problem of traditional rolling bearing intelligent fault diagnosis methods being limited by training data sets and test data sets. Although some achievements have been made in bearing fault diagnosis research, there is still a lot of research space. Such as, in some studies, high accuracy can only be obtained when using data in a specific environment for classification. And there are some algorithms that do not show good performance when using small samples. In addition, during the experiment, the accuracy of the fault diagnosis of the bearing changes with the changes in the number of samples in the training set and the test set. This may be due to the instability of the fault diagnosis model. Therefore, we need a bearing fault diagnosis method that has stable performance and can adapt to complex environments. In view of the above analysis, a bearing fault diagnosis method combining dictionary learning and SVM optimized by GS was proposed to realize the intelligent diagnosis of rolling bearing faults. First, the original signals are denoised through dictionary learning after data processing, and then the bearing fault categories are identified using the SVM classification model optimized by GS. Experiments show that the proposed method can not only achieve accuracy of 100% when diagnosing sample data collected in different environments, but also can maintain accuracy of 100% steadily in experiments on small samples or different training samples and test samples.

Dictionary Learning
The concept of a dictionary was proposed by Mallet, Stephane G, and Zhang Zhifeng [12] for the field of signal processing in 1993. The main idea is to sparsely represent signals through a dictionary defined by prior knowledge. Dictionary learning was proposed by Michal Aharon, Michael Elad, and Alfred Bruckstein [13] in 2006. The difference from the previous dictionary is that dictionary learning no longer uses a dictionary defined based on prior knowledge, but dictionary and signal representation are alternately trained according to sample data to obtain the final dictionary. The dictionary learning can be divided into different types according to the different update method of dictionary. In the experiment, the update method of dictionary is K-SVD. The main idea of K-SVD algorithm is shown below.
Algorithm: Dictionary Learning(K-SVD) Input: original sample, dictionary, sparse matrix , repeat steps 2-3 below until the specified number of iteration steps is reached or converge to the specified error.

2.
Sparse coding: use the dictionary ) ( D j obtained in the previous step, and sparse encoding to get

3.
Dictionary update: gradually update the dictionary ) ( ii. Take out the index set of the k -th row vector k T X of the sparse matrix that is not 0 iii. Take out columns corresponding to k  which is not 0 from k E and get ' E k iv. Perform singular value decomposition for ' E k , and take the first column of U to update the k -th column of the dictionary. Order

The Model of GS-SVM
SVM was first proposed by Vapnik [14]. SVM is mainly composed of two-classification support vector machine and multi-classification SVM. Among them, the multi-classification SVM is constructed by many two-classification SVM through certain rules. In the two-classification SVM, the C-SVC model is the most common model. And the mathematical expression is as follows: (1) Suppose the known training set: x is feature vector.
(2) Select suitable radial basis kernel function from various kernel functions. Then introduce Lagrange multipliers  and KKT conditions to construct the optimization problem: Get the optimal solution: When dealing with multi-classification problems of rolling bearing faults, it is necessary to construct appropriate multi-class classifiers. The construction methods of multi-class classifier mainly include one-to-one method, one-to-many method and directed acyclic graph method. In the experiment, the multi -classifier of SVM is constructed by one -to -one method. The GS algorithm is an exhaustive search method for specifying parameter values to select the best hyper parameters for the model. The best learning algorithm is obtained by using the cross-validation method to optimize the parameters of the estimation function. That is, the possible values of each parameter are arranged and combined, and all possible combinations are listed to generate a "grid". Then, each combination is used for SVM training, and cross-validation is used to evaluate the performance. The hyper parameter combination with the highest average score is used as the best choice, and the model object is returned. Because the performance of SVM depends on its parameter selection, this paper chooses an intelligent optimization algorithm to optimize the parameters of SVM. Among many intelligent optimization algorithms, ACO [15], GA [16] and PSO [17] have many problems in performance such as large computational overhead and slow convergence when optimizing parameters. Therefore, in this paper, the grid search algorithm with fast convergence speed and high accuracy is used to optimize the parameters of the support vector machine to improve the accuracy of bearing fault diagnosis.

The Method Proposed I n This Paper(K-SVD-GS-SVM)
Based on the above analysis and theoretical basis, a fault diagnosis method based on dictionary learning and parameter optimization support vector machine was proposed and applied to bearing fault diagnosis. The flow chart is shown in Figure 1. The specific steps are as follows.
Step 1: data pre-processing. Take 1000 data points as a sample to intercept 10 types of fault data without overlapping, and this paper intercept 100 samples for each type of data. Then, we need to convert each type of data sample matrix into a grayscale image. Step 2: set the dictionary learning parameters and denoise the grayscale images of each type of sample through the dictionary learning algorithm, then output the grayscale images as the signal sample data.
Step 3: build the SVM model and set the parameters of the GS optimization algorithm to optimize the parameters of the SVM to classify the fault data.
Step 4: get the accuracy of fault diagnosis

Data Description
The experimental data in this article comes from the Bearing Data Center of Case Western Reserve University in the United States. The 6205-2RSSKF deep groove ball bearing that supports the motor drive shaft end is used as the test bearing. The data is collected in four states: 0HP, 1HP, 2HP, and 3HP. The sampling frequency is 12 kHz. The bearing states identified in the experiment mainly include normal states, inner ring faults, outer ring faults, and ball faults, and each fault state includes three types of faults with different degrees of damage: diameters of 0.007inch, 0.014inch, and 0.021inch. Therefore, we have a total of 10 types of fault states. In the experiment, 100 samples of each type of fault signal are intercepted without overlap, and each sample includes 1000 data points. It is important to note that the sample data set used in experiment 4.1 in this paper is shown in Table 1. In the experiment of 4.2, we selected data in Table 1

Performance under Different Load
In the experiment, dictionary learning is first used to denoise the grayscale images after data preprocessing, and then the SVM model optimized by GS is used for classification and recognition. Denoising through dictionary learning can eliminate noise in the industrial environment, thereby get better features for classification. Figure 2 show the grayscale images converted from the original sample under 0 load. The grayscale images after dictionary learning are shown in Figure 2. It can be seen from Figure 2 and Figure 3 that dictionary learning has particularly obvious effect on sample images. When dictionary learning is not performed, the overall sample image is in a fuzzy state, and the identification degree between each type of data sample is not high. After performing dictionary learning to denoise the sample images, the clarity of the entire sample has been significantly improved. At the same time, the degree of identification between various types of sample data also becomes obvious. Therefore, the application of dictionary learning to denoise sample data is of great significance to the final classification and recognition.   Table 2, the accuracy of SVM in bearing fault diagnosis is greatly affected by different environments and the diagnostic accuracy is lower than other methods. After using dictionary learning to denoise the data, the accuracy of A and C samples has improved to varying degrees compared to SVM, and the accuracy of B and D samples has decreased, which  indicates that the sample classification results after dictionary learning denoising are not stable. After using GS to optimize the SVM parameters, the accuracy of bearing fault diagnosis has been significantly improved compared to the SVM model. In the experiments of sample sets C and D, the accuracy of GS-SVM improved by 13.43% and 14.14% compared with SVM. This shows that using GS to optimize SVM is of great significance to improve the accuracy for bearing fault diagnosis. It can be seen from Table 2 that the accuracy of the method proposed in this paper can reach 100% when identifying and classifying various types of sample data collected in different environments.

Effect of the Different Ratio between Training Samples to Test Samples
In the course of the experiment, some methods may cause disparity in the accuracy of bearing fault diagnosis due to different ratios between training samples and test samples. In other words, the performance of these algorithms is not stable enough in experiments. Therefore, this paper tests under multiple sample ratios to verify the stability of the method. The experimental results are shown in Table 3. It can be seen from Table 3 that in the bearing fault diagnosis, the accuracy of the SVM model is greatly affected by the ratio of the training samples to the test samples, and the diagnostic accuracy is lower than other methods. And the diagnostic accuracy rate differs by 9.2%. After the dictionary learning denoising, the accuracy rate is relatively stable when using SVM to test under different sample proportions, and the accuracy difference of diagnosis is 5%. Similarly, when using the GSoptimized SVM model to test under different sample proportions, the diagnostic accuracy differs by 3.91%. In summary, regardless of whether the SVM, K-SVD-SVM or GS-SVM model is tested at different sample proportions, it will be affected to a certain extent. But on the issue, the method proposed in this paper can consistently achieve the accuracy of 100% in many experiments.

Conclusion
This paper proposed a bearing fault diagnosis method based on dictionary learning and GS-optimized SVM. In the experiment, the signal sample data is converted into grayscale images for denoising. Secondly, SVM classifier with high generalization ability for small sample data and avoiding local minimum values is selected. The parameters of SVM are optimized by the GS optimization algorithm to solve the problem that performance of SVM is greatly affected by parameters. Through experimental verification, the proposed method not only achieves accuracy of 100% on the sample sets collected in different environments, but also shows stable and good performance for different ratios between train samples and test samples in the experimental process. Therefore, the method proposed in this paper can be used to bearing fault diagnosis in complex realistic and experimental environments, which provides new ideas for bearing fault diagnosis. In addition, the method presented in this paper is also applicable to small-scale data bearing fault diagnosis experiments. In summary,