Keywords

4.1 Introduction

Welding is an important part in industrial manufacturing, and welding robots are widely used in automotive, aerospace, machinery, and processing industries. With the extensive application of welding robots, more and more researches on welding robot technology have been conducted. Spot welding robot path planning is beneficial to welding process, especially when many welding joints existed. A reasonable welding path for welding robot can shorten the overall time, improve production efficiency, and reduce production costs. Otherwise, it would be time consuming when the welding path is not reasonable. The development of intelligent algorithm provides effective methods for solving path planning of welding robot problem. Currently, GA and PSO algorithms are effective methods used to solve the problem of robot path planning [1, 2].

The particle swarm optimization (PSO) algorithm is simple to implement and has less parameters [3]; hence, it has been widely used for solving both continuous optimization and discrete optimization problems in recent years, such as drilling sequence optimization for PCB circuit boards and traveling salesman problem (TSP) [1, 4]. Genetic algorithm (GA) was presented in the early 1960 by John Holland in the University of Michigan. It is a heuristic searching algorithm that mimics the process of natural selection. As a global optimization algorithm, GA simulates natural genetic selection in biological evolution and natural selection probability [5]. The idea of GA originated from Darwin’s evolution theory and Mendelian inheritance, which simulates the mechanisms of biological evolution to construct an algorithm’s iterative process. It is already used in solving the multiple welding joints optimization problems [2, 6]. In this paper, hybrid PSO is presented in Sect. 4.2 first. Then, improved PSO algorithms are presented to solve welding robot path planning problem in Sect. 4.3. At last, the conclusion is given in Sect. 4.4.

4.2 Hybrid Particle Swarm Optimization

4.2.1 GA-PSO

The diversity of particles in PSO can be improved after GA was combined due to its mutation characteristic, then the global search capability of PSO will be improved too. In Ref. [7], GA was used to initialize the particles in PSO to solve the design of a diesel engine combustion chamber, and the simulation results showed its effectiveness. However, GA is easy to fall into local optimum for large dimensional problem. The selection and crossover operations in GA were improved to ensure the diversity of particles, and a good result was obtained for the global optimization of multimodal functions [8]. In Ref. [9], the iteration of particles is updated based on probability operation of GA to realize discrete PSO application. In Ref. [10], a hybrid GA-PSO based on clustering algorithm was proposed to optimize the scheduling problem in the computer industry. Based on the above researches, a double global optimum GA-PSO algorithm is proposed to solve welding robot path planning problem in this paper.

In the particle iteration, each particle is updated based on the personal best (pbest) and global best particle (gbest). Then the ultimate solution converges to optimal or suboptimal because the particles are always updated based on pbest and gbest. But when the pbest and gbest fell into local optimal solution, the particle cannot jump out of the local optimal solutions either.

Double global optimum GA-PSO algorithm has two global optimal solutions: one is the best particle of PSO (gbest) and the other is from GA (GAbest). GA is used to search another global optimal solution, which is used for particle update. Hence, the update of particles will be influenced by three parameters: pbest, gbest, and GAbest. It will increase the diversity of particles and enhance the ability to find the optimal solution because gbest and GAbest are not relevant.

The Eqs. (4.1) and  (4.2) is the particle update equation for improved GA-PSO. Compared with the basic PSO, GAbest from GA is added in the Eq. (4.1). Thus, the particles are always updated according to the gbest, and GAbest. Mutation operator in GA will help the algorithm obtain global optimal solution, because it can help particle jump out of local optimal solution greatly.

$$ \begin{aligned} v_{i} ( {t + 1} )&= wv_{i} \left( t \right) + c_{1} r_{1} \left( {p_{i} \left( t \right) - x_{i} \left( t \right)} \right) \\ & \quad + c_{2} r_{2} (p_{g} \left( t \right) - x_{i} \left( t \right)) \\ \end{aligned} $$
(4.1)
$$ x_{i} \left( {t + 1} \right) = x_{i} \left( t \right) + v_{i} (t + 1) $$
(4.2)

4.2.2 Partition PSO

The basic discrete PSO has a good ability to find optimal solution for small-scale problems. But usually there are a lot of welding joints in the welding task, and it is hard to get the optimal solution using basic discrete PSO. Hence, the partition-PSO will be used to solve large-scale welding joints path planning problem here.

For N-dimensional welding path optimization problem, the number of the possible solutions is \( \left( {N - 1} \right)!/2 \), when N = 20, there will be more than 1016 possible solutions. For larger scale, the number will grow explosively. If the N-dimensional problem is divided into several small-scale problems, which are described as \( n_{1} ,n_{2} , \ldots n_{k} \), the number of the possible solutions will be \( \frac{{\left( {n_{1} - 1} \right)!}}{2}\,+\,\frac{{\left( {n_{2} - 1} \right)!}}{2} + \cdots + \frac{{\left( {n_{k} - 1} \right)!}}{2} \), the search space will be reduced greatly. Hence, partitioning is an effective way for large welding joints path planning problem.

Partitioning principle for particles is based on the distance between different particles. Particle \( X_{i} = (x_{i1} ,x_{i2} , \ldots x_{iD} ) \) will be divided into k zones as \( X_{i} = \left( {\left[ {x_{{i1_{1} }} ,x_{{i1_{2} }} , \ldots } \right],\left[ {x_{{i2_{1} }} ,x_{{i2_{2} }} , \ldots } \right], \ldots ,\left[ {x_{{ik_{1} }} ,x_{{ik_{2} }} , \ldots } \right]} \right) \) according to the partition principle. The first step of partition is to find the boundary points, and define k reference points from the boundary points. In order to ensure that the welding joint can get a reasonable allocation, these k reference points should be defined as decentralized as possible. Based on the above operation, all the elements in particle \( i \) can be divided into \( k \) zones. Then, PSO algorithm is used to obtain optimal welding joints sequence for different zones separately. In order to ensure the global optimal, the distance between adjacent areas in the zones should be shortest; it means that the last element in a zone and the first element in the next zone should be the nearest. Figure 4.1 is the schematic of partition-PSO algorithm.

Fig. 4.1
figure 1

Schematic of partition-PSO algorithm, a welding joints distribution, b result of partition-PSO algorithm

4.3 Welding Path Optimization

4.3.1 Definition of Welding Robot Path Planning

Welding joints sequence planning is an important issue of welding robot production, and how to find an optimal path to go through all the welding joints is the most concern. In general, there are many solutions for welding joints sequence planning, and one optimal path will be selected based on certain criteria. Hence, welding robot path planning problem can be described as obtaining a reasonable welding joints sequence for welding robot under some criteria. The criteria may be the shortest path, the least time consuming, the minimum welding deformation, or the minimum energy consumption, and so on. Therefore, the robot path planning is a constrained optimization problem. In this paper, the shortest path is used as the criterion to optimize the welding path for verifying the effectiveness of the optimization algorithms.

Considering a welding joints welding task \( C = (c_{1} ,c_{2} , \ldots c_{N} ) \), the distance between two welding joints can be described as \( d(c_{i} ,c_{j} ) \ge 0 \), where \( c_{i} ,c_{j} \in C \)(1 ≤ i, j ≤ N), \( c_{i} \) stands for a welding joint. The task in this paper is to find the best welding joints sequence \( \pi = \{ c_{1} ,c_{2} , \ldots c_{N} ,\} \) to make sure the total path length of the welding robot is minimal.

$$ f(\pi ) = \sum\limits_{i = 1}^{N - 1} {d\left( {c_{i} ,c_{i + 1} } \right) + d\left( {c_{N} ,c_{1} } \right)} $$
(4.3)

where \( f\left( \pi \right) \) denotes the distance when the welding path is \( \uppi \).

4.3.2 2D Welding Path Planning

Above algorithms are used for a two-dimensional path planning problem where 40 welding joints exist. Figure 4.2a shows the comparison of the convergence curves of GA, PSO, partition-PSO, and GA-PSO. It can be seen that the curve based on GA-PSO converges much faster than any other algorithm. Figure 4.2b is the path planning result of GA-SPO algorithm. The optimization results and convergence speeds of various algorithms are given in the Table 4.1. The search capability of basic PSO is better than basic GA in both best solution and convergence speed. The 40 welding joints are not a large-scale optimization problem; hence, basic PSO has a good effect, and the result of PSO is very close to the true optimal solution. Because the partition PSO is a local optimum algorithm designed to solve the large-scale problems, the result of partition PSO is worse than the basic PSO. GA-PSO combines the advantages of GA and PSO, so it converges faster than the basic PSO.

Fig. 4.2
figure 2

Simulation results display, a comparison of convergence curves, b path planning result of GA-PSO

Table 4.1 Path planning results of four algorithms

4.3.3 3D Welding Path Planning

Figure 4.3a is a car door with 115 welding joints, and Fig. 4.3b is the 3D coordinates of the welding joints. Figure 4.3c is the convergence curve comparison of GA, PSO, partition PSO, and GA-PSO. Figure 4.3d shows the path optimized based on GA-PSO. Table 4.2 shows the comparison of path planning results, and GA-PSO is better than other three algorithms. 115 welding joints is a large-scale path planning problem, the shortcoming of prematurity of GA is completely revealed. The optimal solution of GA is the worst among all the algorithms, and the convergence speed is the slowest as well. PSO is also easy to fall into local optimum when it comes to more welding joints, but it is still better than GA. Partition PSO shows its advantage when there are many welding joints, all the welding joints are divided into four zones to search optimal path in this case, which increase its optimization capability greatly. GA-PSO remains its good characteristic, the diversity of particles are greatly increased after the optimal solution of GA was used as another global optimal position. Hence, its global search capability is greatly improved, and the best result was obtained based on GA-PSO.

Fig. 4.3
figure 3

Simulation results display, a welding joints of a door, b 3D coordinates of the welding joints, c comparison of convergence rate curves, d path planning result of GA-PSO

Table 4.2 Path planning results of four algorithms

4.3.4 Performance Comparison

Although GA and PSO are global convergence intelligent algorithms, both of them have the drawback of prematurity, which means they are easy to fall into local optimum, especially in a large search space. They can be used to solve small-scale path planning in a welding task. Partition PSO divides large search space into several small ones, and simplifies the complexity problem. However, when the partition is established, the exchange of two zones is limited to the two connection points, and points inside of each zone are separated. Hence, the partition PSO is a local convergence intelligent algorithm, the advantage of partition PSO can be shown in more welding joints path planning. The GA-PSO proposed in this article is a combination of GA and PSO, the diversity of particles is greatly increased, and the global search capability is improved as well. It is suitable for both small welding joints case and more welding joints case. Besides, after effective mutation operator was applied in the partition PSO algorithm to make the algorithm jump out of local optimal solutions, the better optimization results were obtained [11].

4.4 Conclusion

For improving traditional path planning effects, intelligent algorithms are used to realize effective path planning. Besides GA and PSO, the partition PSO and GA-PSO are proposed and compared. Simulation results show that when the number of welding joints increases to a certain level, partition PSO shows advantage over basic PSO. However, for the path planning of few welding joints, the superiority is not reflected. The hybrid GA-PSO proposed in this paper combines the advantages of both GA and PSO, and the diversity of particles in PSO is greatly increased. Hence, the global search capability of PSO has been greatly enhanced. Simulation results show that the result of GA-PSO is the best among all the algorithms, and it is not affected by the number of welding joints. In future research work, other criteria, such as the least time consuming, the minimum deformation, and the minimum energy consumption will be considered in path optimization.