Application of SVM Optimized by IPSO in Rolling Bearing Fault Diagnosis

Aiming at the problem that the classification effect of support vector machine (SVM) is not satisfactory due to improper selection of penalty factor C and kernel parameter g, this paper proposes a new modified classifier that uses the improved particle swarm optimization (IPSO) to optimize the parameter of SVM (IPSO-SVM) by introducing the dynamic inertia weight, global neighborhood search, population shrinkage factor and particle mutation probability. The classification result is tested by Common data sets named BreastTissue、Heart and Wine from the Libsvm toolbox, the results show that IPSO-SVM classifier is obviously superior to SVM and PSO-SVM classifier in terms of prediction accuracy and classification time.Then it is applied to the fault diagnosis in two classification problems and multiple classification problems of rolling bearings. The simulation results show that the IPSO-SVM classifier has stronger global convergence ability and faster convergence speed, and the ideal classification results can be obtained. Finally, the IPSO-SVM classifier is used to diagnose the fault of the actual bearing. The results show that the classifier has a better classification stability and is worthy of further promotion in engineering field.


Introduction
Rolling bearing is an important part of rotating machinery. Its running state directly affects whether the whole equipment can work normally. Once failure occurs, it will cause a chain of destruction and bring unnecessary economic loss [1~3].
However, the selection of SVM parameters (such as penalty parameter C and kernel parameter g) has a great influence on the classification effect. Therefore, some scholars apply intelligent search algorithm to find the optimal parameters of support vector machine [4~7].
To sum up, this paper proposes a new classifier based on improved particle swarm optimization to optimize SVM parameters, making it play an advantage in rolling bearing fault diagnosis 2 Optimization of SVM parameters using improved Particle Swarm Optimization algorithm 2

.1 SVM basic theory
The core idea of SVM is to maximize the spacing between categories, giving them greater credibility and generalization, and which data points near the border are called support vectors [8].SVM is usually designed as a two-classifier to find a positive class and a negative class to segment the sample. The optimal hyperplane can be obtained by nonlinear mapping.From the computational geometry, the hyperplane is understood, and the maximum geometric interval is equivalent to the minimization  .
When the sample set is linear and inseparable, the idea of "soft spacing" is introduced [9], that is, the existence of a small number of outlines is allowed, are often added, and a penalty factor C is required, which represents the degree of tolerance of outliers. It is one of the important parameters that affect the classification performance of SVM.as shown in the following: The common method to solve the linear inseparability problem is to map a low-dimensional sample set to a high-dimensional sample set, which is called kernel function. The commonly used kernel functions include polynomial kernel function, radial basis kernel function, multilayer perceptual neuron kernel function and so on. By introducing kernel functions ) , ( j i x x k and Lagrange multipliers i  , we write the formula (1) as a dual form: It has been proved in reference [10] that the radial basis function has better universality, and its expression is: where g is the kernel parameter, which represents the width of the kernel function, is another important parameter affecting the classification performance of SVM. Therefore, in order to ensure the good performance of SVM classifier, appropriate penalty factors C and kernel parameters g must be selected.

IPSO algorithm
The paper proposes a IPSO algorithm to optimize the parameters of SVM. The algorithm is based on the traditional basic particle swarm optimization (PSO) algorithm, which introduces dynamic inertia weight, global neighborhood search, population shrinkage factor and particle mutation factor to accelerate the convergence speed and improve the search accuracy. It effectively solves the problem that PSO algorithm is easy to fall into local optimum. The velocity and the position of the particles at the next iteration (k) are calculated in terms of the values at current iteration (k-1) as follows: where i is the index of particle, j is the index of position in particle, ω is called the "inertia weight" that controls the impact of the previous velocity of the particle on its current one.is the velocity of the i th particle in swarm on j th index of position in learning factors, respectively, which are called "acceleration coefficients".
In this paper, the basic particle swarm optimization (PSO) algorithm is improved in the following four aspects, and a new algorithm(IPSO algorithm) is formed.
1.By changing the original fixed inertia weight and introducing a dynamic velocity inertia weight, It is defined as the form of the product between an exponential function and a random number distributed in the interval [0.0,1.0].such as formula (6) and (7).
where ) ( rand is the random numbers in the interval [0.0,1.0], k is the current number of iterations, K is the maximum number of iterations (set at the beginning), has confirmed the law of variation with the number of iterations. In the initial stage of search, it is possible for inertia weigh to take a larger value in order to enhance the global search ability, and in the later stage of search, it is very possible for inertia weigh to take a smaller value in order to improve the ability of searching for local space solution.
2.Considering the existence of better particles near the neighborhood of global and local optimal particles, a small perturbation is added to the global and local optimal solutions by using the method of global domain search, as shown by formula (8).In this way, the algorithm can be avoided from falling into local optimum, and its ability to develop the solution space can be improved. 3.The population contraction factor  is introduced.
In the process of operation of the algorithm, if the diversity of the population decreases gradually, the population does not approach the global optimal position any more, but moves away from the location one after another, which is equivalent to performing the "diffusion" operation, and when the diversity of the population increases gradually, The population began to move closer to the overall optimal position, that is, the "attraction" operation was performed [12].Therefore, it is necessary to introduce a contraction factor to ensure the convergence of the algorithm. The calculation expression of the shrinkage factor is shown in the formula (9).
where l is the equilibrium factors of "diffusion" and "attraction" operations . The experimental results show that the population diversity can be maintained properly 4.Inspired by the idea of genetic algorithm mutation, the particle is initialized with a probability of 10% after each update of the speed and position, which expands the search space, which not only keeps the particle activity but also ensures the diversity of the population. It effectively avoids the precocity of the algorithm.
In summary, the steps of the IPSO-SVM algorithm are summarized as follows:  Parameter initialization.Suppose the population size, learning factors 1 c and 2 c , iteration times K , maximum and minimum of inertia weight, the disturbance size, The population contraction factor, parameter C and g .  The position and velocity at which the initial particle is randomly generated. The fitness of each particle is calculated, the individual extreme value and the global extreme value are sorted out, and the average fitness of each generation population is calculated.  Update particle velocity and position information.
The velocity of each particle is updated according to formula (6)~ (8), and the position of particle is updated according to formula (9) ~ (10), and then the adaptive mutation operation of particle is performed with a probability of 10%.  Test termination conditions. Determine whether to reach the maximum number of iterations (or reach the precision requirements), if so, output the optimal parameters C and g , otherwise return to step b.  Input the optimal parameters C and g into the SVM classifier. The training data set has the best feature, and then applies to the test data set.  The test results of fault classification are obtained, and the performance index of the results is analyzed.

Proof of algorithm
Three groups of data sets, Breast Tissue, Heart and Wine, are selected from the Libsvm common data sets as simulation samples to verify the classification effect of the improved classifier IPSO-SVM in MATLAB R2013a. The Breast Tissue data set is the result of an analysis of breast cancer diagnosis. Is one of the data sets commonly used in machine learning literature. The Heart data set is a comparison of two different heart disease patterns. The Wine data set is the result of chemical analysis of three different varieties of wine in the same region of Italy.
The range of parameter C is [0.1 100], and the range of parameter g is [0.011 1000].In the particle swarm optimization algorithm, the population size of PSO-SVM and IPSO-SVM is 20, the evolutionary algebra is 200 times, the learning factors 1 c and 2 c are 1.5 and 1.7 respectively, the maximum inertia weight is 0.9, the minimum is 0.4, the shrinkage factor is 0.7298, and the probability of individual variation is 10.The classification accuracy and time of these three classifiers for Breast Tissue, Heart and Wine data sets are shown in Table 1. As can be seen from Table 1, IPSO-SVM classifiers have superior classification performance for three data sets with different sample dimensions and different sample totals. Compared with the other two classifiers, the IPSO-SVM classifier has the highest prediction accuracy and the shortest calculation time.

Application of IPSO-SVM classerfier in fault diangosis of rolling bearing
As shown in Figure 1 , the flow chart of the IPSO-SVM classifier in the fault diagnosis of rolling bearing mainly includes data acquisition , feature extraction , division data , parameter optimization and category prediction . Single point faults were introduced to the test bearings using electro-discharge machining.Vibration data was collected using accelerometers, multiple groups of data are obtained under different conditions. The bearing monitored is a deep groove ball bearing manufactured by SKF, rotational speed of 1797rpm and sampling frequency of 12KHz are selected.
The validity of the proposed method is verified by the data of four states. at normal condition, the inner raceway fault, the outer raceway fault, and rolling element fault. In addition, the defective diameters of slight fault and serious fault are 0.007in.and 0.021in respectively.

Multi-classification fault data acquisition and feature extraction
The performance of IPSO-SVM classifier is verified by taking four classification problems as an example. Four cases of slight fault grade (pitting diameter 0.007 in) are selected: bearing normal, inner raceway fault, outer raceway fault and the rolling body fault, which are set up as label 1˛2 ˛ 3 and 4 respectively. 4096 data points are collected in each state. The 13 dimensional fault eigenvector is obtained by EMD decomposition and Hilbert-Huang envelope spectrum analysis. 60 samples are selected in each state, a total of 240 samples are selected. It was randomly divided into two parts, 120 as training samples and 120 as test samples.

Fault diagnosis result analysis
The fault diagnosis of rolling bearings for 4 classification problems is carried out. The performance comparison and classification results of each classifier are shown in Table 2 and Figure2~4.From the comparison of the prediction accuracy and classification time of each classifier in Table 2, we can see that the classification effect of IPSO-SVM classifier is the best, and from Figure2~4, we can clearly see that the IPSO-SVM classifier has the least number of misclassified samples.
Figure5~6 shows the fitness curve of two particle swarm optimization algorithms, PSO-SVM does not reach its optimal fitness, it not only converges slowly, but also tends to fall into local optimum, while IPSO-SVM has converged in the second generation and quickly jumped out of the local optimal solution. Not only the global optimum fitness can be achieved rapidly, but also the fastest convergence rate can be obtained, which improves the efficiency of fault classification.    Combined with the above analysis, the following results can be obtained:  The parameters C and g directly affect the classification accuracy. The SVM classification accuracy optimized by the parameters can be improved significantly, which shows the importance of parameter selection in the fault diagnosis of rolling bearings.  The classification performance of IPSO-SVM classifier is more stable. Unlike PSO-SVM classifier, it is not easy to fall into the local optimal solution, resulting in the decrease of classification accuracy and the slow convergence time.  The SVM classifier is more suitable for solving the two-classification problem. When dealing with the multi-classification problem, the prediction accuracy drops sharply, while the IPSO-SVM classifier can obtain the highest prediction accuracy and the shortest classification time for both the twoclassification problem and the multi -classification problem. Therefore, it is more suitable for fault diagnosis of rolling bearings.

Conclusion
SVM is a commonly used fault diagnosis classifier. The selection and optimization of its parameters is very important to the classification effect of the classifier. In this paper, an improved classifier based on IPSO parameter optimization is proposed. Three Libsvm data sets, two-classification problems of rolling bearing fault diagnosis and multiple-classification problems are simulated and analyzed. The superior performance of IPSO-SVM classifier is verified by comparing with SVM and PSO-SVM classifiers. It not only improves the accuracy of classification prediction, but also shortens the time of classification. It is found that fault samples with the same amplitude and similar frequency spectrum are prone to misclassification. The method to solve this problem is to use a variety of signal processing techniques to extract more effective fault feature vectors.