Arc welding robot inverse kinematics rapid analysis method
By combining dynamic range prediction and an improved random walk algorithm with an analytical solution for bias transformation, the problem of slow inverse kinematics solution for biased six-joint robots is solved, achieving high-precision and real-time joint angle calculation, which is particularly suitable for arc welding robots.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING DAFENG NUMERICAL CONTROL TECH CO LTD
- Filing Date
- 2026-06-04
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies cannot effectively solve the problems of slow inverse kinematics solution speed, poor real-time performance, and susceptibility to initial value influence in offset six-joint robots, especially in industrial applications where it is difficult to meet the requirements of high precision and microsecond-level response.
A three-step strategy is adopted, which involves dynamic range prediction, an improved random walk algorithm, and bias transformation analytical solution. Candidate solutions are generated by a random walk algorithm with dynamic range constraints and adaptive step size of inertia weight. The bias problem is transformed into an unbiased model for analytical solution. Finally, the solution with the smallest error is selected as the output.
It achieves high-precision, high-real-time joint angle calculation within 0.5ms, making it suitable for industrial applications with stringent computation cycle requirements, such as arc welding robots.
Smart Images

Figure CN122480451A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial robot motion control technology, and in particular to a rapid inverse kinematics analysis method for a six-degree-of-freedom tandem arc welding robot with a wrist bias structure. Background Technology
[0002] In robotics, inverse kinematics (IK) serves as a bridge connecting the task space and the joint space. For a standard six-DOF robot, if the axes of its last three joints intersect at a single point (satisfying the Pieper criterion), a closed analytical solution exists, which is fast and deterministic in computation.
[0003] However, to achieve greater flexibility or avoid mechanical interference, many industrial robots (such as arc welding robots) incorporate wrist offset in their design, meaning that the axes of the 4th, 5th, and 6th axes are not concurrent and have a certain offset distance. This geometric characteristic violates the Pieper criterion, making it impossible to obtain an analytical solution directly.
[0004] To obtain analytical solutions, existing technical solutions include numerical iteration methods, geometric approximation methods, and intelligent optimization algorithms. However, the current mainstream solutions have the following drawbacks: In numerical iterative methods (such as the Newton-Raphson method or the Levenberg-Marquardt method), although the algorithm has the advantage of strong versatility, its calculation process usually takes a long time and is very sensitive to the selection of initial values. Especially near the singular points in the parameter space, the iterative process is prone to divergence or continuous oscillation, which makes it difficult to meet the strict requirements of high real-time control systems.
[0005] Geometric approximation takes a different approach, treating the bias in the system as a small perturbation. It first solves the problem using an ideal, unbiased model and then compensates and corrects the results accordingly. However, this method has significant limitations. When the system faces a large bias or undergoes a large angular change, the error introduced by the approximation accumulates, eventually leading to a severe decrease in solution accuracy.
[0006] Intelligent optimization algorithms, such as genetic algorithms or particle swarm optimization, can theoretically handle complex nonlinear optimization problems. However, due to their large search spaces, their convergence speed is often slow, with a single solution typically taking milliseconds or even seconds. Therefore, these methods are also unsuitable for real-time applications requiring control cycles as short as 1 ms.
[0007] Therefore, existing technologies lack an inverse kinematics algorithm that can handle bias geometry characteristics while ensuring microsecond-level response speed. Summary of the Invention
[0008] The purpose of this invention is to provide a fast inverse kinematics analysis method for arc welding robots, which solves the technical problems of slow inverse kinematics solution speed, poor real-time performance, and susceptibility to initial value influence in the prior art for offset six-joint robots. This invention proposes an inverse kinematics analysis method with a stable calculation time of less than 0.5ms, high accuracy, and strong robustness, in order to solve the problems encountered in the above-mentioned background art.
[0009] To achieve the above objectives, the technical solution of the present invention is as follows: A rapid inverse kinematics analysis method for an arc welding robot, taking a current industrial robot with 6 joints as an example, where the 6th joint is the end effector joint, and the 1st to 5th joints are all joints except the end effector joint, the specific steps are as follows: 1. Dynamic range prediction: Using the position, velocity and maximum acceleration constraint of the 6th joint at the current moment, combined with the kinematic differential equation, the physical reach of the 6th joint angle in the next control cycle is predicted. This step compresses the global search space (360°) into a very small dynamic window.
[0010] 2. Improved Random Walk Sampling: Within the predicted dynamic range, a random walk algorithm with inertial weights and adaptive step sizes is used to generate N candidate solutions. This algorithm guarantees traversal within a minimal range while avoiding getting trapped in local minima.
[0011] 3. Offset Transformation and Analytical Solution: For each candidate 6th joint angle, the corresponding virtual wrist center position is calculated through inverse coordinate transformation, thus converting the offset robot model into an unoffset model. Subsequently, the first 5 joint angles are quickly solved using a geometric analytical method.
[0012] 4. Optimal solution selection: Calculate the end position error corresponding to each group of solutions, and select the group with the smallest error as the final output.
[0013] Compared with the prior art, the beneficial effects of the present invention are: by introducing dynamic range constraints based on dynamics and an improved random walk optimization algorithm, the method transforms the complex bias inverse problem into a bias-free analytical problem, achieving high-precision and high-real-time joint angle solution, which is particularly suitable for industrial application scenarios such as welding that have strict requirements for computation cycle.
[0014] The core innovation of this invention lies in the three-step strategy of "constraining first, then optimizing, and then analyzing," which combines dynamic range prediction, improved random walk, and bias transformation analytical solution to form a complete solution. Attached Figure Description
[0015] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein: Figure 1 This is a flowchart of the method described in this invention; Figure 2 A schematic diagram illustrating a detailed implementation of the method described in this invention; Figure 3 This is a diagram showing the analytical position of the present invention in an industrial robot. Detailed Implementation
[0016] To make the technical means, creative features, achieved objectives, and effects of this invention readily understandable, the invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the relevant components of the invention.
[0017] According to the technical solution of the present invention, without changing the essential spirit of the present invention, those skilled in the art can propose various interchangeable structural methods and implementations. Therefore, the following detailed embodiments and accompanying drawings are merely exemplary descriptions of the technical solution of the present invention, and should not be regarded as the entirety of the present invention or as a limitation or restriction of the technical solution of the present invention.
[0018] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0019] Example 1, as Figure 1 and Figure 3 As shown, a rapid inverse kinematics analysis method for an arc welding robot is described, with the following specific steps: 1. Dynamic Range Prediction: Using the current position and velocity of the 6th joint and the system's maximum acceleration constraint, combined with the kinematic differential equations, the physical reach of the 6th joint angle in the next control cycle is predicted. This step compresses the global search space (360°) into a very small dynamic window.
[0020] 2. Improved Random Walk Sampling: Within the predicted dynamic range, a random walk algorithm with inertial weights and adaptive step sizes is used to generate N candidate solutions. This algorithm guarantees traversal within a minimal range while avoiding getting trapped in local minima.
[0021] 3. Offset Transformation and Analytical Solution: For each candidate 6th joint angle, the corresponding virtual wrist center position is calculated through inverse coordinate transformation, thus converting the offset robot model into an unoffset model. Subsequently, the first 5 joint angles are quickly solved using a geometric analytical method.
[0022] 4. Optimal solution selection: Calculate the end position error corresponding to each group of solutions, and select the group with the smallest error as the final output.
[0023] Example 2, as Figure 2 and Figure 3 As shown, a rapid inverse kinematics analysis method for an arc welding robot is described, with the following specific steps: 1. Kinematic Modeling of Biased Robots Let the expected homogeneous transformation matrix of the end effector be... : in, For rotation matrix, For elements in the rotation matrix, p is the position vector. x p y p z These are elements in the position matrix.
[0024] For a robot with wrist offset, let the offset vector of the 6th joint be in the end-effector coordinate system as... Typically along the Z-axis, i.e. The true center of the wrist. for: Among them, the center of the wrist That is, the virtual position of the intersection of the 5th and 6th axes. This indicates the position offset of the bias vector from the end coordinate system to the base coordinate system.
[0025] 2. Dynamic range constraint calculation Let the current time be The control cycle is Given the current angle of the 6th joint. angular velocity The system's maximum angular acceleration and maximum angular velocity .
[0026] According to the formulas of uniformly accelerated kinematics, at the next moment... The upper limit of the joint angle is determined by the maximum positive acceleration. : The lower limit of the joint angle at the next moment is determined by the maximum negative acceleration. : At the same time, considering the velocity saturation limit, the maximum displacement in the next moment cannot exceed the maximum velocity limit. The upper limit of the joint angle is determined by the maximum speed. The lower limit of the joint angle determined by the minimum speed: Combined with the physical rigidity of the joint Calculate the intermediate boundary: The final lower limit of the joint angle is obtained by taking the maximum value of the three values: the lower limit of the joint angle calculated by Formula 4, the lower limit of the joint angle calculated by Formula 6, and the lower limit of the joint's physical rigidity. .
[0027] Formula 8 is the minimum value of the three values: the upper limit of the joint angle calculated by Formula 3, the upper limit of the joint angle calculated by Formula 5, and the upper limit of the joint's physical rigidity limit, to obtain the final upper limit of the joint angle. .
[0028] The final determined dynamic search range is: Final dynamic search range starting value The lower limit of the joint angle calculated by Formula 7 is the final dynamic search range termination value. This is the upper limit of the joint angle calculated using Formula 9.
[0029] Width of the range Typically much smaller than the full range, the dynamic range prediction in Formula 3-9 compresses the search space to a very small range, thus allowing the number of sampling times N for subsequent random walks to be set very small (e.g., 5 times), thereby ensuring that the overall computation time is within 0.5ms.
[0030] By using a prediction mechanism to compress the search space from the entire joint space to an extremely small linear interval, this method can compress the 360° global search space to an extremely small dynamic window (such as 0.00001 rad in the example), which is a key step in achieving real-time performance.
[0031] 3. Improved random walk sampling This invention employs an improved random walk strategy, introducing inertia weights. (Usually taken as 0.5-0.8) to balance exploration and development capabilities, while introducing an adaptive step size decay mechanism to ensure improved search accuracy as the search approaches convergence.
[0032] Let the first The joint angle of the second sampling is The total number of samples is The calculation is as follows: in: The joint angle at the current moment .
[0033] This is an adaptive step size factor. ( The initial scaling factor. The decay rate controls the step size as it increases with the number of iterations. (Increases and decreases).
[0034] To adapt to the disturbance amplitude, ( The random coefficients are used to reduce the randomness of later iterations, leading to a more refined search.
[0035] It is a uniformly distributed random number in the interval [0,1].
[0036] To ensure traversability, if the random walk goes beyond the boundary, reflection is performed: Then, convergence is determined: If continuous The change in position error of the second sample is less than the threshold. If the sampling is terminated prematurely, the sampling process will be terminated.
[0037] in, To sample the position value for the i-th random walk, For the iMth random walk, the position value is sampled. If the difference between the two values is less than the threshold, the sampling is terminated.
[0038] The improved random walk, by selecting appropriate inertia weights and adaptive step size parameters, avoids getting trapped in local optima while ensuring ergodicity and improves convergence accuracy.
[0039] 4. Bias Transformation and Virtual Model Construction For each sample Calculate the transformation matrix of the 6th joint. : Desired pose Reverse transformation to the origin of the 6th joint coordinate system (i.e., the center of the virtual wrist): in, for Inverse matrix: Extracting the virtual wrist center matrix position vector and rotation matrix .
[0040] Specifically, the elements in the 1st row and 4th column, the 2nd row and 4th column, and the 3rd row and 4th column of the matrix in Formula 15 are extracted to form the position vector. .
[0041] Extract the elements from the matrix in Formula 15, specifically the elements in rows 1 and 1, rows 1 and 2, rows 1 and 3, rows 2 and 1, rows 2 and 2, rows 2 and 3, rows 3 and 1, rows 3 and 2, and rows 3 and 3 to form a rotation matrix. .
[0042] The bias problem is transformed into an unbiased problem, simplifying the complex problem into a standard unbiased model for solution, paving the way for subsequent analytical solutions, avoiding tedious iterative calculations, and shortening the overall computation time.
[0043] 5. Analytical solution for the first 5 joints Let the length of the link from the base coordinate system to the third joint be... .
[0044] Solve for joint 1(q_1): Calculate the projection of the wrist center onto the XOY plane in the base coordinate system: Wherein, Pwrist is the position vector matrix in the virtual wrist center matrix Twrist, which is the vector matrix composed of the elements Pwx in the 1st row and 4th column, Pwy in the 2nd row and 4th column, and Pwz in the 3rd row and 4th column of Twrist; Pwx is the x-direction component of the position vector matrix Pwrist, which is the first element of Pwrist, and the element in the first row and fourth column of Twrist; Pwy is the y-direction component of the position vector matrix Pwrist, which is the second element of Pwrist, and the element in the second row and fourth column of Twrist; Pwz is the z-direction component of the position vector matrix Pwrist, which is the third element of Pwrist, and the element in the third row and fourth column of Twrist.
[0045] Note that selection is usually based on the workspace. The quadrant yields two possible solutions, which require further selection.
[0046] Solve for joint 3(q_3): Calculate the cosine theorem parameters for the elbow plane.
[0047] Let the square of the vector length from the first joint to the center of the wrist be: in This is the offset of the first joint.
[0048] Using the Law of Cosines: To guarantee the existence of a solution, the following must be satisfied: If not satisfied, then The sample is invalid.
[0049] To solve joint 2(q_2), we introduce intermediate variables K1 and K2: Solve for the pose of joints 4, 5, and 6: Calculate the rotation matrix generated by the first 3 joints .
[0050] The error between the desired wrist posture and the actual posture is used to solve for the last three joints.
[0051] set up R 36 This is the pose transformation matrix from joint 3 to joint 6.
[0052] Solving using Euler angles: like : Note: Here As an intermediate variable used to verify attitude consistency, but in this invention, Sampled values Fixed, therefore adjustments are needed in actual calculations. To match the posture.
[0053] This step avoids the divergence problem caused by improper initial value selection in traditional numerical methods, and therefore has strong robustness.
[0054] 6. Fitness Function and Optimal Solution Selection For each set of solution vectors Calculate its forward kinematics results .
[0055] Using the 2-norm, position error is defined. : Among them, P calc The calculated forward kinematics result T calc The position vector in P des Let P be the target position vector; calculate P. calc and P des The position error E is obtained from the matrix 2-norm of the difference. pos ; The attitude error is defined using the Frobenius norm of the rotation matrix. : Among them, R calc The calculated forward kinematics result T calc The attitude rotation matrix, R des Given the target attitude rotation matrix, calculate R. calc and R des The attitude error E is obtained by taking the matrix 2-norm of the difference. rot ; Comprehensive fitness function : in The weighting coefficient (usually taken as...) ).
[0056] Traverse all Given a sample, select the solution with the smallest fitness: Through calculation, the inverse kinematics analysis calculation time is stabilized within 0.5ms, which can meet the real-time calculation requirements of 1ms interpolation period, and has strong real-time performance.
[0057] Example 3: To more clearly illustrate the technical solution of the present invention, detailed calculations are performed below using specific numerical values.
[0058] Assume the parameters of a certain arc welding robot are as follows: wrist offset distance Joint 1 offset Link length Control cycle .
[0059] Suppose at a certain moment The state of the robot's 6th joint is: current position. Current speed The system constraint is: maximum angular acceleration. Maximum angular velocity The joint is limited to... .
[0060] 1. Dynamic range prediction calculation Calculate the extreme values under acceleration constraints: Calculate the extreme values under speed constraints: Determine the dynamic range comprehensively (take the intersection): Final search range: The width is only As can be seen, the search space is extremely compressed through dynamic constraints.
[0061] 2. Random walk sampling and numerical calculus In the interval Sampling is performed within the area. Let the number of sampling times be [number missing]. Inertial weight Initial scaling factor attenuation rate .
[0062] It is worth noting that when the inertia weight w < 0.5, it is prone to getting trapped in local optima, and when w > 0.8, the convergence speed slows down. In this embodiment of the invention, we take... .
[0063] First sampling (i=1): Set initial value .
[0064] Calculate the step size: .
[0065] set up ,but: Calculations prove that the value is within the range and is valid.
[0066] Second sampling (i=2): Step decay: .
[0067] Assuming the random walk results are: .
[0068] Subsequent sampling: And so on, generating , , .
[0069] 3. Bias transformation and analytical solution (taking the first sample as an example) Assuming the desired end position The desired rotation matrix is an identity matrix. (Simplified calculation).
[0070] Calculate the virtual wrist center: for ,calculate And its inverse. Due to bias And assuming the terminal attitude is an identity matrix, then: Solve for the first 3 joints: Calculate joint 1: Calculate intermediate quantities : calculate : Note: Here This indicates that there is no geometric solution. This usually means that... The virtual wrist position corresponding to the sample is outside the workspace of the robotic arm. In the program, the fitness function for this sample will be assigned a maximum value (e.g., ...). ), and thus it was removed.
[0071] Continue iterating through other samples: Suppose we are iterating through the second sample. At that time, the calculated virtual wrist position is exactly within the workspace, and the calculated joint angle satisfies all constraints.
[0072] 4. Error Calculation and Result Output Assuming an analytical solution is used, utilizing The calculated end position is , and the desired position Very close.
[0073] Calculate the position error: Since this error is the smallest among all valid samples, the algorithm finally outputs the corresponding... A set of joint angles is used as the inverse kinematic solution.
[0074] 5. Real-time performance guarantee mechanism To ensure a latency of <0.5ms on the AM3359, this invention has undergone specific optimizations: Avoid division and square root operations: When comparing errors, use the square of the error instead of the error after taking the square root.
[0075] A lookup table is used to assist in the calculation of trigonometric functions. A high-precision lookup table is created in the RAM of the AM3359.
[0076] Loop unrolling: Since the number of loop iterations is fixed at 5, the compiler can perform loop unrolling optimization to reduce the overhead of jump instructions.
[0077] Estimated computational complexity per loop: Trigonometric functions: 12th degree Multiplication: ~50 times Addition: ~80 times Square root / division: ≤5 times On AM3359 (800MHz), the time for a single cycle is approximately The total time for 5 cycles is approximately This meets the real-time requirements.
[0078] 6. Comparative Experiment Traditional method: Using the Jacobi pseudo-inverse method on AM3359, the average time is... And occasionally, the iteration fails to converge (>5ms).
[0079] Method of this invention: Average time consumption The standard deviation is extremely small, and there is no divergence. Therefore, the solution described in this invention achieves high-precision and high-real-time joint angle solving compared to existing technologies, and is particularly suitable for industrial applications such as welding that have stringent requirements for computational cycles.
[0080] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A rapid inverse kinematics analysis method for an arc welding robot, characterized in that, Includes the following steps: Step 1, Dynamic Range Prediction: Using the position and velocity of the end joint at the current moment and the system's maximum acceleration constraint, combined with the kinematic differential equations, predict the physical reach of the end joint angle in the next control cycle; Step 2, Improved random walk sampling: Within the predicted dynamic range, a random walk algorithm with inertial weights and adaptive step size is used to generate N candidate solutions; Step 3, Offset Transformation and Analytical Solution: For each candidate end joint angle, the corresponding virtual wrist center position is calculated through coordinate system inverse transformation, and the offset robot model is equivalent to the unoffset model. Subsequently, the geometric analytical method was used to quickly determine the joint angles of the first few joints, excluding the end joint. Step 4: Optimal solution selection: Calculate the end position error corresponding to each group of solutions, and select the group with the smallest error as the final output.
2. The rapid inverse kinematics analysis method for an arc welding robot according to claim 1, characterized in that: The arc welding robot corresponding to the method is an industrial robot with six joints.
3. The rapid inverse kinematics analysis method for an arc welding robot according to claim 2, characterized in that: In step 1, firstly, let the expected homogeneous transformation matrix of the end effector be... : in, Let be a rotation matrix. For elements in the rotation matrix, p is the position vector. x p y p z These are elements in the position matrix; For a robot with wrist offset, let the offset vector of the 6th joint be in the end-effector coordinate system as... The true center of the wrist. for: in, This indicates the position offset of the bias vector from the end coordinate system to the base coordinate system.
4. The rapid inverse kinematics analysis method for an arc welding robot according to claim 3, characterized in that: [the method is described in the original text]. The current time is The control cycle is ; Given the current angle of the 6th joint angular velocity The system's maximum angular acceleration and maximum angular velocity ; According to the kinematics formulas for uniformly accelerated motion, then at the next moment... The upper limit of the joint angle is determined by the maximum positive acceleration. : The lower limit of the joint angle at the next moment is determined by the maximum negative acceleration. : At the same time, the maximum displacement in the next moment cannot exceed the maximum speed limit. The upper limit of the joint angle is determined by the maximum speed. The lower limit of the joint angle determined by the minimum speed: Combined with the physical rigidity of the joint Calculate the intermediate boundary: The final determined dynamic search range is: Width of the range .
5. The rapid inverse kinematics analysis method for an arc welding robot according to claim 4, characterized in that: In step 2, let the first The joint angle of the second sampling is The total number of samples is The calculation is as follows: in, The joint angle at the current moment ; Take a value of 0.5-0.8; This is an adaptive step size factor. , The initial scaling factor. The decay rate controls the step size as it increases with the number of iterations. Increase and decrease; To adapt to the disturbance amplitude, ; These are random coefficients; A uniformly distributed random number within the interval [0,1]. If the random walk goes beyond the boundary, then reflection is performed: If continuous The change in position error of the second sample is less than the threshold. If so, the sampling will be terminated early; ,in To sample the position value for the i-th random walk, The location value is sampled for the iMth random walk.
6. The rapid inverse kinematics analysis method for an arc welding robot according to claim 5, characterized in that: In step 3, the bias transformation and virtual model construction are performed first: For each sample Calculate the transformation matrix of the 6th joint. : Desired pose Reverse transformation to the origin of the 6th joint coordinate system: in, for Inverse matrix: extract position vector and rotation matrix .
7. The rapid inverse kinematics analysis method for an arc welding robot according to claim 6, characterized in that: Analytical solution for the first 5 joints: Let the length of the link from the base coordinate system to the third joint be... ; Solve for joint 1(q_1): Calculate the projection of the wrist center onto the XOY plane in the base coordinate system: Solve for joint 3(q_3): Calculate the cosine theorem parameters for the elbow plane; Let the square of the vector length from the first joint to the center of the wrist be: in For the first joint offset; Using the Law of Cosines: To guarantee the existence of a solution, the following must be satisfied: If not satisfied, then Invalid sample; To solve joint 2(q_2), we introduce intermediate variables K1 and K2: Solve for the pose of joints 4, 5, and 6: Calculate the rotation matrix generated by the first 3 joints ; The error between the desired wrist posture and the actual posture is used to solve for the last three joints; set up R 36 This is the pose transformation matrix from joint 3 to joint 6; Solving using Euler angles: like : 。 8. The rapid inverse kinematics analysis method for an arc welding robot according to claim 7, characterized in that: In step 4, for each set of solution vectors Calculate its forward kinematics results ; Define position error : Among them, P calc The calculated forward kinematics result T calc The position vector in P des The target position vector; Define attitude error : R calc The calculated forward kinematics result T calc The attitude rotation matrix, R des The target attitude rotation matrix; Comprehensive fitness function : in The weighting coefficient (usually taken as...) ); Traverse all Given a sample, select the solution with the smallest fitness: 。