Robot welding posture optimization method based on genetic algorithm

Through the robot welding attitude optimization method based on genetic algorithm, the working angle and walking angle of the welding gun are adjusted, and the problem of small space for welding attitude optimization in the existing technology is solved, and a smoother and more stable welding process is achieved.

CN120206074APending Publication Date: 2025-06-27SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510230641.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art fails to make full use of the adjustment of the working angle and walking angle of the welding torch during robot welding, resulting in a small space for optimization of welding posture and less obvious improvement in robot processing performance.

Method used

The robot welding attitude optimization method based on genetic algorithm is adopted. By calculating the robot joint motion acceleration of each welding joint on the initial welding path, the area to be optimized is determined, and the working angle and walking angle of the welding gun are adjusted using the genetic algorithm to find the optimal welding attitude combination.

Benefits of technology

It effectively reduces the robot joint movement acceleration, improves the smoothness of the welding path, and enhances the stability and processing efficiency of the robot welding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120206074A_ABST
    Figure CN120206074A_ABST
Patent Text Reader

Abstract

The invention discloses a robot welding posture optimization method based on a genetic algorithm. Firstly, an initial welding path of a robot is input, and robot joint motion acceleration corresponding to each welding spot on the initial welding path is calculated; a robot joint motion acceleration threshold value is preset according to the actual situation, the welding point with the robot joint motion acceleration exceeding the threshold value serves as a key point, and a to-be-optimized key area in the welding path is selected accordingly; and the working angle and the walking angle of the welding posture of each welding spot in the key area range are optimized based on a genetic algorithm, and stable welding of the robot is achieved. The welding posture is optimized by flexibly adjusting the working angle and the walking angle of the welding gun, sufficient space is provided for optimization of the machining performance of the robot, the optimal welding posture combination is found through the genetic algorithm, the joint movement acceleration in the welding process of the robot is reduced, shaking of an end effector of the robot is reduced, the welding effect is guaranteed, and the welding quality is improved. The processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of robot technology and optimization algorithms, and particularly to a method for optimizing the welding posture of a robot based on a genetic algorithm. Background Art

[0002] When a welding robot processes workpieces with complex welds such as corrugated plates, the joints of the robot may change sharply, resulting in excessive acceleration of the robot joint movement. This may cause the end effector of the robot to vibrate, thereby affecting the welding effect, and even causing the robot to stop suddenly due to overload, reducing the processing efficiency. Therefore, it is very crucial to use an optimization algorithm to adjust the welding posture to ensure the smooth operation of the robot on the processing path.

[0003] Currently, there are two common optimization directions for robot welding posture optimization: selecting multiple sets of joint configurations obtained by inverse kinematics solution of the robot to achieve optimization and posture optimization based on the redundancy of the robot. Among them, according to the analysis of robot inverse kinematics, several different joint angle configurations may be solved for the same end posture of the robot. For the welding posture of each welding point, an appropriate joint angle configuration can be selected through an optimization algorithm to make the joint movement of the robot more stable during welding. And the welding torch is usually a rotating body, and rotating around its central symmetry axis (i.e., changing the rotation angle of the welding torch) will not affect the end pose of the robot, there is redundancy in degrees of freedom. Therefore, for a given end welding posture, the rotation angle of the welding torch can be planned through an optimization algorithm to make the joint movement of the welding robot more stable.

[0004] In fact, adjusting the working angle and traveling angle of the welding torch within a certain range will not affect the welding effect, but instead provides sufficient space for optimizing the processing performance of the robot. As described above, the existing optimization methods do not consider the adjustment of the working angle and traveling angle of the welding torch, and only optimize the posture from the multiple sets of joint configurations obtained by inverse kinematics solution of the robot and the redundancy of the rotation angle of the welding torch, resulting in a small optimization space and an insignificant improvement in the processing performance of the robot. Summary of the Invention

[0005] The purpose of the present invention is to overcome the above-mentioned shortcomings and deficiencies of the prior art, and provide a method for optimizing the welding posture of a robot based on a genetic algorithm, aiming at the technical problems of small optimization space for the processing performance of the robot and insignificant improvement in the processing performance of the robot.

[0006] The present invention is realized through the following technical solutions:

[0007] A method for optimizing the welding posture of a robot based on a genetic algorithm includes the following steps:

[0008] Step S1: Calculate the robotic joint motion accelerations corresponding to each welding point on the initial welding path: Obtain the initial path of the robotic welding, i.e., the position and orientation of the welding torch at the end of the robot during welding of each welding point, and calculate the robotic joint motion accelerations corresponding to each welding point on the initial welding path;

[0009] Step S2: Determine the area to be optimized based on the robotic joint motion accelerations of the initial welding path: Preset the threshold of the robotic joint motion acceleration according to the actual situation, and take the welding points where the robotic joint motion accelerations calculated in Step S1 exceed the threshold as key points, and select the key areas to be optimized in the welding path accordingly;

[0010] Step S3: Optimization of the key area based on the genetic algorithm: Calculate the reachable pose sets of each welding point within the range of the key area in Step S2, use the genetic algorithm for optimization, find the optimal combination of welding postures, smooth the welding path, and achieve stable welding of the robot.

[0011] Preferably, in Step S1, the specific process of calculating the robotic joint motion accelerations corresponding to each welding point on the initial welding path is as follows:

[0012] Step S11: Establish a weld coordinate system and a welding torch coordinate system according to the welding point information, and calculate the initial postures of the welding torch at the end of the robot corresponding to each welding point;

[0013] Step S12: Based on the inverse kinematics of the robot, calculate the joint angles required by the robot when the welding torch at the end of the robot reaches the welding postures of each welding point, and obtain the angle change curves of all joints of the robot in the initial welding path;

[0014] Step S13: According to the angle change curves of all joints of the robot in the initial welding path obtained in Step S12, calculate the motion acceleration curves of each joint of the robot in the initial welding path.

[0015] Preferably, in Step S2, the specific process of determining the area to be optimized based on the robotic joint motion accelerations of the initial welding path is as follows:

[0016] Step S21: Preset the threshold of the robotic joint motion acceleration according to the actual situation such as welding requirements and robotic welding parameters, i.e., the maximum value of the desired robotic joint motion acceleration;

[0017] Step S22: In the motion acceleration curves of each joint of the robot calculated in Step S13, select the welding points where the joint motion accelerations exceed the threshold as key points;

[0018] Step S23: According to the key points selected in Step S22, divide the key areas to be optimized according to certain rules, and adjust and optimize the postures of the welding points in this area.

[0019] Further, in step S23, the specific process of dividing the key area to be optimized according to certain rules is as follows: Select the key point and N adjacent points before and after it, and use this continuous weld point area as the key area where the welding posture needs to be optimized.

[0020] Preferably, in step S3, the specific process of optimizing the key area based on the genetic algorithm is as follows:

[0021] Step S31: On the premise of ensuring safety without collision and occlusion, respectively determine the maximum adjustable range of the working angle and traveling angle of the welding torch; determine the change step of the working angle and traveling angle each time the welding posture is adjusted;

[0022] Step S32: Calculate the reachable posture set of each weld point in the key area;

[0023] Step S33: Use the serial numbers of different welding postures in their reachable welding posture sets of each welding point as the "genes" of individuals in the genetic algorithm. A certain welding posture of all welding points in the key area to be optimized forms a digital string, which realizes the step of encoding the solution in the genetic algorithm;

[0024] Step S34: Generate the initial population of the genetic algorithm according to the hybrid method;

[0025] Step S35: Calculate the fitness of each individual in the population: In the present invention, the optimization goal of the genetic algorithm is to make the movement of the robot during welding smoother. Take the maximum value of the weighted sum of squares of the motion accelerations of each joint of the robot as the robot welding smoothness performance index, and the fitness function is to minimize the robot welding smoothness performance index. Calculate the fitness of each individual in the genetic algorithm population according to the fitness function;

[0026] Step S36: Based on the fitness of each individual calculated in step S35, use the binary tournament method to select individuals in the population, and retain the individuals with high fitness in the population. At the same time, adopt the elite retention strategy to directly inherit the best individual in the population to the next generation population to ensure that the best individual will not be lost;

[0027] Step S37: Select two parent individuals in the population, randomly generate a crossover point, and exchange the "gene segments" of the two parent individuals to increase the genetic diversity of the population;

[0028] Step S38: Randomly change one "gene" of a certain individual in the population to increase the species diversity;

[0029] Step S39: Continuously repeat and iterate steps S35 to S38 until the algorithm iterates to the preset maximum number of iterations; or after continuous multiple iterations, the fitness fluctuation amplitude is very small, then it is considered that the genetic algorithm converges to the optimal solution and the iteration stops.

[0030] Further, in step S32, the specific process of calculating the reachable posture set of each weld point in the key area is as follows: First, within the value range determined in step S31, adjust the welding working angle and the traveling angle of the weld point respectively according to the change step determined in S31, and calculate the corresponding welding postures. Then, based on the inverse kinematics of the robot, determine whether each welding posture of the weld point is reachable. If the adjusted posture is reachable, add it to the reachable posture set of the weld point. Finally, record the reachable posture set of the weld point in the calculation order. Repeat the above steps until the reachable posture sets of all weld points in the area to be optimized are calculated.

[0031] Further, in step S34, the specific process of generating the initial population of the genetic algorithm according to the hybrid method is as follows: Take the minimum value of the sizes of the reachable welding posture sets of all weld points to be optimized as the initialization parameter, and artificially generate a group of populations according to this parameter, so that the initial population contains as many welding postures as possible and is more evenly distributed in the search space. Finally, mix the artificially generated population with the randomly generated population as the initial population.

[0032] The present invention has the following advantages and effects compared with the prior art:

[0033] The robot welding posture optimization method based on the genetic algorithm of the present invention first calculates the acceleration of the robot joint movement corresponding to each welding point on the initial welding path, and specifically selects the weld points with larger robot joint movement acceleration as key points. Then, divide the area to be optimized according to the key points, rather than directly optimizing the entire welding path, avoiding waste of computing resources. Flexibly adjust the working angle and traveling angle of the welding torch to change the welding posture, providing sufficient room for improving the processing performance of the robot. The genetic algorithm can solve non-linear optimization problems with complex constraints. Using the genetic algorithm to optimize the combination of welding postures can simplify the posture optimization problem and achieve stable welding of the robot. The present invention also proposes a hybrid initialization method for the population initialization step in the genetic algorithm, so that the initial population contains as many welding postures as possible and is more evenly distributed in the search space.

[0034] The present invention changes the welding posture by flexibly adjusting the working angle and traveling angle of the welding torch, and finds the optimal combination of welding postures based on the genetic algorithm, reducing the acceleration of the robot joint movement, making the welding path smoother and the robot welding more stable. Compared with the two methods of solving multiple sets of joint configurations obtained by the inverse kinematics of the robot and optimizing the posture based on the robot redundancy, the present invention has a more obvious effect on improving the smoothness of the robot welding path, and solves the technical problems of small optimization space for the robot processing performance and insignificant improvement of the robot processing performance. Description of the Drawings

[0035] Figure 1 It is the flow chart of the robot welding posture optimization method based on genetic algorithm of the present invention.

[0036] Figure 2 It is the flow chart of the genetic algorithm used in the present invention.

[0037] Figure 3 It is the curve graph of the angle change of all joints of the robot under the initial welding path in the embodiment of the present invention.

[0038] Figure 4 It is the schematic diagram of the motion acceleration curve of each joint of the robot and the selected key points under the initial welding path in the embodiment of the present invention.

[0039] Figure 5 It is the schematic diagram of the optimization iteration effect of a certain key area by the genetic algorithm in the embodiment of the present invention.

[0040] Figure 6 It is the schematic diagram of the effect of the robot welding posture optimization algorithm based on genetic algorithm in the embodiment of the present invention. Specific implementation manners

[0041] The present invention will be further described in detail below in conjunction with embodiments and the accompanying drawings, but the implementation manners of the present invention are not limited thereto.

[0042] As Figure 1 shown, the present invention discloses a robot welding posture optimization method based on genetic algorithm, which can be executed on intelligent devices such as computers, and is mainly implemented by the following steps:

[0043] Step S1, calculate the motion acceleration of each robot joint corresponding to the solder joints on the initial welding path: Obtain the initial path of the robot welding, that is, the position and posture of the robot end welding torch when each solder joint is welded, and calculate the motion acceleration of each robot joint corresponding to the solder joints on the initial welding path. Specifically as follows:

[0044] Step S11, establish a weld coordinate system and a welding torch coordinate system according to the solder joint information, and calculate the initial posture of the robot end welding torch corresponding to each solder joint;

[0045] Step S12, based on the inverse kinematics of the robot, calculate the joint angles required by the robot when the robot end welding torch reaches the welding pose of each solder joint, and obtain the curve graph of the angle change of all joints of the robot in the initial welding path, as Figure 3 shown;

[0046] Step S13, according to the curve graph of the angle change of all joints of the robot in the initial welding path obtained in step S12, calculate the motion acceleration curve of each joint of the robot in the initial welding path.

[0047] Step S2. Determine the area to be optimized based on the joint motion acceleration of the robot along the initial welding path: Preset the threshold of the robot joint motion acceleration according to the actual situation. Consider the weld points where the robot joint motion acceleration calculated in Step S1 exceeds the threshold as key points, and select the key areas to be optimized in the welding path accordingly. Specifically as follows;

[0048] Step S21. According to the actual situation such as welding requirements and robot parameters, preset the threshold of the robot joint motion acceleration, that is, the maximum expected value of the robot joint motion acceleration; in Embodiment 1 of the present invention, the set threshold of the robot joint motion acceleration is 100° / s 2 ;

[0049] Step S22. Among the motion acceleration curves of each joint of the robot calculated in Step S13, select the weld points where the joint motion acceleration exceeds the threshold as key points, as shown in Figure 4 shown;

[0050] Step S23. According to the key points selected in Step S22, select the key points and the two adjacent points before and after each of them, and regard this continuous weld point area as the key area where the welding posture needs to be optimized, and adjust and optimize the postures of the weld points in this area.

[0051] Step S3. Optimization of the key area based on the genetic algorithm: Calculate the reachable posture sets of each welding point within the key area in Step S2, use the genetic algorithm to find the optimal solution, find the optimal combination of welding postures, smooth the welding path, and achieve stable welding of the robot.

[0052] Step S31. On the premise of ensuring safety without collision and occlusion, determine the maximum adjustable ranges of the working angle and the travel angle of the welding torch respectively; determine the change step of the working angle and the travel angle each time the welding posture is adjusted; in the embodiment of the present invention, the safe adjustable range of the working angle and the travel angle is ±5°; each time the welding posture is adjusted, the change step of the working angle and the travel angle is 0.25°;

[0053] Step S32. Calculate the reachable posture sets of each weld point within the key area: First, within the range of ±5° change, adjust the working angle and travel angle of the weld point with a change step of 0.25° respectively, and calculate the corresponding welding poses; then, based on the inverse kinematics of the robot, judge whether each welding pose of the weld point is reachable. If the adjusted pose is reachable, add it to the reachable posture set of this weld point; finally, record the reachable posture sets of the weld points in the calculation order. Repeat the above steps until the reachable posture sets of all weld points in the area to be optimized are calculated.

[0054] The optimization process of the genetic algorithm is as shown in Figure 2 shown.

[0055] Step S33: Use the sequence numbers of different welding postures in each solder joint within its reachable welding posture set as the "genes" of individuals in the genetic algorithm. A set of digital strings composed of a certain welding posture of all solder joints in the key area to be optimized realizes the step of encoding the solution in the genetic algorithm;

[0056] Step S34: Generate the initial population of the genetic algorithm according to the hybrid method;

[0057] Step S35: Calculate the fitness of each individual in the population: In the present invention, the optimization goal of the genetic algorithm is to make the movement of the robot during welding smoother. Take the maximum value of the weighted sum of squares of the motion accelerations of each joint of the robot as the smooth performance index of the robot welding, and the fitness function is to minimize the smooth performance index of the robot welding. Calculate the fitness of each individual in the genetic algorithm population according to the fitness function;

[0058] In this embodiment, the calculation formula of the smooth performance index of the robot welding is as follows:

[0059]

[0060] where w j is the weight coefficient that measures the influence degree of the joint angle j of the robot on the overall motion smoothness. In this embodiment, the weights of the six joints of the welding robot are [2, 2, 2, 1, 1, 1].

[0061] Step S36: Based on the fitness of each individual calculated in Step S35, use the binary tournament method to select individuals in the population, and retain the individuals with high fitness in the population. At the same time, adopt the elite retention strategy to directly inherit the best individual in the population to the next generation population to ensure that the best individual will not be lost;

[0062] Step S37: Select two parent individuals in the population, randomly generate a crossover point, and exchange the "gene segments" of the two parent individuals to increase the genetic diversity of the population;

[0063] Step S38: Randomly change one "gene" of an individual in the population to increase the species diversity;

[0064] Step S39: Continuously repeat Steps S35 to S38 until the algorithm iterates to the preset maximum number of iterations; or after continuous multiple iterations, the fluctuation range of the fitness is very small, then it is considered that the genetic algorithm converges to the optimal solution and the iteration stops.

[0065] In this embodiment, the optimization iteration effect of the genetic algorithm on a certain key area is as Figure 5 shown. It can be seen that as the number of iterations increases, the genetic algorithm quickly converges to a better value.

[0066] In this embodiment, the effect of the robot welding posture optimization algorithm based on the genetic algorithm is as follows Figure 6 As shown, it can be seen that the weighted average acceleration of the robot joints after the algorithm optimization is significantly lower than that before the optimization, indicating that the robot welding path after the algorithm optimization is smoother, improving the stability of robot welding.

[0067] As described above, the present invention optimizes the welding posture by flexibly adjusting the working angle and walking angle of the welding torch, providing sufficient space for optimizing the machining performance of the robot. The genetic algorithm is used to find the optimal welding posture combination, reducing the magnitude of the joint motion acceleration during robot welding, reducing the jitter of its end effector, ensuring the welding effect, and improving the machining efficiency.

[0068] The implementation mode of the present invention is not limited by the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.

Claims

1. A robot welding posture optimization method based on genetic algorithm, characterized in that The steps include: Step S1, calculating the robot joint motion acceleration corresponding to each welding point on the initial welding path; Step S2, determining the area to be optimized based on the joint motion acceleration of the robot of the initial welding path; Step S3: Optimization of key areas based on genetic algorithm.

2. The robot welding posture optimization method based on genetic algorithm according to claim 1 is characterized in that: Step S1 specifically refers to the following steps: obtaining the initial path of robot welding, that is, the position and posture of the robot end welding gun when welding each welding point, and calculating the robot joint motion acceleration corresponding to each welding point on the initial welding path.

3. The robot welding posture optimization method based on genetic algorithm according to claim 1 is characterized in that: Step S2 specifically refers to the following steps: preset the robot joint motion acceleration threshold according to actual conditions, and take the weld point where the robot joint motion acceleration calculated in step S1 exceeds the threshold as the key point, so as to select the key area to be optimized in the welding path.

4. The robot welding posture optimization method based on genetic algorithm according to claim 1 is characterized in that: Step S3 specifically refers to the following steps: calculating the reachable posture set of each welding point within the key area of ​​step S2, using genetic algorithm to find the optimal welding posture combination, smoothing the welding path, and realizing smooth welding of the robot.

5. The robot welding posture optimization method based on genetic algorithm according to claim 2 is characterized in that: In step S1, the specific process of calculating the robot joint motion acceleration corresponding to each welding point on the initial welding path includes the following sub-steps: Step S11, establishing a weld coordinate system and a welding gun coordinate system according to the welding point information, and calculating the initial posture of the robot end welding gun corresponding to each welding point; Step S12, based on the inverse kinematics of the robot, calculating the joint angles required by the robot when the welding gun at the end of the robot reaches the welding posture of each welding point, and obtaining the angle change curves of all joints of the robot in the initial welding path; Step S13, calculating the motion acceleration curve of each joint of the robot in the initial welding path according to the angle change curves of all joints in the initial welding path of the robot obtained in step S12.

6. The robot welding posture optimization method based on genetic algorithm according to claim 3 is characterized in that: In step S2, determining the area to be optimized based on the joint motion acceleration of the initial welding path robot specifically includes the following sub-steps: Step S21, according to the actual conditions such as welding requirements and welding robot parameters, preset the robot joint motion acceleration threshold, that is, the expected maximum value of the robot joint motion acceleration; Step S22, selecting the welding points where the joint motion acceleration exceeds the threshold value from the motion acceleration curves of the robot joints calculated in step S13, and taking them as key points; Step S23: Divide the key area to be optimized according to the key points selected in step S22, and adjust and optimize the posture of the weld points in the area.

7. The robot welding posture optimization method based on genetic algorithm according to claim 6 is characterized in that: In step S23, the key area to be optimized is specifically divided as follows: the key point and its N neighboring points before and after are selected, and this continuous weld point area is used as the key area to be optimized for the welding posture.

8. The robot welding posture optimization method based on genetic algorithm according to claim 4 is characterized in that: In step S3, the key area optimization based on the genetic algorithm specifically includes the following sub-steps: Step S31, under the premise of ensuring safety without collision and obstruction, respectively determine the maximum adjustable range of the welding gun working angle and the walking angle; determine the change step length of the working angle and the walking angle each time the welding posture is adjusted; Step S32, calculating the reachable posture set of each weld point in the key area; Step S33, using the serial numbers of different welding postures in each welding point in its reachable welding posture set as the "gene" of the individual in the genetic algorithm; Step S34, generating an initial population of the genetic algorithm according to a hybrid method; Step S35, calculating the fitness of each individual in the population: the optimization goal of the genetic algorithm is to make the robot move more smoothly during welding; the maximum value of the weighted sum of squares of the motion acceleration of each joint of the robot is used as the robot welding smoothness performance index, and the fitness function is to minimize the robot welding smoothness performance index; the fitness of each individual in the genetic algorithm population is calculated according to the fitness function; Step S36: Based on the fitness of each individual calculated in step S35, the binary tournament method is used to select individuals in the population, and individuals with high fitness are retained; at the same time, an elite retention strategy is adopted to directly inherit the best individuals in the population to the next generation population to ensure that the best individuals will not be lost; Step S37: select two parent individuals in the population, randomly generate a crossover point, and exchange the "gene segments" of the two parent individuals to increase the genetic diversity of the population; Step S38, randomly changing a "gene" of an individual in the population to increase species diversity; Step S39, continuously repeating steps S35 to S38 until the algorithm iterates to a preset maximum number of iterations; Or after multiple consecutive iterations, if the fitness fluctuation is very small, the genetic algorithm is considered to have converged to the optimal solution and the iteration is stopped.

9. The robot welding posture optimization method based on genetic algorithm according to claim 8 is characterized in that: In step S32, the specific steps of calculating the reachable posture set of each weld point in the key area include: first, within the value range determined in step S31, the welding working angle and the walking angle of the weld point are adjusted respectively according to the change step determined in S31, and the corresponding welding posture is calculated; then, based on the inverse kinematics of the robot, it is determined whether each welding posture of the weld point is reachable; if the adjusted posture is reachable, it is added to the reachable posture set of the weld point; finally, the reachable posture set of the weld point is recorded in the calculation order; the above steps are repeated until the reachable posture set of all weld points in the area to be optimized is calculated.

10. The robot welding posture optimization method based on genetic algorithm according to claim 8, characterized in that: In step S34, the initial population of the genetic algorithm is generated according to the hybrid method, specifically including: taking the minimum value of the set size of reachable welding postures of all weld points to be optimized as the initialization parameter, artificially generating a group of populations according to the parameter, so that the initial population contains the vast majority of welding postures as much as possible and is more evenly distributed in the search space; finally, mixing the artificially generated population with the randomly generated population as the initialization population.

Citation Information

Cited By

  • Non-standard welding-oriented robot efficient collision-free path planning method and system

    CN120962227A