A welding robot tcp calibration method and system
By sampling from a Poisson disk and maximizing the minimum singular value of the Jacobian matrix to generate the optimal measurement posture set, and combining the weighted least squares method to solve the TCP coordinates, the problems of uneven measurement posture distribution and noise interference are solved, and high precision and stability of TCP calibration for welding robots are achieved.
Patent Information
- Application Number
- CN202611685618.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-29
- Publication Date
- 2026-11-27
AI Technical Summary
In the existing TCP calibration process for welding robots, the uneven distribution of measurement pose and noise data interference lead to unstable calibration results, making it difficult to achieve high-precision tool center point coordinate calculation.
The optimal set of measurement attitudes is generated by the Poisson disk sampling algorithm, and the attitudes are screened by the strategy of minimizing the singular value of the observation Jacobian matrix. The TCP coordinates are solved by weighted least squares method to ensure the uniformity and independence of the measurement attitudes in spatial distribution and suppress the interference of abnormal data.
This improved the accuracy and anti-interference capability of TCP calibration for welding robots, and enhanced the stability and accuracy of calibration results.
Smart Images

Figure CN123175203A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of calibration, and in particular relates to a TCP calibration method and system for welding robots. Background Technology
[0002] Welding robots play a crucial role in modern industrial manufacturing, and the accuracy of trajectory tracking and welding operations depends on the reliable calibration of the tool center point (TCP). The basic principle of TCP calibration is to control the robot's end effector to touch a fixed reference point in space under multiple different postures, record multiple sets of flange center pose data in the robot's base coordinate system, and construct a set of kinematic calibration equations to solve for the specific position coordinates of the TCP. The choice of pose and spatial distribution of the measurement points affect the accuracy of the equations. Currently, the calibration process often involves operators manually teaching multiple touch postures based on experience, or generating measurement poses through conventional random sampling and simple angle offsets. These conventional pose selection methods are prone to uneven spatial distribution, local pose clustering, and even near-coplanarity. When the distribution of the measurement poses is unreasonable, the constructed calibration equations are prone to ill-conditioned characteristics at the mathematical level, leading to an increase in the condition number of the observation matrix.
[0003] In industrial calibration environments, interference from objective factors such as robot joint clearances, servo control jitter, and contact deformation during touch operations often results in outliers or abnormal measurement data containing significant noise mixed into the acquired multiple sets of pose data. Traditional calibration data processing methods typically treat all acquired pose data with equal importance for undifferentiated calculations, employing conventional algorithms to globally fit and solve overdetermined equations. This processing logic, which fails to evaluate and differentiate the quality of individual data sets, allows noisy data and abnormal touch points to exert an excessive influence on the overall calculation results, causing deviations in the calibration results and leading to poor overall stability. Therefore, how to rationally deploy and select multi-pose measurement sets with superior mathematical characteristics in space to optimize the intrinsic structure of the calibration equations, and how to evaluate and suppress the interference of abnormal measurement data during the data solution stage to calculate more stable tool center point coordinates, are technical problems that require further research and solutions in the field of welding robot calibration. Summary of the Invention
[0004] To improve the stability and coordinate accuracy of TCP calibration for welding robots, this invention provides a TCP calibration method and system for welding robots.
[0005] According to one aspect of the present invention, a TCP calibration method for a welding robot is provided, comprising the following steps: Based on nominal TCP coordinates and a preset attitude sampling range, multiple candidate measurement attitudes are generated in the unit quaternion space using the Poisson disk sampling algorithm. The minimum geodesic distance between any two candidate measurement attitudes is not less than a preset lower limit to obtain a set of candidate measurement attitudes. An initial attitude subset that meets the preset observable conditions is selected from the set of candidate measurement attitudes. The candidate attitudes are iteratively added based on the maximization of the minimum singular value of the Jacobian matrix corresponding to the currently selected attitude, to obtain the optimal set of measurement attitudes. The welding robot is controlled to perform multi-pose contact at fixed contact points in sequence according to the optimal measurement posture subset. Multiple sets of flange center pose data are collected in the robot base coordinate system. Based on the rotation matrix and translation vector in each set of pose data, an overdetermined calibration equation system with TCP coordinates and fixed contact point coordinates as unknowns is established. The initial TCP coordinates are obtained by solving the least squares method. Substitute the initial TCP coordinates back into each group of pose data, calculate the three-dimensional coordinates of the fixed touch point corresponding to each group and its Euclidean distance to the geometric center point, and use them as discreteness evaluation quantities. Determine the weight allocation interval based on the median, standard deviation and preset scaling factor of multiple discreteness evaluation quantities, assign corresponding calculation weights to each group of pose data, construct a weighted objective function, and use the weighted least squares method to solve the calibration equations again to obtain the final TCP coordinates used for robot control.
[0006] Optionally, the step of generating multiple candidate measurement attitudes using the Poisson disk sampling algorithm in the unit quaternion space, ensuring that the minimum geodesic distance between any two candidate measurement attitudes is not less than a preset distance lower limit, to obtain a candidate measurement attitude set includes: The attitude sampling range is transformed into a closed envelope surface interval in a unit quaternion space. The initial point of the corresponding reference attitude is extracted, placed into the closed envelope surface interval, and added to the candidate set. Within the envelope surface interval, new quaternion sampling point coordinates are generated by randomly expanding outward based on the existing coordinates in the candidate set. Calculate the absolute value of the inner product of the new quaternion sampling point coordinates and all the coordinates already saved in the candidate set, and calculate the spatial geodesic distance by taking the inverse cosine of the absolute value of the inner product and multiplying the result by 2. If the distance between the new quaternion sampling point coordinates and the spatial geodesic of all saved coordinates is not less than the preset lower limit, then the sampling point coordinates are added to the candidate measurement posture set. Repeat the expansion and distance verification steps until the total number of attitudes included in the candidate measurement attitude set reaches the set value.
[0007] Optionally, the step of iteratively adding candidate poses based on maximizing the minimum singular value of the observation Jacobian matrix corresponding to the currently selected pose includes: Select no fewer than three candidate postures that satisfy the non-coaxial constraint from the candidate measurement posture set as an initial posture subset, and construct the observation Jacobian basis matrix for the currently selected posture data, so that the observation Jacobian basis matrix satisfies the preset observability condition. For each candidate pose in the candidate measurement pose set that is not included in the optimal subset, the rotation parameters corresponding to the candidate pose are augmented to the observation Jacobian basis matrix to construct multiple independent test Jacobian matrices. Perform singular value decomposition on all test Jacobian matrices to obtain the minimum singular value of each test Jacobian matrix; Candidate poses corresponding to the test Jacobian matrix with the maximum and minimum singular values are selected and added to the optimal measurement pose subset. The observation Jacobian basis matrix is updated for the next round of iteration until the number of selected poses is not less than the preset lower limit of observables and the minimum singular value gain is less than the preset gain threshold.
[0008] Optionally, the step of establishing an overdetermined calibration equation system with TCP coordinates and fixed touch point coordinates as unknowns based on the rotation matrix and translation vector in each set of pose data, and solving for the initial TCP coordinates using the least squares method, includes: Extract the rotation matrix and translation vector parameters from multiple sets of flange center pose data; Using unknown TCP coordinates and unknown fixed point coordinates as state variables, an overdetermined system of equations is established based on kinematic constraints. The coefficient matrix consists of each set of attitude rotation matrices and the negative identity matrix, and the bias vector consists of the opposite vectors of each set of attitude translation vectors. The overdetermined system of equations is solved using pseudo-inverse matrix operations. First, the transpose of the coefficient matrix is multiplied by the coefficient matrix and inverted. Then, the resulting inverse matrix, the transpose of the coefficient matrix, and the bias vector are multiplied in sequence to obtain the state variables. The TCP coordinate part of the solved state variables is extracted and saved as the initial TCP coordinate output.
[0009] Optionally, substituting the initial TCP coordinates back into each group of pose data to calculate the three-dimensional coordinates of the corresponding fixed touch point and its Euclidean distance to the geometric center point, as a discreteness evaluation metric, includes: The three-dimensional coordinates of multiple fixed points obtained by combining multiple sets of pose data with the initial TCP coordinates are added together in the X, Y, and Z dimensions, and then divided by the total number to obtain the reference coordinate value of the geometric center point of the three-dimensional coordinates. For each set of pose data corresponding to three-dimensional coordinates, calculate the coordinate difference between the coordinates and the geometric center point in the X, Y, and Z dimensions. The coordinate differences in each dimension are squared and summed. The square root operation is performed on the summation result to obtain the true spatial Euclidean distance from the three-dimensional coordinates to the geometric center point. The Euclidean distance is used as the discreteness evaluation metric for the pose data.
[0010] Optionally, the step of determining the weight allocation interval based on the median, standard deviation, and preset scaling factor of multiple dispersion evaluation quantities, and assigning corresponding calculation weights to each group of pose data, includes: The median of the global dispersion evaluation is extracted and assigned to the first threshold. The standard deviation of the global dispersion evaluation is extracted and multiplied by a preset positive proportionality coefficient. The resulting product is added to the first threshold to obtain the second threshold. Compare the numerical range of the dispersion evaluation value of the current pose data one by one; When the dispersion evaluation value is less than or equal to the first threshold, the weight is calculated as 1; When the dispersion evaluation value is between the first threshold and the second threshold, the difference between the current dispersion evaluation value and the second threshold is subtracted, and then divided by the difference between the second threshold and the first threshold to obtain a decreasing weight quotient value. The weight quotient value is used as the calculation weight corresponding to the current pose data. When the dispersion evaluation value is greater than or equal to the second threshold, the weight is calculated as 0.
[0011] Optionally, the calibration equations are solved again using the weighted least squares method to obtain the final TCP coordinates for robot control, including: Construct a global diagonal weight matrix. Repeat the calculation weights obtained three times according to the corresponding order of the pose data and fill them into the main diagonal elements of the diagonal weight matrix. Set all other off-diagonal elements of the matrix to zero. The diagonal weight matrix is input into the original overdetermined system of equations to construct a weighted observation model; The weighted pseudo-inverse algorithm is used to solve the objective equation. When the weighted information matrix satisfies the invertibility condition, the state variables are obtained by multiplying the inverse of the product of the transpose of the coefficient matrix and the diagonal weight matrix and the coefficient matrix by the product of the transpose of the coefficient matrix, the diagonal weight matrix and the bias vector. When the weighted information matrix does not satisfy the invertibility condition, some zero-weight pose data are restored to the preset minimum positive weight or the pose is supplemented and then solved. The tool center point coordinate parameters in the state variables are extracted as TCP coordinate results output.
[0012] According to another aspect of the present invention, a TCP calibration system for welding robots is provided, comprising the following modules: The generation module is used to generate multiple candidate measurement attitudes in a unit quaternion space based on nominal TCP coordinates and a preset attitude sampling range using the Poisson disk sampling algorithm. It ensures that the minimum geodesic distance between any two candidate measurement attitudes is not less than a preset lower limit to obtain a set of candidate measurement attitudes. An initial attitude subset that meets the preset observable conditions is selected from the set of candidate measurement attitudes. The candidate attitudes are iteratively added based on the maximization of the minimum singular value of the Jacobian matrix corresponding to the currently selected attitude, to obtain the optimal set of measurement attitudes. A module is established to control the welding robot to perform multi-pose contact at fixed contact points in sequence according to the optimal measurement posture subset. Multiple sets of flange center pose data are collected in the robot base coordinate system. Based on the rotation matrix and translation vector in each set of pose data, an overdetermined calibration equation system with TCP coordinates and fixed contact point coordinates as unknowns is established, and the initial TCP coordinates are obtained by solving the least squares method. The calculation module is used to substitute the initial TCP coordinates back into each group of pose data, calculate the three-dimensional coordinates of the fixed touch point corresponding to each group and its Euclidean distance to the geometric center point, and use them as discreteness evaluation quantities. Based on the median, standard deviation and preset scaling factor of multiple discreteness evaluation quantities, the weight allocation interval is determined, and corresponding calculation weights are assigned to each group of pose data. A weighted objective function is constructed, and the calibration equations are solved again using the weighted least squares method to obtain the final TCP coordinates used for robot control.
[0013] Preferably, the step of generating multiple candidate measurement attitudes using the Poisson disk sampling algorithm in a unit quaternion space, ensuring that the minimum geodesic distance between any two candidate measurement attitudes is not less than a preset distance lower limit, to obtain a candidate measurement attitude set includes: The attitude sampling range is transformed into a closed envelope surface interval in a unit quaternion space. The initial point of the corresponding reference attitude is extracted, placed into the closed envelope surface interval, and added to the candidate set. Within the envelope surface interval, new quaternion sampling point coordinates are generated by randomly expanding outward based on the existing coordinates in the candidate set. Calculate the absolute value of the inner product of the new quaternion sampling point coordinates and all the coordinates already saved in the candidate set, and calculate the spatial geodesic distance by taking the inverse cosine of the absolute value of the inner product and multiplying the result by 2. If the distance between the new quaternion sampling point coordinates and the spatial geodesic of all saved coordinates is not less than the preset lower limit, then the sampling point coordinates are added to the candidate measurement posture set. Repeat the expansion and distance verification steps until the total number of attitudes included in the candidate measurement attitude set reaches the set value.
[0014] Preferably, the step of iteratively adding candidate poses based on maximizing the minimum singular value of the observation Jacobian matrix corresponding to the currently selected pose includes: Select no fewer than three candidate postures that satisfy the non-coaxial constraint from the candidate measurement posture set as an initial posture subset, and construct the observation Jacobian basis matrix for the currently selected posture data, so that the observation Jacobian basis matrix satisfies the preset observability condition. For each candidate pose in the candidate measurement pose set that is not included in the optimal subset, the rotation parameters corresponding to the candidate pose are augmented to the observation Jacobian basis matrix to construct multiple independent test Jacobian matrices. Perform singular value decomposition on all test Jacobian matrices to obtain the minimum singular value of each test Jacobian matrix; Candidate poses corresponding to the test Jacobian matrix with the maximum and minimum singular values are selected and added to the optimal measurement pose subset. The observation Jacobian basis matrix is updated for the next round of iteration until the number of selected poses is not less than the preset lower limit of observables and the minimum singular value gain is less than the preset gain threshold.
[0015] Preferably, the step of establishing an overdetermined calibration equation system with TCP coordinates and fixed touch point coordinates as unknowns based on the rotation matrix and translation vector in each set of pose data, and solving for the initial TCP coordinates using the least squares method, includes: Extract the rotation matrix and translation vector parameters from multiple sets of flange center pose data; Using unknown TCP coordinates and unknown fixed point coordinates as state variables, an overdetermined system of equations is established based on kinematic constraints. The coefficient matrix consists of each set of attitude rotation matrices and the negative identity matrix, and the bias vector consists of the opposite vectors of each set of attitude translation vectors. The overdetermined system of equations is solved using pseudo-inverse matrix operations. First, the transpose of the coefficient matrix is multiplied by the coefficient matrix and inverted. Then, the resulting inverse matrix, the transpose of the coefficient matrix, and the bias vector are multiplied in sequence to obtain the state variables. The TCP coordinate part of the solved state variables is extracted and saved as the initial TCP coordinate output.
[0016] Preferably, the step of substituting the initial TCP coordinates back into each group of pose data, calculating the three-dimensional coordinates of the corresponding fixed touch point and its Euclidean distance to the geometric center point for each group, as a discreteness evaluation metric, includes: The three-dimensional coordinates of multiple fixed points obtained by combining multiple sets of pose data with the initial TCP coordinates are added together in the X, Y, and Z dimensions, and then divided by the total number to obtain the reference coordinate value of the geometric center point of the three-dimensional coordinates. For each set of pose data corresponding to three-dimensional coordinates, calculate the coordinate difference between the coordinates and the geometric center point in the X, Y, and Z dimensions. The coordinate differences in each dimension are squared and summed. The square root operation is performed on the summation result to obtain the true spatial Euclidean distance from the three-dimensional coordinates to the geometric center point. The Euclidean distance is used as the discreteness evaluation metric for the pose data.
[0017] Preferably, the step of determining the weight allocation interval based on the median, standard deviation, and preset scaling factor of multiple dispersion evaluation quantities, and assigning corresponding calculation weights to each group of pose data, includes: The median of the global dispersion evaluation is extracted and assigned to the first threshold. The standard deviation of the global dispersion evaluation is extracted and multiplied by a preset positive proportionality coefficient. The resulting product is added to the first threshold to obtain the second threshold. Compare the numerical range of the dispersion evaluation value of the current pose data one by one; When the dispersion evaluation value is less than or equal to the first threshold, the weight is calculated as 1; When the dispersion evaluation value is between the first threshold and the second threshold, the difference between the current dispersion evaluation value and the second threshold is subtracted, and then divided by the difference between the second threshold and the first threshold to obtain a decreasing weight quotient value. The weight quotient value is used as the calculation weight corresponding to the current pose data. When the dispersion evaluation value is greater than or equal to the second threshold, the weight is calculated as 0.
[0018] Preferably, the step of solving the calibration equations again using the weighted least squares method to obtain the final TCP coordinates for robot control includes: Construct a global diagonal weight matrix. Repeat the calculation weights obtained three times according to the corresponding order of the pose data and fill them into the main diagonal elements of the diagonal weight matrix. Set all other off-diagonal elements of the matrix to zero. The diagonal weight matrix is input into the original overdetermined system of equations to construct a weighted observation model; The weighted pseudo-inverse algorithm is used to solve the objective equation. When the weighted information matrix satisfies the invertibility condition, the state variables are obtained by multiplying the inverse of the product of the transpose of the coefficient matrix and the diagonal weight matrix and the coefficient matrix by the product of the transpose of the coefficient matrix, the diagonal weight matrix and the bias vector. When the weighted information matrix does not satisfy the invertibility condition, some zero-weight pose data are restored to the preset minimum positive weight or the pose is supplemented and then solved. The tool center point coordinate parameters in the state variables are extracted as TCP coordinate results output.
[0019] This invention generates an optimal subset of measurement postures by employing a Poisson disk sampling algorithm within a unit quaternion space and combining it with a strategy to maximize the minimum singular value of the observed Jacobian matrix. This ensures the uniformity and independence of the spatial distribution of measurement postures, improves the ill-conditioned nature of the calibration equations, and enhances the stability of the measurement point distribution from the data acquisition source. The Euclidean distance from the fixed touch point's 3D coordinates to the geometric center is calculated using the initial TCP coordinates as a discreteness evaluation metric. Based on this metric and statistical characteristics, calculation weights are assigned to each group of posture data, and the TCP coordinates are solved using the weighted least squares method. This mechanism can identify and suppress abnormal measurement data caused by operational deviations or noise, reducing the negative interference of a single abnormal touch on the overall calibration results and improving the accuracy and anti-interference capability of the welding robot's TCP calibration. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of multi-pose touch calibration; Figure 2 This is a schematic diagram of the TCP calibration device for a welding robot. Detailed Implementation
[0021] In this application, the terms "exemplarily" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0022] In the first embodiment, the present invention proposes a TCP calibration method for welding robots, comprising the following steps: S1. Based on the nominal TCP coordinates and the preset attitude sampling range, multiple candidate measurement attitudes are generated in the unit quaternion space using the Poisson disk sampling algorithm. The minimum geodesic distance between any two candidate measurement attitudes is not less than the preset lower limit of distance to obtain the candidate measurement attitude set. An initial attitude subset that meets the preset observable conditions is selected from the candidate measurement attitude set. The candidate attitudes are iteratively added based on the maximization of the minimum singular value of the Jacobian matrix corresponding to the currently selected attitude, to obtain the optimal measurement attitude subset.
[0023] Based on the actual operational requirements of the robot, allowable variation ranges for yaw, pitch, and roll angles are set. Using a preset reference attitude as a baseline, these allowable variation ranges are mapped to the unit quaternion space corresponding to the three-dimensional rotation group to form sampling boundaries. The nominal TCP coordinates are used to provide the initial position value of the tool center point. The preset reference attitude is determined by the nominal tool attitude associated with the tool coordinate system in the robot controller, the flange's vertically downward base attitude, or the manually taught baseline attitude. The preset position coordinates of the fixed contact point in the robot's base coordinate system are obtained. The preset position coordinates Obtained from the calibration cone installation position, external measurement results, or manual teaching; for any candidate quaternion attitude Convert it into a rotation matrix and based on the nominal TCP coordinates Calculate the corresponding nominal flange center position If the nominal flange center position If a candidate pose exceeds the robot's workspace, joint range of motion, or preset safety boundary, it is removed. The initial unit quaternion corresponding to the reference pose is extracted as the first candidate measurement pose and stored in the active list and candidate measurement pose set. A current reference pose is randomly selected from the active list, and a specified number of new unit quaternions are randomly generated within a hyper-annular region centered on this current reference pose, with an inner diameter equal to a preset lower distance limit and an outer diameter equal to twice the preset lower distance limit.
[0024] For each new unit quaternion, calculate the geodesic distance between the quaternion and all existing attitudes in the candidate measurement attitude set. The geodesic distance is calculated by first taking the absolute value of the dot product of the new unit quaternion and the existing attitude quaternions, then taking the inverse cosine of this absolute value, and multiplying the result by 2. If the geodesic distance between a new unit quaternion and all existing attitudes is not less than a preset lower distance limit and is within the sampling boundary, then the quaternion is added to the candidate measurement attitude set and the active list. If no new unit quaternion meeting the conditions can be generated around the current reference attitude, then the current reference attitude is removed from the active list. Repeat the above process of generating the hyperring region and verifying the geodesic distance. The preset value is determined based on the sampling boundary range and the preset lower distance limit, and is not greater than the upper limit of the number of candidate attitudes that the sampling boundary can accommodate under the preset lower distance limit. If the active list is empty and the total number of attitudes included in the candidate measurement attitude set has not yet reached the preset value, then reconfigure the preset lower distance limit, attitude sampling range, or the preset value and re-execute sampling. When the total number of attitudes included in the candidate measurement attitude set reaches the set value, the generation of the candidate measurement attitude set is completed.
[0025] Entering the iterative optimization phase, at least three candidate measurement attitudes satisfying the non-coaxial constraint are selected from the candidate measurement attitude set as an initial attitude subset, and the observation Jacobian basis matrix formed by the initial attitude subset satisfies a preset observability condition. In one embodiment, two candidate measurement attitudes with large geodesic distances are first selected, and then a third or more candidate measurement attitudes are selected from the remaining candidate attitudes that satisfy a preset observability threshold for the minimum singular value of the observation Jacobian basis matrix, as the initial optimal measurement attitude subset, such as... Figure 1 As shown, the end effectors of three robots in different poses point to the same point Y. Each pose data set includes a rotation matrix. With translation vector The translation vector This indicates the position of the flange center in the robot's base coordinate system under the corresponding posture, with contact completed at a fixed contact point.
[0026] Establish a calibration mathematical model, in which the rotation matrix of the i-th pose is... With TCP coordinate column vector The product of the first and second poses, plus the translation vector of the i-th pose. , equal to the column vector of fixed contact point coordinates Transform the TCP coordinate column vector column vector of fixed touch point coordinates Together, they form a six-dimensional state variable, which is the state variable to be determined. The observation coefficient block corresponding to each attitude group is: The corresponding bias term is The multiple observation coefficient blocks corresponding to the currently selected attitude are stacked sequentially in the row direction to form the current observation Jacobian basis matrix.
[0027] In each iteration, the remaining candidate poses that have not yet been selected in the current candidate measurement pose set are traversed, and the observation coefficient block corresponding to each remaining candidate pose is set. The corresponding test Jacobian matrix is constructed by vertically stitching the matrix into rows below the selected attitudes within the current optimal measurement attitude subset.
[0028] The temporary Jacobian matrix is decomposed using a singular value decomposition (SVD) algorithm. All singular values in the resulting diagonal matrix are extracted, and the minimum singular value is selected as the evaluation metric for the remaining candidate poses. The evaluation metrics of all remaining candidate poses are compared, and the remaining candidate pose with the largest minimum singular value is removed from the candidate measurement pose set and permanently added to the optimal measurement pose subset. This traversal evaluation and addition process is repeated. After the number of selected poses is not less than a preset lower limit for observables, the gain of the minimum singular value in this round relative to the minimum singular value in the previous round is calculated. When the gain is less than a preset gain threshold, the iteration terminates, and the optimal measurement pose subset is output.
[0029] In an optional embodiment, the step of generating multiple candidate measurement postures using the Poisson disk sampling algorithm in a unit quaternion space, ensuring that the minimum geodesic distance between any two candidate measurement postures is not less than a preset distance lower limit, to obtain a candidate measurement posture set includes: The attitude sampling range is transformed into a closed envelope surface interval in a unit quaternion space. The initial point of the corresponding reference attitude is extracted, placed into the closed envelope surface interval, and added to the candidate set. Within the envelope surface interval, new quaternion sampling point coordinates are generated by randomly expanding outward based on the existing coordinates in the candidate set. Calculate the absolute value of the inner product of the new quaternion sampling point coordinates and all the coordinates already saved in the candidate set, and calculate the spatial geodesic distance by taking the inverse cosine of the absolute value of the inner product and multiplying the result by 2. If the distance between the new quaternion sampling point coordinates and the spatial geodesic of all saved coordinates is not less than the preset lower limit, then the sampling point coordinates are added to the candidate measurement posture set. Repeat the expansion and distance verification steps until the total number of attitudes included in the candidate measurement attitude set reaches the set value.
[0030] Set the attitude sampling range, for example , , Euler angles are within the range of [-30°, 30°], and this range is mapped to an envelope surface in unit quaternion space. The flange's vertically downward base posture is extracted as a reference posture, and this reference posture is converted into the corresponding initial unit quaternion point. The initial quaternion point is placed as the first pose point into the candidate set C and the active list L. A random expansion algorithm is then initiated, and in each round of expansion, a stored quaternion is randomly selected from the active list L. In the neighborhood of the quaternion geodesic, such as the distance lower limit rad to A perturbation rotation is randomly generated within the range. Rotate the disturbance with Multiplication yields the coordinates of the new quaternion sampling points. .
[0031] extract With each quaternion coordinate already saved in the candidate set Perform the absolute value operation of the inner product, and follow the formula. Calculate spatial geodesic distance For example, if the absolute value of the inner product is calculated to be 0.992, then the geodesic distance is approximately 0.253 rad. (Compare one by one.) With all saved coordinates If all All are not less than the preset lower limit of distance. =0.15rad, then the coordinates of the new sampling point are added to the candidate measurement attitude set C. The above expansion generation and distance verification steps are executed repeatedly until the total number of attitudes included in the candidate measurement attitude set C reaches 50, provided that the set number of targets (50) does not exceed the upper limit of the number that can be accommodated corresponding to the current sampling boundary and the lower distance limit. If the active list L is empty and has not yet reached 50, then the lower distance limit is adjusted. After sampling the attitude range or the number of targets, resample to obtain a candidate measurement attitude set.
[0032] In an optional embodiment, the step of iteratively adding candidate poses based on maximizing the minimum singular value of the observation Jacobian matrix corresponding to the currently selected pose includes: Select no fewer than three candidate postures that satisfy the non-coaxial constraint from the candidate measurement posture set as an initial posture subset, and construct the observation Jacobian basis matrix for the currently selected posture data, so that the observation Jacobian basis matrix satisfies the preset observability condition. For each candidate pose in the candidate measurement pose set that is not included in the optimal subset, the rotation parameters corresponding to the candidate pose are augmented to the observation Jacobian basis matrix to construct multiple independent test Jacobian matrices. Perform singular value decomposition on all test Jacobian matrices to obtain the minimum singular value of each test Jacobian matrix; Candidate poses corresponding to the test Jacobian matrix with the maximum and minimum singular values are selected and added to the optimal measurement pose subset. The observation Jacobian basis matrix is updated for the next round of iteration until the number of selected poses is not less than the preset lower limit of observables and the minimum singular value gain is less than the preset gain threshold.
[0033] Calculate the geodesic distances between 50 candidate poses, and select the two candidate poses with the largest mutual geodesic distances as the initial candidate combination. Then, iterate through the remaining candidate poses, combining each remaining candidate pose with the two candidate poses mentioned above to form an initial pose subset containing three poses. For each initial pose subset, extract the corresponding rotation matrix. and in accordance with The stacking of these forms yields a 9×6 observation Jacobian basis matrix. The initial set of attitudes that has the largest minimum singular value and satisfies the preset observable threshold is selected as the initial set of the optimal measurement attitude subset.
[0034] For any unselected pose k among the remaining candidate poses, extract the rotation matrix corresponding to the unselected pose. And construct coefficient sub-blocks Extend the sub-block by vertically concatenating it along the row direction to the current position. At the bottom, the corresponding test Jacobian matrix is constructed independently. .
[0035] The test Jacobian matrix is constructed for each candidate pose that is not currently included in the optimal measurement pose subset. Singular value decomposition is performed using the SVD algorithm, and the minimum singular value is extracted from the resulting diagonal matrix. Among all results, the test Jacobian matrix with the maximum and minimum singular values is selected. For example, if the matrix maximizes the minimum singular value from 2.15 to 2.87, the m-th candidate pose that produces this maximum singular value is added to the optimal measured pose subset, and then... Overwrite update the current At the end of each iteration, the difference between the maximum minimum singular value obtained in this iteration and the singular value in the previous iteration is calculated. The iteration terminates when the number of selected poses is not less than a preset lower limit for the number of observables, and the difference is less than a preset gain threshold, such as 0.01. In this embodiment, the number of poses in the output optimal subset of measured poses does not exceed 15. Figure 2 As shown in the figure, the welding robot body, end-effector welding gun, welding wire tip TCP, and calibration cone are labeled. The welding wire tip is aligned with and contacts the apex of the calibration cone to complete the touch sampling.
[0036] S2, control the welding robot to perform multi-pose contact at fixed contact points in sequence according to the optimal measurement posture subset, collect multiple sets of flange center pose data in the robot base coordinate system, establish an overdetermined calibration equation system with TCP coordinates and fixed contact point coordinates as unknowns based on the rotation matrix and translation vector in each set of pose data, and obtain the initial TCP coordinates by solving the least squares method.
[0037] Each unit quaternion in the optimal measurement posture subset is converted into Euler angle commands or rotation matrix commands recognizable by the robot controller. For the i-th target posture, the preset position coordinates of the fixed touch point are used. The rotation matrix corresponding to the target's attitude and nominal TCP coordinates Calculate the target translation position of the flange center. , and by and Together they constitute the six-dimensional target pose of the robot's end effector flange.
[0038] The six-dimensional target pose is input into the robot's inverse kinematics module to solve for joint angle commands that satisfy joint limits and reachability constraints. If multiple inverse kinematics solutions exist, the solution with the smallest distance from the current robot joint state and that satisfies the safety boundary is selected as the execution command. The robot first moves to an approach pose that deviates from the fixed contact point by a preset safety distance along the tool axis, and then performs low-speed linear feed along the tool axis until the welding wire tip aligns with and contacts the apex of the calibration cone. After contact is completed, the flange center pose data in the base coordinate system under the current state is read through the application programming interface. This data consists of a three-dimensional translation vector and a third-order rotation matrix. After completing the contact of all optimal measurement poses, a total of N sets of flange center pose data are obtained.
[0039] Let the unknown three-dimensional TCP coordinate column vector be... The unknown fixed contact point's three-dimensional coordinate column vector is For the first to Nth data sets, construct rotation matrices of the form of the i-th data set. Multiply Add the i-th group of translation vectors ,equal The initial equation. and Concatenate into six-dimensional state variables And each set of equations is organized into .
[0040] The coefficient sub-blocks corresponding to N sets of attitudes By vertically concatenating the columns in the row direction, a coefficient matrix A of size 3N rows × 6 columns is constructed; the coefficients corresponding to the N groups of poses are then... By vertically concatenating the rows, a bias vector B of size 3N rows × 1 column is constructed. This leads to an overdetermined calibration equation system of the form A·X = B. In the least squares solution stage, the coefficient matrix A is transposed to obtain... ,Will Multiplying by A yields a square matrix. Calculate the inverse of this square matrix and multiply the inverse by... Then multiply by the bias vector B to obtain the six-dimensional state variable X. Extract the TCP coordinate portion from the six-dimensional state variable X as the initial TCP coordinate.
[0041] In an optional embodiment, the step of establishing an overdetermined calibration equation system with TCP coordinates and fixed touch point coordinates as unknowns based on the rotation matrix and translation vector in each set of pose data, and solving for the initial TCP coordinates using the least squares method, includes: Extract the rotation matrix and translation vector parameters from multiple sets of flange center pose data; Using unknown TCP coordinates and unknown fixed point coordinates as state variables, an overdetermined system of equations is established based on kinematic constraints. The coefficient matrix consists of each set of attitude rotation matrices and the negative identity matrix, and the bias vector consists of the opposite vectors of each set of attitude translation vectors. The overdetermined system of equations is solved using pseudo-inverse matrix operations. First, the transpose of the coefficient matrix is multiplied by the coefficient matrix and inverted. Then, the resulting inverse matrix, the transpose of the coefficient matrix, and the bias vector are multiplied in sequence to obtain the state variables. The TCP coordinate part of the solved state variables is extracted and saved as the initial TCP coordinate output.
[0042] Based on the acquired 15 sets of flange center pose data, the 3×3 rotation matrix corresponding to the i-th set of data is extracted respectively. and 3×1 translation vector Let i = 1, 2, ..., 15. Transform the three-dimensional TCP coordinates... and three-dimensional fixed point coordinates The splicing is set as a global state variable with a dimension of 6×1. .Establish The constraints are defined. A coefficient matrix of dimension 45×6 is constructed by stacking 15 sets of data sequentially. and a global bias vector of dimension 45×1. .
[0043] After constructing the overdetermined system of equations A·X=B, the pseudo-inverse solution process using the least squares method is executed. Specifically, the calculation logic involves first finding the transpose of matrix A. The matrix A has a dimension of 6×45. Multiplying the transpose of the matrix A with the original matrix A yields a 6×6 square matrix, and then the inverse matrix is obtained. Then, the inverse matrix is combined with... Multiply the bias vector B together and perform the formula. Obtain the state variables. Extract the first 3 elements from the solution vector X, for example, calculate the result as follows: The elements are separated and used as initial TCP coordinates. And save it.
[0044] S3, substitute the initial TCP coordinates back into each group of pose data, calculate the three-dimensional coordinates of the fixed touch point corresponding to each group and its Euclidean distance to the geometric center point, and use them as discreteness evaluation quantities. Determine the weight allocation interval based on the median, standard deviation and preset scaling factor of multiple discreteness evaluation quantities, assign corresponding calculation weights to each group of pose data, construct a weighted objective function, and use the weighted least squares method to solve the calibration equation system again to obtain the final TCP coordinates used for robot control.
[0045] For the previously acquired N sets of flange center pose data, the rotation matrix of each set is multiplied by the obtained initial TCP coordinate column vector. The product is then added to the corresponding translation vector to obtain N different calculated 3D coordinates of the fixed contact point in the base coordinate system. The arithmetic mean of these N calculated 3D coordinates is calculated along the X, Y, and Z axes, and these three mean values are combined to form the 3D coordinates of the spatial geometric center point. For each set of pose data, the spatial Euclidean distance between the calculated 3D coordinates of the corresponding fixed contact point and the spatial geometric center point is calculated, and the root value is used as the dispersion evaluation metric for that set of pose data.
[0046] After iterating through all N sets of data to obtain N discreteness evaluation metrics, the N discreteness evaluation metrics are sorted, and the median is extracted as the first threshold. Calculate the standard deviation of N dispersion evaluation metrics. and the standard deviation Multiplied by a preset proportionality coefficient k and then compared with the first threshold Add them together to get the second threshold. .
[0047] In the weight allocation phase, the magnitude of each dispersion evaluation value is evaluated one by one. If the dispersion evaluation value of a certain set of pose data is less than or equal to the first threshold... If the weight of the pose data set is greater than the first threshold, then the weight of the pose data set is assigned to 1. And less than the second threshold Then according to Calculate decreasing computational weights; if the dispersion evaluation value of a certain set of pose data is greater than or equal to the second threshold. If so, the calculation weight of this set of pose data is assigned to 0.
[0048] After obtaining N computational weights, construct a diagonal weight matrix of size 3N×3N. The diagonal elements of this weight matrix are formed by repeatedly calculating the weights from group 1 to group N three times each, while all other off-diagonal elements are zero. For weighted solutions, the diagonal weight matrix is... Input the original overdetermined system of equations A·X=B and construct a weighted objective function.
[0049] The weighted least squares method is used to solve for the six-dimensional state variables. Specifically, the calculation is performed first. Obtain the weighted information matrix and determine whether the weighted coefficient matrix composed of pose data corresponding to non-zero weights satisfies the preset full rank condition; the preset full rank condition includes the column rank of the weighted coefficient matrix reaching the six-dimensional state variable dimension, or its minimum singular value being greater than the preset invertible threshold.
[0050] When the weighted information matrix satisfies the invertibility condition, its inverse matrix is obtained, and then... Solve for the final state variable; when the weighted information matrix does not satisfy the invertibility condition, restore some pose data with a weight of 0 to a preset minimum positive weight according to the order of discreteness evaluation quantity from small to large, wherein the preset minimum positive weight ε satisfies 0 < ε < 1; in one embodiment, ε takes a preset constant in the range of 0.01 to 0.1, preferably 0.05; in another embodiment, ε is equal to the product of the current non-zero minimum calculated weight and the preset restoration coefficient η, wherein the preset restoration coefficient η satisfies 0 < η < 1. Repeat the restoration and recalculation of the weighted information matrix until the weighted coefficient matrix satisfies the preset full rank condition before performing weighted least squares solution. If all acquired pose data still does not satisfy the preset full rank condition after being restored to positive weights, return to the pose screening step to supplement new measurement poses and reacquire pose data. From the final state variable The TCP coordinates are extracted and used as the TCP coordinates for the welding robot control system.
[0051] In an optional embodiment, substituting the initial TCP coordinates back into each set of pose data and calculating the corresponding three-dimensional coordinates of the fixed touch point and its Euclidean distance to the geometric center point for each set, as a discreteness evaluation metric, includes: The three-dimensional coordinates of multiple fixed points obtained by combining multiple sets of pose data with the initial TCP coordinates are added together in the X, Y, and Z dimensions, and then divided by the total number to obtain the reference coordinate value of the geometric center point of the three-dimensional coordinates. For each set of pose data corresponding to three-dimensional coordinates, calculate the coordinate difference between the coordinates and the geometric center point in the X, Y, and Z dimensions. The coordinate differences in each dimension are squared and summed. The square root operation is performed on the summation result to obtain the true spatial Euclidean distance from the three-dimensional coordinates to the geometric center point. The Euclidean distance is used as the discreteness evaluation metric for the pose data.
[0052] Using the calculated initial TCP coordinates Substitute these values back into each set of observed pose data, and then use the formula... Fifteen sets of estimated three-dimensional spatial coordinates of fixed points were reconstructed. The 15 coordinates are summed along each dimension, and then divided by the total number of samples (15) to obtain the geometric center of the spatial point cluster. For example, the calculated center reference coordinates are: mm mm mm.
[0053] The coordinates of the fixed point reconstructed from the i-th set of data ,like Calculate the coordinates and geometric center point dimension by dimension. The coordinate difference is obtained. , , The three coordinate differences are squared separately and then summed to obtain a square root. The Euclidean distance between the i-th fixed point and the global center is then calculated. For example, the calculated result is approximately 0.194 mm. The calculated spatial Euclidean distances are recorded sequentially to form a set of discreteness evaluation metrics for each set of pose observation data. .
[0054] In an optional embodiment, the step of determining the weight allocation interval based on the median, standard deviation, and preset scaling factor of multiple dispersion evaluation quantities, and assigning corresponding calculated weights to each group of pose data, includes: The median of the global dispersion evaluation is extracted and assigned to the first threshold. The standard deviation of the global dispersion evaluation is extracted and multiplied by a preset positive proportionality coefficient. The resulting product is added to the first threshold to obtain the second threshold. Compare the numerical range of the dispersion evaluation value of the current pose data one by one; When the dispersion evaluation value is less than or equal to the first threshold, the weight is calculated as 1; When the dispersion evaluation value is between the first threshold and the second threshold, the difference between the current dispersion evaluation value and the second threshold is subtracted, and then divided by the difference between the second threshold and the first threshold to obtain a decreasing weight quotient value. The weight quotient value is used as the calculation weight corresponding to the current pose data. When the dispersion evaluation value is greater than or equal to the second threshold, the weight is calculated as 0.
[0055] For a set D consisting of 15 discrete evaluation metrics, the set is numerically sorted, and the value in the middle position is extracted and set as the first threshold. ,For example mm. Sample standard deviation of a statistical set. For example, a standard deviation of 0.08 mm is set, and a proportionality coefficient k is set, such as 2.0. The standard deviation is multiplied by the proportionality coefficient and then added to the first threshold to obtain the second threshold. ,For example mm. The evaluation quantity for any set of pose data. Implement piecewise function judgment.
[0056] When the dispersion evaluation value is less than or equal to the first threshold, such as Assign calculation weights When the dispersion evaluation value is between the first threshold and the second threshold, for example... ,like According to the formula The calculated weight quotient is 0.5, meaning a weight of 0.5 is assigned to this group. When the dispersion evaluation value is greater than or equal to the second threshold, such as... Assign computational weights .
[0057] In an optional embodiment, the calibration equations are solved again using the weighted least squares method to obtain the final TCP coordinates for robot control, including: Construct a global diagonal weight matrix. Repeat the calculation weights obtained three times according to the corresponding order of the pose data and fill them into the main diagonal elements of the diagonal weight matrix. Set all other off-diagonal elements of the matrix to zero. The diagonal weight matrix is input into the original overdetermined system of equations to construct a weighted observation model; The weighted pseudo-inverse algorithm is used to solve the objective equation. When the weighted information matrix satisfies the invertibility condition, the state variables are obtained by multiplying the inverse of the product of the transpose of the coefficient matrix and the diagonal weight matrix and the coefficient matrix by the product of the transpose of the coefficient matrix, the diagonal weight matrix and the bias vector. When the weighted information matrix does not satisfy the invertibility condition, some zero-weight pose data are restored to the preset minimum positive weight or the pose is supplemented and then solved. The tool center point coordinate parameters in the state variables are extracted as TCP coordinate results output.
[0058] Based on the 15 calculated weights to Construct a global square matrix with dimensions 45×45. The i-th weight value Repeat 3 times consecutively, in the order of the data index. , , , ,..., , , These 45 scalars are sequentially filled along the main diagonal of the matrix, while all elements off the main diagonal are set to zero, generating a diagonal weight matrix. .
[0059] The weight matrix Together with the original model coefficient matrix A (45×6 dimension) and the bias vector B (45×1 dimension), they are used to construct a weighted observation model with the objective of minimizing the weighted sum of squared residuals. In the calculation... Next, it is determined whether the observed data corresponding to the non-zero weights satisfy the full-rank solution condition for the six-dimensional state variables. If not, the weights of the data that were set to zero are restored in ascending order of dispersion as a preset minimum positive weight. The preset minimum positive weight ε is a preset constant in the range of 0.01 to 0.1, or it is obtained by multiplying the current minimum non-zero weight by a preset restoration coefficient η, until the full-rank condition is met. Then, the matrix is inverted and then combined with... Multiplication, through the chain of products Solve for the state variables .
[0060] In a second embodiment, the present invention also provides a TCP calibration system for a welding robot, comprising the following modules: The generation module is used to generate multiple candidate measurement attitudes in a unit quaternion space based on nominal TCP coordinates and a preset attitude sampling range using the Poisson disk sampling algorithm. It ensures that the minimum geodesic distance between any two candidate measurement attitudes is not less than a preset lower limit to obtain a set of candidate measurement attitudes. An initial attitude subset that meets the preset observable conditions is selected from the set of candidate measurement attitudes. The candidate attitudes are iteratively added based on the maximization of the minimum singular value of the Jacobian matrix corresponding to the currently selected attitude, to obtain the optimal set of measurement attitudes. A module is established to control the welding robot to perform multi-pose contact at fixed contact points in sequence according to the optimal measurement posture subset. Multiple sets of flange center pose data are collected in the robot base coordinate system. Based on the rotation matrix and translation vector in each set of pose data, an overdetermined calibration equation system with TCP coordinates and fixed contact point coordinates as unknowns is established, and the initial TCP coordinates are obtained by solving the least squares method. The calculation module is used to substitute the initial TCP coordinates back into each group of pose data, calculate the three-dimensional coordinates of the fixed touch point corresponding to each group and its Euclidean distance to the geometric center point, and use them as discreteness evaluation quantities. Based on the median, standard deviation and preset scaling factor of multiple discreteness evaluation quantities, the weight allocation interval is determined, and corresponding calculation weights are assigned to each group of pose data. A weighted objective function is constructed, and the calibration equations are solved again using the weighted least squares method to obtain the final TCP coordinates used for robot control.
[0061] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A TCP calibration method for a welding robot, characterized in that, Includes the following steps: Based on nominal TCP coordinates and a preset attitude sampling range, multiple candidate measurement attitudes are generated in the unit quaternion space using the Poisson disk sampling algorithm. The minimum geodesic distance between any two candidate measurement attitudes is not less than a preset lower limit to obtain a set of candidate measurement attitudes. An initial attitude subset that meets the preset observable conditions is selected from the set of candidate measurement attitudes. The candidate attitudes are iteratively added based on the maximization of the minimum singular value of the Jacobian matrix corresponding to the currently selected attitude, to obtain the optimal set of measurement attitudes. The welding robot is controlled to perform multi-pose contact at fixed contact points in sequence according to the optimal measurement posture subset. Multiple sets of flange center pose data are collected in the robot base coordinate system. Based on the rotation matrix and translation vector in each set of pose data, an overdetermined calibration equation system with TCP coordinates and fixed contact point coordinates as unknowns is established. The initial TCP coordinates are obtained by solving the least squares method. Substitute the initial TCP coordinates back into each group of pose data, calculate the three-dimensional coordinates of the fixed touch point corresponding to each group and its Euclidean distance to the geometric center point, and use them as discreteness evaluation quantities. Determine the weight allocation interval based on the median, standard deviation and preset scaling factor of multiple discreteness evaluation quantities, assign corresponding calculation weights to each group of pose data, construct a weighted objective function, and use the weighted least squares method to solve the calibration equations again to obtain the final TCP coordinates used for robot control.
2. The method according to claim 1, characterized in that, The process of generating multiple candidate measurement attitudes using the Poisson disk sampling algorithm within a unit quaternion space, ensuring that the minimum geodesic distance between any two candidate measurement attitudes is not less than a preset lower limit, yields a candidate measurement attitude set, including: The attitude sampling range is transformed into a closed envelope surface interval in a unit quaternion space. The initial point of the corresponding reference attitude is extracted, placed into the closed envelope surface interval, and added to the candidate set. Within the envelope surface interval, new quaternion sampling point coordinates are generated by randomly expanding outward based on the existing coordinates in the candidate set. Calculate the absolute value of the inner product of the new quaternion sampling point coordinates and all the coordinates already saved in the candidate set, and calculate the spatial geodesic distance by taking the inverse cosine of the absolute value of the inner product and multiplying the result by 2. If the distance between the new quaternion sampling point coordinates and the spatial geodesic of all saved coordinates is not less than the preset lower limit, then the sampling point coordinates are added to the candidate measurement posture set. Repeat the expansion and distance verification steps until the total number of attitudes included in the candidate measurement attitude set reaches the set value.
3. The method according to claim 1, characterized in that, The process of iteratively adding candidate poses, based on maximizing the minimum singular value of the Jacobian matrix corresponding to the currently selected pose, includes: Select no fewer than three candidate postures that satisfy the non-coaxial constraint from the candidate measurement posture set as an initial posture subset, and construct the observation Jacobian basis matrix for the currently selected posture data, so that the observation Jacobian basis matrix satisfies the preset observability condition. For each candidate pose in the candidate measurement pose set that is not included in the optimal subset, the rotation parameters corresponding to the candidate pose are augmented to the observation Jacobian basis matrix to construct multiple independent test Jacobian matrices. Perform singular value decomposition on all test Jacobian matrices to obtain the minimum singular value of each test Jacobian matrix; Candidate poses corresponding to the test Jacobian matrix with the maximum and minimum singular values are selected and added to the optimal measurement pose subset. The observation Jacobian basis matrix is updated for the next round of iteration until the number of selected poses is not less than the preset lower limit of observables and the minimum singular value gain is less than the preset gain threshold.
4. The method according to claim 1, characterized in that, The process involves establishing a system of overdetermined calibration equations with TCP coordinates and fixed touch point coordinates as unknowns based on the rotation matrix and translation vector in each set of pose data, and solving the system using the least squares method to obtain the initial TCP coordinates, including: Extract the rotation matrix and translation vector parameters from multiple sets of flange center pose data; Using unknown TCP coordinates and unknown fixed point coordinates as state variables, an overdetermined system of equations is established based on kinematic constraints. The coefficient matrix consists of each set of attitude rotation matrices and the negative identity matrix, and the bias vector consists of the opposite vectors of each set of attitude translation vectors. The overdetermined system of equations is solved using pseudo-inverse matrix operations. First, the transpose of the coefficient matrix is multiplied by the coefficient matrix and inverted. Then, the resulting inverse matrix, the transpose of the coefficient matrix, and the bias vector are multiplied in sequence to obtain the state variables. The TCP coordinate part of the solved state variables is extracted and saved as the initial TCP coordinate output.
5. The method according to claim 2, characterized in that, The step of substituting the initial TCP coordinates back into each group of pose data, calculating the three-dimensional coordinates of the corresponding fixed touch point and its Euclidean distance to the geometric center point for each group, as a discreteness evaluation metric, includes: The three-dimensional coordinates of multiple fixed points obtained by combining multiple sets of pose data with the initial TCP coordinates are added together in the X, Y, and Z dimensions, and then divided by the total number to obtain the reference coordinate value of the geometric center point of the three-dimensional coordinates. For each set of pose data corresponding to three-dimensional coordinates, calculate the coordinate difference between the coordinates and the geometric center point in the X, Y, and Z dimensions. The coordinate differences in each dimension are squared and summed. The square root operation is performed on the summation result to obtain the true spatial Euclidean distance from the three-dimensional coordinates to the geometric center point. The Euclidean distance is used as the discreteness evaluation metric for the pose data.
6. The method according to claim 1, characterized in that, The step of determining the weight allocation interval based on the median, standard deviation, and preset scaling factor of multiple dispersion evaluation quantities, and assigning corresponding calculated weights to each group of pose data, includes: The median of the global dispersion evaluation is extracted and assigned to the first threshold. The standard deviation of the global dispersion evaluation is extracted and multiplied by a preset positive proportionality coefficient. The resulting product is added to the first threshold to obtain the second threshold. Compare the numerical range of the dispersion evaluation value of the current pose data one by one; When the dispersion evaluation value is less than or equal to the first threshold, the weight is calculated as 1; When the dispersion evaluation value is between the first threshold and the second threshold, the difference between the current dispersion evaluation value and the second threshold is subtracted, and then divided by the difference between the second threshold and the first threshold to obtain a decreasing weight quotient value. The weight quotient value is used as the calculation weight corresponding to the current pose data. When the dispersion evaluation value is greater than or equal to the second threshold, the weight is calculated as 0.
7. The method according to claim 1, characterized in that, The calibration equations are then solved again using the weighted least squares method to obtain the final TCP coordinates used for robot control, including: Construct a global diagonal weight matrix. Repeat the calculation weights obtained three times according to the corresponding order of the pose data and fill them into the main diagonal elements of the diagonal weight matrix. Set all other off-diagonal elements of the matrix to zero. The diagonal weight matrix is input into the original overdetermined system of equations to construct a weighted observation model; The weighted pseudo-inverse algorithm is used to solve the objective equation. When the weighted information matrix satisfies the invertibility condition, the state variables are obtained by multiplying the inverse of the product of the transpose of the coefficient matrix and the diagonal weight matrix and the coefficient matrix by the product of the transpose of the coefficient matrix, the diagonal weight matrix and the bias vector. When the weighted information matrix does not satisfy the invertibility condition, some zero-weight pose data are restored to the preset minimum positive weight or the pose is supplemented and then solved. The tool center point coordinate parameters in the state variables are extracted as TCP coordinate results output.
8. A TCP calibration system for a welding robot, characterized in that, Includes the following modules: The generation module is used to generate multiple candidate measurement attitudes in a unit quaternion space based on nominal TCP coordinates and a preset attitude sampling range using the Poisson disk sampling algorithm. It ensures that the minimum geodesic distance between any two candidate measurement attitudes is not less than a preset lower limit to obtain a set of candidate measurement attitudes. An initial attitude subset that meets the preset observable conditions is selected from the set of candidate measurement attitudes. The candidate attitudes are iteratively added based on the maximization of the minimum singular value of the Jacobian matrix corresponding to the currently selected attitude, to obtain the optimal set of measurement attitudes. A module is established to control the welding robot to perform multi-pose contact at fixed contact points in sequence according to the optimal measurement posture subset. Multiple sets of flange center pose data are collected in the robot base coordinate system. Based on the rotation matrix and translation vector in each set of pose data, an overdetermined calibration equation system with TCP coordinates and fixed contact point coordinates as unknowns is established, and the initial TCP coordinates are obtained by solving the least squares method. The calculation module is used to substitute the initial TCP coordinates back into each group of pose data, calculate the three-dimensional coordinates of the fixed touch point corresponding to each group and its Euclidean distance to the geometric center point, and use them as discreteness evaluation quantities. Based on the median, standard deviation and preset scaling factor of multiple discreteness evaluation quantities, the weight allocation interval is determined, and corresponding calculation weights are assigned to each group of pose data. A weighted objective function is constructed, and the calibration equations are solved again using the weighted least squares method to obtain the final TCP coordinates used for robot control.
9. The system according to claim 8, characterized in that, The process of generating multiple candidate measurement attitudes using the Poisson disk sampling algorithm within a unit quaternion space, ensuring that the minimum geodesic distance between any two candidate measurement attitudes is not less than a preset lower limit, yields a candidate measurement attitude set, including: The attitude sampling range is transformed into a closed envelope surface interval in a unit quaternion space. The initial point of the corresponding reference attitude is extracted, placed into the closed envelope surface interval, and added to the candidate set. Within the envelope surface interval, new quaternion sampling point coordinates are generated by randomly expanding outward based on the existing coordinates in the candidate set. Calculate the absolute value of the inner product of the new quaternion sampling point coordinates and all the coordinates already saved in the candidate set, and calculate the spatial geodesic distance by taking the inverse cosine of the absolute value of the inner product and multiplying the result by 2. If the distance between the new quaternion sampling point coordinates and the spatial geodesic of all saved coordinates is not less than the preset lower limit, then the sampling point coordinates are added to the candidate measurement posture set. Repeat the expansion and distance verification steps until the total number of attitudes included in the candidate measurement attitude set reaches the set value.
10. The system according to claim 8, characterized in that, The process of iteratively adding candidate poses, based on maximizing the minimum singular value of the Jacobian matrix corresponding to the currently selected pose, includes: Select no fewer than three candidate postures that satisfy the non-coaxial constraint from the candidate measurement posture set as an initial posture subset, and construct the observation Jacobian basis matrix for the currently selected posture data, so that the observation Jacobian basis matrix satisfies the preset observability condition. For each candidate pose in the candidate measurement pose set that is not included in the optimal subset, the rotation parameters corresponding to the candidate pose are augmented to the observation Jacobian basis matrix to construct multiple independent test Jacobian matrices. Perform singular value decomposition on all test Jacobian matrices to obtain the minimum singular value of each test Jacobian matrix; Candidate poses corresponding to the test Jacobian matrix with the maximum and minimum singular values are selected and added to the optimal measurement pose subset. The observation Jacobian basis matrix is updated for the next round of iteration until the number of selected poses is not less than the preset lower limit of observables and the minimum singular value gain is less than the preset gain threshold.
