An Optimized Trajectory Planning for Welding Robot

In order to improve the welding efficiency and quality, this paper studies the combined planning between welding parameters and space trajectory for welding robot and proposes a trajectory planning method with high real-time performance, strong controllability and small welding error. By adding the virtual joint at the end-effector, the appropriate virtual joint model is established and the welding process parameters are represented by the virtual joint variables. The trajectory planning is carried out in the robot joint space, which makes the control of the welding process parameters more intuitive and convenient. By using the virtual joint model combined with the B-spline curve affine invariant, the welding process parameters are indirectly controlled by controlling the motion curve of the real joint. To solve the optimal time solution as the goal, the welding process parameters and joint space trajectory joint planning are optimized.


Introduction
Since the 1960s, the manual welding has been replaced by welding robots which have a series of advantages such as flexible work, high production efficiency, and continuous work. So welding robots have been widely used in the mechanical processing, weapons industry, automobile manufacturing and other fields [1]. In the welding process, a reasonable space trajectory planning can improve the welding quality, welding efficiency and reduce welding costs, which is of great significance in the actual industrial production [2]. A variety of studies have been stated in the literature available on the trajectory planning of welding robots. K Abdel-Malek [3] presented an analytical formulation for flex barriers to motion inside the workspace of manipulator arms under the premise of accurate trajectory, which made the welding process successfully completed. TP Pachidis [4] used the visual sensor system for the overall path of the trajectory planning, the method is of high welding quality and low welding error; By identifying the groove characteristics, looking for welding groove and detecting the gap between the robot and the weld groove, Ke Zhang [5] adjusted the robot body and torch position, in which the method is of high precision and feasibility. Su Wang [6,7] provided the basis and algorithm support for the trajectory control of the sitting intersecting line weld by tracking the trajectory of the end point of the torch according to the Frente-Snow column vector, and developed the weighted fuzzy expert system to ride the riding Working angle and walking angle of welding torch for intersecting line welding robot Line planning, effectively completed the welding torch attitude control of the torch. Changliang Chen [8] developed the path control module to generate three B-spline curve welding paths, and introduced the point inversion module using particle swarm optimization to address the partition of path, which is required of the welding process and reduces the welding trajectory error. Although a lot of research has been done on the trajectory planning of welding robots, few people has considered the interaction between spatial trajectories and other factors. Welding process parameters directly affect the welding quality, and welding process parameters such as welding work angle, welding walking angle are relevant to the welding torch position, so taking into account the welding process parameters and the spatial trajectory is the key to improve the quality of welding. In this paper, by constructing the virtual joints, the welding process parameters are represented by the joint variables of the virtual joints. By controlling the joints of the virtual joints, the welding process parameters are controlled to realize the real-time control of the trajectory during the welding process. The B-spline of three degree being adapted to trajectory interpolation guarantees the joint motion curve continuous and smooth, with its unique convex and affine deformation of indirect control of welding process parameters, which can meet the requirement of welding process.

Virtual joint establishment
Based on the principle of simplification, this paper first carries on the trajectory planning to the plane linear weld, and uses three virtual joints to realize the combined planning of the welding process parameter and the space trajectory, and draws lessons from other types of weld trajectory planning. The torch and the robot are rigidly connected, treat the torch as a connecting rod, and add three virtual joints at the end of it, as shown in figure 1.  figure 1, d1, d2 and h are the lengths of the links 1, 2 and 3, respectively, and a is the length of the connecting rod of the end-effector. The virtual joint 1 is a rotating joint located at the end of the torch with its axis perpendicular to the center of the torch. The virtual joint 2 is the rotation joint, at the other end of the connecting rod 1, the axial direction is perpendicular to the connecting rod 1; the virtual joint 3 is the moving joint, The direction of the axis coincides with the direction of the straight weld, perpendicular to the connecting rod 2.
Where v is the running speed of the torch, s t is the unit time, and s d is the joint variable in the unit time of the virtual joint 3, the running speed of the welding torch can be expressed as a function of s d .
It should be noted that 1 θ and 2 θ are the control of the welding process parameters are not the Euler angle in the posture of the torch. When the third virtual joint is the moving joint and the moving joint axis is parallel to an axis in the base system, 1 θ and 2 θ correspond to the Euler angle of the torch and equal. It can be seen that the establishment of the appropriate virtual joint model, by controlling the joint joints of virtual joints can be welded on the process parameters in real-time control, compared to the previous use of welding parameters to solve the gun position, and then use the gun attitude for trajectory planning, the method of using the virtual joint variable to control the welding process parameters is more intuitive, convenient.

Joint Kinematics Solution Based on Lie Group and Lie Algebra
Due to the particularity of virtual joint parameters, the solution of joint motion based on Lie group and Lie algebra will simplify the solving problem. For n-type combined robots, the terminal link coordinate system, which is opposite to the base coordinate system, it can be expressed as [10] : o n T is the arm transformation matrix and is a function of n joint variables.
For 9-type combined robots, it can be written as: and T 6 7 can be obtained by simple derivation, and the inverse kinematics problem of 9 joint robot can be transformed into the inverse kinematics problem of 6 joint robot. According to the method [9,10], the kinematic inverse of the 6-joint robot can be obtained, and the corresponding joint variables of six real joints can be obtained.

Joint trajectory planning method
After a series of key points of real joint, the trajectory planning is carried out in the joint space, and the selected key points are traversed by B-spline of three degree. B-spline of three degree are expressed as： , 0 .The normalization of i t is done by the cumulative method, we can find the corresponding B-spline curve of the node vector, which can be written as: To solve the control vertices of the curve, we need to add four boundary conditions: the first two points of the curve coincide with the control vertex, the first two points of the speed of zero, which can be expressed as: When the joint variable and the time series are known, the B-spline curve can be obtained [11,12]. If the joint variable sequence is known, the time node sequence is the variable to be determined, and in conjunction with equation (5), the B-spline curve can be written as a function of the variable u.
For the flat linear weld, when the weld direction along the axial direction of the base system, the gun walking angle 7 θ and the torch working angle 8 θ were the relative rotation of the torch around the other coordinate axes, due to the end of the connecting rod of the unchanged position, so we can control the posture of the torch by controlling the 7 θ and 8 θ .Since the virtual joint 9 is a moving joint, the welding robot always moves along the direction of the axis of the moving joint 9 in the direction of the straight line weld, and we can control speed by controlling the joint variable of the virtual joint 9 in the unit time. Therefore, the process parameters of the torch can be represented by the posture of the end of the torch for the linear weld. Assuming that  H (B, u). The real joint variable to the virtual joint variable mapping can be obtained from equation (5), recorded as f. The f can be a continuous shot from the relationship between the joint variable and the position, which can be written as: It is also known that the relationship between the operating space velocity and the joint space velocity can be expressed by the Jacobi matrix, which can be expressed as: When u increases from 0 to 1, each point of the curve H & can be obtained by the corresponding transformation of the point of G & through the linear transformation ( ) J A .Since ( ) J A is changing with u, the resulting curve is not a B-spline curve. However, the B-spline curve is the same as the control of the vertex shot transformation process by the affine invariance of the B-spline, which can be expressed as: On both sides of the time t on the guide, which can be written as: As in equation (21), the curves of ( )

A u & and ( )
A u && are B-spline curves, and are equally expressed as: In order to solve the optimal time, joint planning of welding process parameters and space trajectories is carried out, and the optimal solution is solved by genetic algorithm. Because the problem relates to the constraints of the optimization, the general use of the penalty function to deal with, the cost function can be written as: Where i x is the time between two joint variables, g r is the penalty factor, and ( ) i x φ is the penalty function. Considering the requirements of the kinematic constraints of the joint space and the welding process, the constraints are expressed as: In the equation (19),

Simulation
Experiments were carried out using ABB robot studio simulation software for planar linear welds, the robot selected IRB1600 (capacity 8KG, reaching 1.45m) welding robot, and the torch was selected by Binzel air 22 type welding machine. Select a straight line on the workpiece as a welded straight seam to determine the end posture of the virtual link.
In the Cartesian space to select the key point (including the first two points a total of 6 points), the real joint space of the six key points can be solved by the above method, as shown in Table 1:  Table 2 and  Table 3: 4mm/s 2 The principle of genetic algorithm is not described here, set the group M = 40, the termination algebra T = 300, the choice operator for the tournament method, the cyclic operator uses the cyclic crossing, PC = 0.8, the variation operator value is 0.02, the penalty factor is 50, using MATLAB software to write the program, find the optimal solution for [5.9375,6.5830,8.0174,7.0800,6.5586], the total time T = 34.1765s. The joint point of the joint space and the corresponding time series are known, using MATLAB software on the key points of the B-spline interpolation, the joint motion curve, joint velocity curve, joint acceleration curve of six real joint are shown in figure 2~4: In figure 2, the blue circle on behalf of each joint must pass through the joint position sequence. The figure shows the joint motion curve through a given joint position sequence and the movement curve smooth and continuous; In figure 3, the speed curve of each joint smooth, the size of the fluctuation between (-30,40), much smaller than the set of the joint speed constraints, and the initial speed and stop speed is zero, to meet the set of initial conditions; In figure 4, the joint acceleration curve continuous, the value of the size Fluctuate between (-13, 16), less than the set joint acceleration constraint. For the welding process parameters of the test, the real joint motion curve can be programmed to write welding procedures, simulation experiments, figure 5 and figure 6 for the torch operation posture.
It can be seen from figure 5 and figure 6 that the working angle of the torch and the running angle of the torch change uniformly from 0 ° to 45 °, and there is no large mutation in the welding process. From the obtained time node, combined with the amount of change in position, a simple analysis shows that the results meet the requirements of the welding process parameters.  Figure 6. Gun running angle change map

Conclusion
By adding the virtual joint at the end-effector, the appropriate virtual joint model is established and the welding process parameters are represented by the virtual joint variables, so that the control of the welding process parameters is more intuitive. Reverse the key point of real joint movement curve by obtaining the key points of the real joint motion curve(the more complex the curve the more key points). Through the B-spline curve for trajectory interpolation, the welding process parameters are combined with the trajectory planning of the joint space, to meet the requirements of the welding process at the same time, so that the continuously joint speed and acceleration can reduce the mechanical vibration and joint wear.