A bearing fault detection method based on improved sparrow search algorithm
By improving the sparrow search algorithm and optimizing the SVM algorithm parameters, the problems of local optimality and slow convergence in bearing fault detection are solved, and more efficient fault detection effects are achieved.
Patent Information
- Application Number
- CN202310352691.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-04-04
AI Technical Summary
The existing intelligent optimization algorithms are prone to falling into local optimal solutions in bearing fault detection, slow convergence speed and low convergence accuracy, resulting in low fault detection accuracy.
The improved sparrow search algorithm is adopted to optimize the parameters of the SVM algorithm by introducing inertial weights and adaptive mutation strategies, including population initialization, finder updates and local optimal mutation strategies, and improve the convergence and accuracy of the algorithm.
It improves the accuracy and efficiency of bearing fault detection, avoids local optimal solutions, and enhances the classification performance of SVM algorithm.
Smart Images

Figure CN116380460B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor equipment, and in particular to a bearing fault detection method based on an improved sparrow search algorithm. Background Art
[0002] A motor bearing supports the motor shaft. The motor shaft passes through the inner ring of the bearing, while the outer ring is fixed to the motor housing. A ball bearing has a ring of balls between the inner and outer rings. When the motor rotates, the inner ring rotates, and the balls move with it. The use of bearings prevents significant friction between the motor shaft and the motor housing. The lifespan and reliability of the bearings are crucial to the lifespan of the main machine. Anything rotating in mechanical equipment contains bearings. Bearings are precision parts. Indentations and cracks in the inner and outer rings and the bearing balls can negatively impact bearing performance, ultimately shortening the lifespan of the equipment. Mechanical fault diagnosis has previously relied solely on extensive manual analysis to analyze the cause of the fault. Therefore, machine learning methods are being considered for fault diagnosis.
[0003] The core of bearing fault detection lies in efficient and accurate fault classification. The key component is the classifier, whose performance depends largely on the selection of initial parameters. Applying swarm intelligence algorithms to classifier parameter optimization can significantly improve the performance of intrusion detection systems. Support Vector Machine (SVM) is a classification model used in traditional machine learning algorithms. Its model definition is a linear classifier with the largest margin in feature space. It is highly robust, generally insensitive to dimensionality, and suitable for learning from small sample data. Compared with other traditional machine learning algorithms, it has stronger generalization capabilities, making it suitable for bearing fault detection.
[0004] Scholars have conducted extensive research on motor bearing fault detection, proposing methods such as recursive least squares, least squares with forgetting factors, universal adaptive stabilizers, and intelligent optimization algorithms. Numerous intelligent optimization algorithms exist, including particle swarm optimization (PSO), genetic algorithms (GA), gray wolf optimization (GWO), ant colony algorithms (AG), and artificial bee colony algorithms (ABC). While these algorithms have achieved promising results in model parameter identification, they still suffer from issues such as susceptibility to local optimal solutions, slow convergence, and low convergence accuracy. Summary of the Invention
[0005] In response to the problems existing in the above background technology, a bearing fault detection method based on an improved sparrow search algorithm is proposed to improve the convergence and convergence accuracy of the algorithm, and provide better parameters for SVM to accurately and efficiently classify, thereby solving the accuracy problem of bearing fault detection.
[0006] A bearing fault detection method based on an improved sparrow search algorithm comprises the following steps:
[0007] Step 1: Collect bearing data and identify bearing operation faults by selecting features and categories. Divide the data into training and test sets in a ratio of 7:3, named Data_train and Data_test respectively.
[0008] Step 2: Select the classic SVM algorithm to realize bearing operation fault identification, and optimize the penalty parameter C value and kernel function parameter σ in the SVM algorithm through subsequent steps;
[0009] Step 3, set the parameters of the sparrow search algorithm, and use the Chebyshev formula improved by nonlinear terms to initialize the sparrow population, and substitute the sequence value generated by the Chebyshev chaotic map into the population initialization;
[0010] Step 4: Bring the initial value community into the SVM parameters, use the classification accuracy as the fitness value, and sort them from large to small;
[0011] Step 5: Optimize the algorithm's search method during the food discovery phase by adding an inertia weight to adjust the algorithm and updating the finder's position based on the inertia weight.
[0012] Step 6: After finding the next location, the discoverer updates the two parameters of the SVM based on the inertia weight added in step 5, and recalculates the classification accuracy, i.e., the fitness value; the location with the worst fitness of the community is recorded as X worst ;
[0013] Step 7: Design an adaptive selective mutation strategy and the two conditions that need to be met for the strategy to be implemented; the two conditions are that the adaptive linear change value is less than the random number and the optimal fitness does not change after iteration; the adaptive selective mutation strategy includes two parts: Gaussian distribution perturbation and Cauchy mutation;
[0014] Step 8: Repeat steps 3 to 7 until the maximum number of iterations of the accuracy in the SVM is reached.
[0015] Step 9: Obtain the optimal fitness value, that is, the highest accuracy; record and save the values of the penalty parameter C and the kernel function parameter in the SVM algorithm at this time. In subsequent bearing fault detection, call the SVM algorithm under the saved parameters for processing to obtain the corresponding fault detection result.
[0016] The beneficial effects achieved by the present invention are:
[0017] (1) An improved Chebyshev chaotic map is introduced in the population initialization stage to increase the diversity of the population and improve the ergodicity of the sparrow individuals, so that the population can be distributed as evenly as possible in the search space, achieving a better population initialization effect;
[0018] (2) Add an inertia weight to improve the update position of the discoverer to reduce the probability of falling into the local optimum too early;
[0019] (3) An adaptive selection mutation strategy is proposed to enable sparrows to jump out when they are trapped in the local optimum, avoiding the problem of being trapped in the local optimal solution that is easy to occur in existing technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 4 is a flow chart of a method in an embodiment of the present invention.
[0021] Figure 2 Schematic diagram of optimization results of five different algorithms for the standard test function F1 in an embodiment of the present invention.
[0022] Figure 3 Schematic diagram of optimization results of five different algorithms for the standard test function F2 in an embodiment of the present invention.
[0023] Figure 4 Schematic diagram of optimization results of five different algorithms for the standard test function F3 in an embodiment of the present invention.
[0024] Figure 5 Schematic diagram of optimization results of five different algorithms for the standard test function F4 in an embodiment of the present invention.
[0025] Figure 6 Schematic diagram of optimization results of five different algorithms for the standard test function F5 in an embodiment of the present invention.
[0026] Figure 7 Schematic diagram of optimization results of five different algorithms for the standard test function F6 in an embodiment of the present invention.
[0027] Figure 8 Schematic diagram of optimization results of five different algorithms for the standard test function F7 in an embodiment of the present invention.
[0028] Figure 9 Schematic diagram of optimization results of five different algorithms for the standard test function F8 in an embodiment of the present invention.
[0029] Figure 10 Schematic diagram of optimization results of five different algorithms for the standard test function F9 in an embodiment of the present invention.
[0030] Figure 11Schematic diagram of optimization results of five different algorithms for the standard test function F10 in an embodiment of the present invention.
[0031] Figure 12 Schematic diagram of the identification results of the method in an embodiment of the present invention in a motor bearing fault diagnosis experiment. DETAILED DESCRIPTION
[0032] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings.
[0033] In order to improve the defects of the sparrow search algorithm such as easy falling into local optimality and low convergence accuracy, this paper proposes a sparrow search algorithm based on inertia weight and adaptive mutation, and improves the original algorithm from three aspects: population initialization, discoverer update strategy and mutation strategy after falling into optimality.
[0034] A bearing fault detection method based on an improved sparrow search algorithm comprises the following steps:
[0035] Step 1: Bearing data comes from the Bearing Data Center of Case Western Reserve University in the United States. Nine features are selected to identify bearing operation faults. First, the data is divided into training and test sets in a ratio of 7:3, namely Data_train and Data_test. The data set has nine features: maximum, minimum, mean, standard deviation, RMS, skewness, kurtosis, crest factor, and shape factor, and three categories: rolling element fault, inner race fault, and outer race fault. Fault identification needs to be performed based on the bearing characteristics.
[0036] In step 2, the classic SVM algorithm is used to identify bearing faults. To improve classification accuracy, two parameters in the SVM algorithm need to be optimized: the penalty parameter C and the kernel parameter σ. The penalty parameter balances the classifier's misclassification risk with the complexity of the decision boundary. A smaller C value results in a simpler decision boundary, but may result in more misclassifications. A larger C value results in a more complex decision boundary, but may also lead to overfitting. The value of σ determines the distribution of the data in the feature space. When σ is small, it is equivalent to using a Gaussian distribution function in the feature space. Data points are more concentrated after being mapped to the high-dimensional space, and the decision boundary is more complex. When σ is large, it is equivalent to using a uniform distribution function in the feature space. Data points are more dispersed after being mapped to the high-dimensional space, and the decision boundary is simpler. The specific values of these two parameters are automatically optimized using an improved sparrow search algorithm.
[0037] Step 3: The parameters set include the number of populations pop, the maximum number of iterations Iter max , the ratio of discoverers, followers and early warning, the upper bound of the parameter Xub and the lower bound X lb , as well as the safety value ST, and the warning value R2; among them, the sparrow population is divided into discoverers and followers in a ratio of 8:2, and then 20% of the entire sparrow population is selected as early warning.
[0038] Step 3.1: To ensure the diversity of the initial population, the sparrow population is initialized using the improved Chebyshev formula with nonlinear terms. The improved Chebyshev formula is y n+1 =cos(((4+k)π-ksin(πy n ))*arccos(y n )), where y n is the initial value, y n+1 is the output value after iteration; k is the control order, and the new value range is k≥0. In this experiment, k=3 is selected for the convenience of calculation.
[0039] Step 3.2: Follow the formula Bring this mapping into population initialization; where X i The initial position of the sparrow; X ub and X lb are the upper and lower limits of the iteration region respectively; y i It is an improved Chebyshev chaotic map that generates sequence values.
[0040] Step 4: Bring the initial value community into the SVM parameters, use the classification accuracy as the fitness value, and sort them from large to small.
[0041] Step 5: Since the finder is often aggressive in the process of searching for food, after finding the optimal solution, other individuals quickly move towards the optimal solution, which will reduce the diversity of the population and easily fall into the local optimum. At the same time, the finder's own position is not fully utilized, which will cause the sparrows to fly over the location without careful exploration, thus losing the opportunity to search in the area. To solve these two problems, the algorithm further optimizes the search method in the food discovery stage, so an inertia weight is added. To make adjustments, the discoverer's position update formula is Where, It represents the j-th dimension position of the i-th sparrow at the current t-th iteration; It represents the j-th dimension position of the i-th sparrow at the current t+1 iteration; random value α∈(0,1]; Iter maxrepresents the maximum number of iterations; Q is a random value subject to a normal distribution; L represents a matrix with one row and d columns, all of whose elements are 1; the warning value R2 ∈ [0, 1] and the safety value ST ∈ [0.5, 1], R2 is a random value, while ST is a fixed value; if R2 < ST, it means the warning value is less than the safety value, and the place is safe, so安心觅食 can be carried out; if R2 ≥ ST, it means the warning value is greater than the safety value, and the place is not safe, and it is necessary to leave this place to forage.
[0042] Step 6: After the discoverer finds the next position, according to the addition of the inertia weight in Step 5, update the two parameters of the SVM, and recalculate the classification accuracy, that is, the fitness value; record the position with the worst fitness in this community as X worst .
[0043] Step 7: In the later stage of the sparrow algorithm iteration, the search individuals will quickly converge to one or several places, which will cause the algorithm to easily fall into local optimum and be unable to further explore better positions; to address this problem, an adaptive selection mutation strategy is designed, and two conditions need to be met for this strategy.
[0044] First, define an adaptively linearly changing value If the random number r > C, it is considered to meet the first condition of mutation. The second condition is that after two iterations, the optimal fitness has not changed, and it can be considered that the algorithm has fallen into local optimum and mutation is required.
[0045] After sorting the sparrow individuals in ascending order of fitness, set the sparrows in the first half of the fitness values to do Gaussian distribution perturbation, and the sparrows in the second half to do Cauchy mutation. The mutation formula is: In the formula: X t represents the position of the sparrow before mutation; X' t represents the position of the sparrow after mutation; pop is the number of the population; refers to the position with the optimal fitness found by the discoverer in Step 4; N(0, 1) is the standard normal distribution; cauchy(0, 1) is the standard Cauchy distribution.
[0046] Step 8: Continuously repeat Steps 3 to Step 7 until the maximum number of iterations when the accuracy Accuracy in the SVM is reached.
[0047] Step 9: Obtain the optimal fitness value, that is, the highest accuracy Accuracy; record the values of the penalty parameter C and the kernel function parameter in the SVM algorithm at this time and save them. In subsequent bearing fault detection, call the SVM algorithm under the saved parameters for processing to obtain the corresponding fault detection results.
[0048] Figure 2-11The optimization results are compared between the method in the embodiment of the present invention and the grey wolf algorithm (GWO), the whale optimization algorithm (WOA), the original sparrow search algorithm (SSA), and two improved sparrow search algorithms introduced, namely the hybrid sine-cosine algorithm and the ISSA algorithm in the flying sparrow algorithm, and the sparrow search algorithm improved with adaptive t distribution and golden sine.
[0049] For detailed descriptions of each standard test function F1-F10, please see the table below.
[0050]
[0051]
[0052] from Figure 12 From the experimental results, the SVM algorithm optimized by the improved sparrow search algorithm has higher detection accuracy for bearing faults than the SVM algorithm.
[0053] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed in the present invention should be included in the protection scope recorded in the claims.
Claims
1. A bearing fault detection method based on an improved sparrow search algorithm, characterized in that: The method comprises the following steps: Step 1: Collect bearing data and identify bearing operation faults by selecting features and categories. Divide the data into training and test sets in a ratio of 7:3, named Data_train and Data_test respectively. Step 2: Select the classic SVM algorithm to realize bearing operation fault identification, and optimize the penalty parameter C value and kernel function parameter σ in the SVM algorithm through subsequent steps; Step 3, set the parameters of the sparrow search algorithm, and use the Chebyshev formula improved by nonlinear terms to initialize the sparrow population, and substitute the sequence value generated by the Chebyshev chaotic map into the population initialization; Step 4: Bring the initial value community into the SVM parameters, use the classification accuracy as the fitness value, and sort them from large to small; Step 5: Optimize the algorithm's search method during the food discovery phase by adding an inertia weight to adjust the algorithm and updating the finder's position based on the inertia weight. Step 6: After finding the next location, the discoverer updates the two parameters of the SVM based on the inertia weight added in step 5, and recalculates the classification accuracy, i.e., the fitness value; the location with the worst fitness of the community is recorded as X worst ; Step 7: Design an adaptive selective mutation strategy and the two conditions that need to be met for the strategy to be implemented; the two conditions are that the adaptive linear change value is less than the random number and the optimal fitness does not change after iteration; the adaptive selective mutation strategy includes two parts: Gaussian distribution perturbation and Cauchy mutation; In step 7, the strategy must meet the following conditions: first, define an adaptive linear change value If the random number r>C, it is determined that the mutation condition is met; the second is that after two iterations, the optimal fitness has not changed, it is determined that it has fallen into a local optimum and needs to be mutated; Step 8: Repeat steps 3 to 7 until the maximum number of iterations of the accuracy in the SVM is reached. Step 9: Obtain the optimal fitness value, that is, the highest accuracy; record and save the values of the penalty parameter C and the kernel function parameter in the SVM algorithm at this time. In subsequent bearing fault detection, call the SVM algorithm under the saved parameters for processing to obtain the corresponding fault detection result.
2. The bearing fault detection method based on the improved sparrow search algorithm according to claim 1 is characterized in that: In step 1, the collected bearing data includes 9 features: maximum value, minimum value, average value, standard deviation, RMS, skewness, kurtosis, crest factor and shape factor, including 3 categories: rolling element fault, inner race fault and outer race fault.
3. The bearing fault detection method based on the improved sparrow search algorithm according to claim 1 is characterized in that: In step 3, the parameters set include the number of populations pop, the maximum number of iterations Iter max , the ratio of discoverers, followers and early warning, the upper bound of the parameter X ub and the lower bound X lb , as well as the safety value ST, and the warning value R2; among them, the sparrow population is divided into discoverers and followers in a ratio of 8:2, and then 20% of the entire sparrow population is selected as early warning.
4. The bearing fault detection method based on the improved sparrow search algorithm according to claim 3 is characterized in that: Step 3 includes the following sub-steps: Step 3.1, first use the nonlinear term improved Chebyshev formula to initialize the sparrow population; the improved Chebyshev formula is y n+1 =cos(((4+k)π-ksin(πy n ))*arccos(y n )), where y n is the initial value, y n+1 is the output value after iteration; k is the control order, and the new value range is k≥0; Step 3.2, according to the formula Bring this mapping into population initialization; where X i The initial position of the sparrow; X ub and X lb are the upper and lower limits of the iteration region respectively; y i It is an improved Chebyshev chaotic map that generates sequence values.
5. The bearing fault detection method based on the improved sparrow search algorithm according to claim 1 is characterized in that: In step 5, the inertia weight added is Where t represents the current number of iterations.
6. The bearing fault detection method based on the improved sparrow search algorithm according to claim 4 is characterized in that: In step 5, the position update formula for the discoverer is In the formula, represents the j-th dimension position of the i-th sparrow at the current t-th iteration; represents the j-th dimension position of the i-th sparrow at the current (t + 1)-th iteration; the random value α ∈ (0, 1]; Iter max represents the maximum number of iterations; Q is a random value following a normal distribution; L represents a 1-row and d-column matrix with all elements being 1; the warning value R2 ∈ [0, 1] and the safety value ST ∈ [0.5, 1], R2 is a random value, and ST is a fixed value; if R2 < ST, it means the warning value is less than the safety value, and the place is safe, so forage with ease; if R2 ≥ ST, it means the warning value is greater than the safety value, and the place is not safe, and it is necessary to leave this place to forage.
7. The bearing fault detection method based on the improved sparrow search algorithm according to claim 1 is characterized in that: In step 7, the adaptive selection mutation strategy is to sort the sparrows in ascending order of fitness, set the sparrows in the first half of the fitness values to be perturbed by Gaussian distribution, and the sparrows in the second half to be subjected to Cauchy mutation; the mutation formula is: Where: X t Indicates the position of the sparrow before mutation; X' t Indicates the position of the sparrow after mutation; pop is the number of the population; It refers to the position with the best fitness found by the discoverer in step 4; N(0,1) is the standard normal distribution; cauchy(0,1) is the standard Cauchy distribution.
Citation Information
Patent Citations
Chaotic adaptive differential evolution sparrow search parameter identification method for air floatation motion system
CN115562011A
Roller bearing rotating component sensor system uses SAW and BAW sensor with responses transmitted through shared antenna as frequency separated narrow band signals
DE10325667A1