Spiral bevel gear is widely used in aviation, automotive, shipping, and other fields due to their advantages of stable transmission ratio, strong load-carrying capacity, low transmission noise, and long service life. However, the tooth surface of spiral bevel gear is a very complex spatial surface, which presents great difficulties in the processing and measurement of spiral bevel gear. The measurement technology of spiral bevel gear directly affects their processing accuracy, and currently, the Coordinate Measuring Machine (CMM) is an effective equipment for measuring the tooth surface of spiral bevel gear.
When measuring the tooth surface shape of spiral bevel gear using a CMM, the measurement points need to be set in advance, and then the measurement is carried out point by point. Increasing the number of measurement points is an effective way to improve the measurement accuracy, but as the number of measurement points increases, the optimization of the measurement path becomes particularly important. The optimization of the measurement path directly affects the measurement efficiency, especially when the measurement points are distributed unevenly, this influence is more obvious. In addition, an incorrect measurement path planning may lead to a collision between the probe and the workpiece. Therefore, the optimization of the measurement path is essential, as it can not only reduce the idle running during the measurement process but also complete the measurement work with the shortest path under the premise that the probe and the workpiece do not collide, thereby improving the measurement efficiency.
The Particle Swarm Optimization (PSO) algorithm is an evolutionary algorithm based on the study of the foraging behavior of bird flocks. In the PSO algorithm, the solutions to the optimization problem are considered as small particles in the search space and extended to an N-dimensional space. Each particle in the N-dimensional space is described by a corresponding vector, and the flight speed of the particle in the space is also described by a corresponding vector. The PSO algorithm is essentially an iterative optimization algorithm that uses iterations to find the optimal value.
However, the traditional PSO algorithm is prone to premature convergence and getting stuck in local optima during the iteration process. To improve the performance of the PSO algorithm, this paper proposes the following improvements:
1.Improvement of the Weight Coefficient: The weight coefficient directly affects the inheritance of the current speed by the particle, as well as the balance between the exploration and exploitation capabilities of the particle. To overcome the disadvantage of the traditional linearly decreasing weight coefficient that may fail to find the optimal point and get stuck in local optima, this paper adopts the random weight method. Specifically, if the particle is close to the best point in the early stage of the algorithm, the random weight method will generate a smaller weight value to improve the convergence speed of the algorithm. If the algorithm cannot find the best point in the early stage, the random weight method can enable the algorithm to easily escape from the local optimum. The formula for the weight coefficient is as follows:
where is a random number obeying the standard normal distribution, and is a random number between 0 and 1.
2. Improvement of the Learning Factor: In the PSO algorithm, in addition to the weight coefficient, the learning factor also has an important impact on the performance of the PSO algorithm. For the PSO algorithm, a larger and a smaller in the early stage of the algorithm can enable it to have a better global search ability and search for the optimal solution in a larger range. In the later stage of the algorithm, a larger and a smaller can enable it to have a better local search ability. Therefore, to improve the global and local search abilities of the PSO algorithm, this paper uses a nonlinear change method to improve the learning factor, as shown in the following formula:
where is the maximum number of iterations, and is the current iteration number.
The improved PSO algorithm flow is as follows:
Step 1: Set the relevant parameters of the PSO algorithm (population size, maximum number of iterations, maximum and minimum values of the random weight mean, and random weight variance), and randomly initialize the positions and velocities of the particles in the population.
Step 2: Calculate the fitness value of each particle, save the current position and fitness value of each particle, and compare the fitness values of all particles, and assign the optimal value to .
Step 3: Update the velocity and position of the particles using Equation (4).
Step 4: Update the weight and learning factor using Equations (5) and (6).
Step 5: Compare the fitness value of each particle with the best position. If the fitness value of the particle is better, it is regarded as the current best position, and the current and are updated.
Step 6: Determine whether the algorithm stop condition is met. If it is met, the algorithm stops and outputs the final result; otherwise, the algorithm jumps to Step 2.
To verify the performance of the proposed algorithm, the genetic algorithm, the traditional PSO algorithm, and the improved PSO algorithm in this paper are used to optimize the measurement path, and the optimization results of the three algorithms are compared. The distribution of the tooth surface measurement points of the spiral bevel gear measured by the CMM is shown in Figure 2, with a total of 70 points. To make the comparison results more convincing, the three algorithms are independently run 30 times, and the mean values are taken for comparison. The running results of the three algorithms are shown in Table 1.
Algorithm Name | Optimized Path (mm) | Computation Time (s) |
---|---|---|
Genetic Algorithm | 308.697 | 28.663 |
Traditional PSO | 253.663 | 19.663 |
Improved PSO | 149.542 | 7.562 |
From the comparison results in Table 1, it can be seen that the optimal path obtained by the improved PSO algorithm proposed in this paper is better than the other two algorithms, followed by the traditional PSO, and the effect of the genetic algorithm is the worst. In addition, by comparing the computation time of the algorithms, it can be found that the improved PSO algorithm proposed in this paper also has the highest computation efficiency.
To more intuitively observe the running process of the algorithm, Figure 3 shows the comparison of the running situations of the three algorithms in a certain run. It can be seen from the figure that the traditional PSO algorithm quickly falls into the local optimum, and although the genetic algorithm can jump out of the local optimum in the initial stage, its convergence ability is worse than the other two algorithms. The improved PSO algorithm proposed in this paper has a slower convergence speed but a smaller fitness value. This further indicates that the random weight method and the nonlinear change learning factor proposed in this paper enable the algorithm to have better global and local search abilities, can jump out of the local optimum, find the true optimal solution, and improve the running efficiency of the algorithm.
In conclusion, the measurement path obtained by the improved PSO algorithm proposed in this paper is significantly shorter than that of other algorithms, and the running time is shorter. Therefore, the method proposed in this paper can effectively reduce the measurement cost and improve the measurement efficiency of the tooth surface of spiral bevel gear, providing an effective reference for the optimization of the tooth surface measurement path of spiral bevel gear.
In the future research, we can further explore the application of other optimization algorithms in the measurement path optimization of spiral bevel gear, and compare their performance with the improved PSO algorithm. Additionally, we can consider combining multiple optimization algorithms to achieve better optimization results. Moreover, the influence of different measurement point distributions on the measurement path optimization should also be studied to further improve the measurement accuracy and efficiency. Finally, the practical application of the optimized measurement path in the actual production process needs to be verified to ensure its feasibility and effectiveness.