A hybrid optimization identification method and system for robot geometric parameter calibration
Patent Information
- Application Number
- CN202311430534.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-10-27
AI Technical Summary
[0003]现有的参数辨识方法(如CN114918920A、CN113043271B)仍存在由于算法缺陷及样本数据误差导致的过拟合问题,即未考虑修正过的运动学模型在新数据集中存在的较大误差问题,限制了几何参数辨识精度的提升效果
[0052] 1. The hybrid optimization identification method of this invention involves building a robot measurement system, planning the robot's workspace, dividing it into spatial units, and modeling the robot's kinematics for each spatial unit. Based on this, a parameter identification optimization model is established. The optimization parameters of the parameter identification optimization model are determined using a hybrid iterative algorithm combining quasi-Newtonian and LMF methods and cross-validation. The kinematic model of each spatial unit is then solved in reverse to obtain the calibrated and compensated model, thereby improving the robot's control accuracy. In this invention, after calibration and compensation, the average error of the robot's end effector is reduced by nearly 87%, and the standard deviation of the error is increased by nearly 82%. The absolute position accuracy of the robot's end effector and the robustness of the kinematic model are both greatly improved.
Smart Images

Figure CN118143926B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of robot precision control technology, and more specifically, relates to a hybrid optimization identification method and system for robot geometric parameter calibration. Background Technology
[0002] To meet the demands of flexible manufacturing, robots need to be able to quickly fulfill different production requirements. Through technologies such as detection and offline programming, the robot's TCP (Target Positioning Point) can independently and accurately reach the target location. High absolute positioning accuracy is required for the robot.
[0003] Existing parameter identification methods (such as CN114918920A and CN113043271B) still suffer from overfitting due to algorithmic defects and sample data errors. Specifically, they fail to account for the significant errors in the corrected kinematic model on new datasets, limiting the improvement in geometric parameter identification accuracy. Furthermore, when the initial residual is large, these identification algorithms are prone to large deviations in iterative direction prediction, leading to iteration failure or getting trapped in local optima, thus failing to complete the calibration task. Summary of the Invention
[0004] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a hybrid optimization identification method and system for robot geometric parameter calibration, achieving high robustness, high precision calibration, and compensation for geometric parameter errors in industrial robots.
[0005] To achieve the above objectives, according to one aspect of the present invention, a hybrid optimization identification method for robot geometric parameter calibration is provided, comprising:
[0006] Build a robot measurement system, plan the robot's workspace, and collect robot motion sample data based on the robot measurement system and workspace;
[0007] Based on the robot's structure, a first kinematic model is constructed, and a kinematic error model is established based on the first kinematic model and differential kinematics theory.
[0008] A parameter identification and optimization model is established based on the kinematic error model. The optimization parameters of the parameter identification and optimization model are determined based on the hybrid iterative algorithm of quasi-Newton and LMF and the cross-validation method.
[0009] The second kinematic model is obtained based on the optimized parameters, the kinematic error model, and the first kinematic model.
[0010] Furthermore, the construction of the robot measurement system, the planning of the robot's workspace, and the collection of robot motion sample data based on the robot measurement system and the workspace include:
[0011] A robot measurement system based on laser trackers, tracking targets, robots, computers, adapter flanges, and cables is assembled.
[0012] Based on the robot measurement system, the transformation relationship between the robot's base coordinate system and the laser tracking instrument coordinate system, and between the robot's end flange coordinate system and the tracking target coordinate system is determined;
[0013] Plan the workspace based on the robot's expected tasks and reachability;
[0014] The target point is obtained by uniformly sampling the workspace. The first motion sample data at the target point is collected and transformed into the robot base coordinate system based on the transformation relationship to obtain the second motion sample data.
[0015] Furthermore, based on the robot-based structure, a first kinematic model is constructed, and a kinematic error model is established according to the first kinematic model and differential kinematics theory, including:
[0016] Based on the robot's structure, a link coordinate system is established using robot kinematics modeling methods.
[0017] The first kinematic model is constructed based on the link coordinate system and the robot's structure.
[0018] The first kinematic error model is established based on the first kinematic model in the link coordinate system and the theory of differential kinematics.
[0019] Furthermore, the robot kinematics modeling methods include: DH method, MD-H method, CPC method, MCPC method, and POE method.
[0020] Furthermore, the establishment of the first kinematic error model based on the first kinematic model in the link coordinate system and the differential kinematics theory also includes:
[0021] Based on the order of magnitude of the variables to be optimized in the kinematic error model, the variables to be optimized are normalized to obtain the first optimized variable;
[0022] Substituting the first optimization variable into the kinematic error model yields the second kinematic error model.
[0023] Furthermore, the determination of optimization parameters for the parameter identification optimization model based on the hybrid iterative algorithm of quasi-Newton and LMF and the cross-validation method includes:
[0024] Determining the optimal hyperparameters of the hybrid iterative algorithm combining quasi-Newton and LMF based on k-fold cross-validation;
[0025] The optimal parameters of the parameter identification optimization model are determined based on the optimal hyperparameters and a hybrid iterative algorithm combining quasi-Newton and LMF.
[0026] Furthermore, the determination of the second hyperparameter of the hybrid iterative algorithm based on k-fold cross-validation and quasi-Newton and LMF includes:
[0027] Step 1: Divide the training set according to the robot motion sample data. Let the size of the training set be z. Round z / w down to get m. Divide the training set into w random folds. The data size of each fold is m. If there is obvious inconsistency among the samples, the samples will be stratified.
[0028] Step 2: Initialize the hyperparameters, select w-1 folded samples for training, and use the rest for validation. Repeat w times, and calculate the average and standard deviation of the error of each hyperparameter group after w validations to obtain the model performance score for each hyperparameter group.
[0029] Step 3: Repeat Step 2 above and record the hyperparameters and model performance scores each time. Select the optimal hyperparameters based on the model performance scores.
[0030] Furthermore, the determination of the optimization parameters of the parameter identification optimization model based on the optimal hyperparameters and the hybrid iterative algorithm of quasi-Newton and LMF includes:
[0031] S401: Initialize the optimization parameters to be solved in the parameter identification optimization model. X0 is the initial value for iterative calculation; T0 is the initial value for the second term of the Hesser matrix; k is the iteration number; i is the number of consecutive runs of the large residual quasi-Newton method; p is the maximum number of consecutive iterations of the large residual quasi-Newton method; ε is the minimum value of the gradient determinant. If the gradient determinant is less than this value, the iteration terminates; u k λ is the damping coefficient of the LMF method; p0 is the rate of descent; λ0 and λ1 are regularization coefficients; α0 is the initial step size of the line search method; where the maximum number of consecutive runs p, regularization coefficients λ1 and λ2, and the initial step size α0 of the line search method are determined according to the optimal hyperparameters.
[0032] S402: If ||(Jk)Tfk||<ε holds, then terminate the iteration; otherwise, go to S403.
[0033] S403: If i≤p does not hold, then go to S404; if i≤p holds, and ||(J k ) T J k +T k If ||<0 holds true, go to S404; if i≤p holds true, and ||(J k ) T J k +T k || < 0 is not true, i = i + 1, go to S405;
[0034] S404: Add the derivative of the Elasticnet regularization term to the gradient term of the search direction formula. The iteration direction of the LMF algorithm is:
[0035] d k =-((J) k ) T J k +μ k I) -1 ((J k ) T f k +R k )
[0036] In the formula R k =[r k 1 ,r k 2 ,r k 3 ,...,r k N ] T , X k =[X k 1 ,X k 2 ,X k 3 ,...,X k N ] T N is the total number of kinematic parameters, λ1 and λ2 are the coefficients of the regularization term, see S406;
[0037] S405: Quasi-Newton iterative direction for calculating large residual problems:
[0038] d k =-((J) k ) T J k +T k ) -1 ((J k ) T f k +R k )
[0039] Before the search begins, the search direction d is determined. k Normalization is performed, and the Wolfe-Powell line search method is used to determine the search step size, taking the search step size α. k >0, let d k =α k d k Update the second term of the Hessian matrix. Where q k=(J k+1 ) T f k+1 -(J k ) T f k+1 ,s k =d k Turn onto S406;
[0040] S406: Calculate the rate of decrease ρ of the optimized function value k , ρ k =Ared k / Pred k Ared k =F(X) k )-F(X k +d k ), Pred k =m k (0)-m k (d k If the iteration direction d at this time k It is calculated from the quasi-Newton method for large residual problems, and ρ k If p < p0, it indicates that the current calculation result of the quasi-Newton method for large residual problems is not as expected. Proceed to S404 and use the LMF method for iteration; if ρ k If p0 is not true, it means the current calculation result is as expected, X k+1 =X k +d k And proceed to the next iteration, k = k + 1, go to S402; if the iteration direction d at this time k Calculated using the LMF method, see S407;
[0041] S407, if ρ k If p ≥ 0, then update parameter X. k+1 =X k +d k and update the damping coefficient. v k+1 =2; otherwise, do not update the parameters, update the damping coefficient μ. k+1 =μ k v k ,v k+1 =2v k After this step is completed, proceed to the next iteration, k = k + 1, and go to step S402;
[0042] After the iteration terminates, the optimized parameters of the parameter identification optimization model are obtained.
[0043] Furthermore, the process of obtaining the second kinematic model based on the optimized parameters, the kinematic error model, and the first kinematic model includes:
[0044] The kinematic parameter compensation values are obtained by linear transformation of the optimized parameters and the kinematic error model.
[0045] The second kinematic model is obtained by compensating the kinematic parameters of the first kinematic model with kinematic parameter compensation values.
[0046] According to another aspect of the present invention, a hybrid optimization identification system for robot geometric parameter calibration is provided, comprising:
[0047] The first main module is used to build the robot measurement system, plan the robot's workspace, and collect robot motion sample data based on the robot measurement system and workspace.
[0048] The second main module is used to construct the first kinematic model based on the robot's structure, and to establish a kinematic error model based on the first kinematic model and differential kinematics theory.
[0049] The third main module is used to establish a parameter identification and optimization model based on the kinematic error model, and to determine the optimization parameters of the parameter identification and optimization model based on the hybrid iterative algorithm of quasi-Newton and LMF and the cross-validation method.
[0050] The fourth main module is used to obtain the second kinematic model based on the optimized parameters, the kinematic error model, and the first kinematic model.
[0051] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:
[0052] 1. The hybrid optimization identification method of this invention involves building a robot measurement system, planning the robot's workspace, dividing it into spatial units, and modeling the robot's kinematics for each spatial unit. Based on this, a parameter identification optimization model is established. The optimization parameters of the parameter identification optimization model are determined using a hybrid iterative algorithm combining quasi-Newtonian and LMF methods and cross-validation. The kinematic model of each spatial unit is then solved in reverse to obtain the calibrated and compensated model, thereby improving the robot's control accuracy. In this invention, after calibration and compensation, the average error of the robot's end effector is reduced by nearly 87%, and the standard deviation of the error is increased by nearly 82%. The absolute position accuracy of the robot's end effector and the robustness of the kinematic model are both greatly improved.
[0053] Additional aspects and advantages of this application will be set forth in part in the description which follows, and will become apparent from the description or may be learned by practice of this application. Attached Figure Description
[0054] Figure 1 This is a flowchart illustrating the overall workflow of robot calibration according to an embodiment of the present invention.
[0055] Figure 2This is a schematic diagram of robot workspace planning according to an embodiment of the present invention;
[0056] Figure 3 This is a flowchart illustrating the robot end-effector position compensation process according to an embodiment of the present invention.
[0057] Figure 4 This is a flowchart of the quasi-Newton and LMF hybrid algorithm for the large residual problem in an embodiment of the present invention.
[0058] Figure 5 This is a diagram of the MCPC linkage coordinate system of the UR10 robot according to an embodiment of the present invention;
[0059] Figure 6 This is a line graph showing the error before and after compensation in an embodiment of the present invention.
[0060] Figure 7 This is a schematic diagram of the robot calibration process according to an embodiment of the present invention;
[0061] Figure 8 This is a flowchart of the hybrid optimization identification method for robot geometric parameter calibration according to an embodiment of the present invention;
[0062] Figure 9 This is a structural diagram of a hybrid optimization identification system for robot geometric parameter calibration according to an embodiment of the present invention. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0064] In the description of this invention, unless otherwise explicitly specified and limited, the terms "connected," "linked," and "fixed" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0065] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the word “comprising” as used in the specification of this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof.
[0066] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as in the embodiments of this application.
[0067] This invention provides a hybrid optimization identification method based on robot geometric parameter calibration for robot absolute accuracy positioning, which can be used in robot manufacturing, processing, polishing and other technical fields.
[0068] This invention provides a hybrid optimization identification method for robot geometric parameter calibration, such as... Figure 1 and Figure 8 As shown, the specific steps include S100 to S400.
[0069] Step S100: Build a robot measurement system, plan the robot's workspace, and collect robot motion sample data based on the robot measurement system and workspace;
[0070] The process of building a robot measurement system, planning the robot's workspace, and collecting robot motion sample data based on the robot measurement system and workspace includes steps S101 to S104:
[0071] Step S101: Assemble a robot measurement system based on a laser tracker, tracking target, robot, computer, adapter flange, and cables;
[0072] See Figure 7 The robot measurement system consists of a laser tracker, a tracking target, a robot, a computer, an adapter flange, and several cables. Depending on the site environment, the laser tracker is set up, and the tracking target is installed at the end effector of the industrial robot via the adapter flange. The measuring device, robot, and computer are connected via cables. Equipment connections and coordinate system transformations are as follows... Figure 7 As shown.
[0073] Step S102: Based on the robot measurement system, calibrate the transformation relationship between the robot's base coordinate system and the laser tracking instrument coordinate system, and between the robot's end flange coordinate system and the tracking target coordinate system;
[0074] After the robot measurement system is installed, it can be used to calibrate the robot's base coordinate system {B} and obtain the transformation matrix between the laser tracking coordinate system {T} and the base coordinate system {B}. The transformation matrix from the robot end effector flange coordinate system {n-1} to the tracking target coordinate system {n} was calibrated. The calibration process described is a standard procedure in this field and will not be elaborated upon here.
[0075] Step S103: Based on the robot's expected work and reachability, plan the workspace;
[0076] Specifically, the robot's expected work is the work content of the selected robot. Based on its work content, the robot's reachable range, movement path, and pose can be determined. Based on the robot's reachable range, movement path, and pose, the workspace is planned. Preferably, the planned workspace is a regular shape, and more preferably, the planned workspace is a cuboid or cube.
[0077] In an optional embodiment of the present invention, in order to improve the accuracy of the kinematic model after calibration and compensation in describing the motion law of the robot in a certain space, the describable space of the model can be reduced. Therefore, the workspace can be further subdivided into K spatial units with regular shapes. In this way, an optimal kinematic model can be established for each spatial unit, and subsequent sampling, parameter identification and compensation can be performed respectively.
[0078] Specifically, such as Figure 2 As shown, the rectangular workspace is divided into 8 rectangular spatial units. M target points are obtained through uniform sampling throughout the workspace, and the robot's end-effector posture is planned to ensure that the tracking target at each point can be dynamically tracked by the laser tracker.
[0079] Step S104: Uniformly sample the target point in the workspace, collect the first motion sample data at the target point, and transform it to the robot base coordinate system based on the transformation relationship to obtain the second motion sample data.
[0080] Specifically, M target points are obtained through uniform sampling throughout the workspace, and the robot's end-effector posture is planned to ensure that the tracking target at each point can be dynamically tracked by the laser tracker. The robot control and measurement systems collect end-effector tracking target data when the robot moves to each target point. B p j (j = 1, 2, 3, ..., M), and through the matrix Transform to robot base coordinate system T p j (j=1,2,3,…,M), and simultaneously record the joint axis rotation angle θ corresponding to each point the robot moves to. j (j = 1, 2, 3, ..., M), T p j and θ j A data pair is formed, and all data pairs form a dataset D. s ={( T p j ,θ j )|j=1,2,3,..,M}.
[0081] From the sample set falling in spatial unit i (i = 1, 2, 3, ... K), randomly select s i (i = 1, 2, 3, ..., K) verification points are used to form a verification set V. i (i = 1, 2, 3, ..., K), the rest form the training set T. i (i = 1, 2, 3, ... K), where K is the number of planned spatial units.
[0082] Step S200: Based on the robot's structure, construct a first kinematic model, and establish a kinematic error model based on the first kinematic model and differential kinematics theory;
[0083] Step S200 specifically includes steps S201 to S203.
[0084] Step S201: Based on the robot's structure, establish a link coordinate system using robot kinematics modeling methods;
[0085] The robot kinematics modeling methods include, but are not limited to, DH method, MD-H method, CPC method, MCPC method, and POE method.
[0086] Step S202: Construct the first kinematic model based on the link coordinate system and the robot's structure;
[0087] Step S203: Establish the first kinematic error model based on the first kinematic model in the link coordinate system and the differential kinematics theory.
[0088] In an optional embodiment of the present invention, the step of establishing the first kinematic error model based on the first kinematic model in the link coordinate system and the differential kinematics theory further includes:
[0089] Based on the order of magnitude of the variables to be optimized in the kinematic error model, the variables to be optimized are normalized to obtain the first optimized variable;
[0090] The second kinematic error model is obtained based on the first optimization variable and the kinematic error model.
[0091] It should be noted that the methods for establishing the link coordinate system, the first kinematic model, and the first kinematic error model are well known in the art and will not be elaborated here.
[0092] In this embodiment, the second kinematic error model is used as the kinematic error model for parameter identification of the subsequent unconstrained optimization model.
[0093] If the units for angle data are uniformly set to rad and the units for position data to mm, the numerical differences between radian and position errors will be at least 100 times. To eliminate the influence of dimensions between variables, a method needs to be selected to normalize the target variable, transforming all variables to the same order of magnitude. By normalizing the variables to be optimized, all variables are placed on an equal footing, reducing accuracy loss while improving the solution speed of gradient descent, and thus increasing the speed of subsequent parameter identification and optimization.
[0094] Suppose the angle error of the variable to be optimized is generally in (-a, a), while the position error is generally in (-d, d). Min-Max Normalization is used to normalize the variables.
[0095] The kinematic parameter vector X of a single link coordinate system i Normalization is performed to obtain the normalized vector X′. i :
[0096] X i =2E i X′ i -e i
[0097] In the formula, i is the coordinate system number of the link (i = 0, 1, 2, 3, ..., n), E i =diag{e i}, diag{·} represents converting the elements in · into a diagonal matrix, e i =[a,...,a,d,...,d] T The number of elements corresponds to the number of kinematic parameters in the link coordinate system.
[0098] The normalized equations for all kinematic parameters of the robot are as follows:
[0099] X = HX′ - L
[0100] Where X is the total kinematic parameter vector to be normalized, i.e., the variable to be optimized, and X′ is the total normalized kinematic parameter vector, i.e., the first optimization variable, and H = diag{E1, E2, E3, ..., En}, L=[e1,e2,e3,...,e n ] T .
[0101] Step S300: Establish a parameter identification and optimization model based on the kinematic error model, and determine the optimization parameters of the parameter identification and optimization model based on the hybrid iterative algorithm of quasi-Newton and LMF and the cross-validation method.
[0102] The parameter identification and optimization model based on the kinematic error model includes: based on the second kinematic error model, constructing a least squares problem to obtain the parameter identification and optimization model.
[0103] For the first kinematic error model D = J(X)·X, we construct it in least squares form, letting f(X) = J(X)·XD, and then construct the unconstrained optimization model for parameter identification as follows:
[0104]
[0105] The second kinematic error model is obtained by substituting the first optimization variable into the first kinematic error model. This is then transformed into a least squares problem, resulting in the parameter identification optimization model after parameter normalization:
[0106]
[0107] After obtaining the parameter identification and optimization model, the least squares problem needs to be solved.
[0108] Among the many algorithms for solving the least squares problem, the LMF algorithm is widely used. It evolved from the combination of the Gauss-Newton method and the gradient descent method, but it does not require the J columns of the matrix to be full rank. Therefore, it can make up for the shortcomings of the Gauss-Newton method. Furthermore, it inherits the good local convergence of the Gauss-Newton method while also having ideal global convergence.
[0109] The formula for calculating the direction of the k-th iteration step is:
[0110] d k =((J) k ) T J k +λI) -1 (-(J k ) T f k )
[0111] Where I is the identity matrix, T denotes the matrix transpose, and X k Let f(X) represent the iteration value x at step k. k J represents the residual at step k. k =J(X)k ), f k =f(X) k ), where λ is the damping coefficient, used to adjust the size of the trust region radius, thereby achieving the purpose of adjusting the iteration direction.
[0112] When the initial value of the iterative calculation differs significantly from the final result, the residual of the optimization model is relatively large. Using only (J) k ) T J k Approximating the Heather matrix at the k-th step with +λI introduces a large error. In such cases, the LMF method may fail. A quasi-Newton method for large residual problems can be used to preserve the first term (J) of the Heather matrix. k ) T J k And for the second term T of the Hessian matrix k To make a more accurate approximation.
[0113] The formula for calculating the direction of the k-th iteration step is:
[0114] d k =((J) k ) T J k +T k ) -1 (-(J k ) T f k )
[0115] T k The update equation is
[0116]
[0117] Among them, s k =X k+1 -X k q k =(J k+1 ) T f k+1 -(J k ) T f k+1 .
[0118] The method of this invention combines the quasi-Newton and LMF methods for large residual problems by setting judgment conditions to autonomously select the algorithm for the current iteration step, thus possessing the advantages of both methods simultaneously.
[0119] In an optional embodiment of the present invention, a judgment condition i < p is set to force the execution of the LMF algorithm, so as to effectively utilize the advantages of the LMF algorithm; if the judgment condition ||(J k ) T Jk +T k If || < 0 is true, then the large residual quasi-Newton algorithm cannot be used, and the LMF algorithm is naturally chosen. If the rate of decrease ρ of the large residual quasi-Newton algorithm is less than the expected value, then the LMF algorithm is chosen for recalculation. The process of the hybrid algorithm of quasi-Newton and LMF for the large residual problem is as follows: Figure 4 As shown.
[0120] For the quasi-Newton and LMF hybrid algorithm for constructing large residual problems, it is necessary to set corresponding hyperparameters. In this algorithm, there are hyperparameters with high influence (determined by domain experts' experience, which will not be elaborated here), such as the maximum number of consecutive runs p of the quasi-Newton algorithm, the regularization coefficients λ1 and λ2, and the initial step size α0 of the line search method. In order to improve the generalization of these hyperparameters, w-fold cross-validation can be used to obtain a set of optimized hyperparameters.
[0121] Specifically, step S300 also includes steps S301 to S302.
[0122] Step S301: Determine the optimal hyperparameters of the quasi-Newton and LMF hybrid iterative algorithm based on k-fold cross-validation;
[0123] Specifically, the determination of the optimal hyperparameters of the hybrid iterative algorithm based on k-fold cross-validation and quasi-Newton and LMF includes:
[0124] Step 1: Divide the training set according to the robot motion sample data. Let the size of the training set be z. Round z / w down to get m. Divide the training set into w random folds. The data size of each fold is m. If there is obvious inconsistency among the samples, the samples need to be stratified.
[0125] Step 2: Initialize the hyperparameters, select w-1 folded samples for training, and use the rest for validation. Repeat w times, and calculate the average and standard deviation of the error of each hyperparameter group after w validations to obtain the model performance score for each hyperparameter group.
[0126] Step 3: Repeat Step 2 above and record the hyperparameters and model performance scores each time. Select the optimal hyperparameters based on the model performance scores.
[0127] After obtaining the optimal hyperparameters, a hybrid iterative algorithm combining quasi-Newton and LMF is needed to solve for the optimized parameters of the parameter identification model. The robot motion sample data is divided into training and validation sets. The hybrid iterative algorithm using the optimal hyperparameters is then retrained on the entire training set to obtain the optimized parameters of the final parameter identification model. The results are then validated on the validation set to assess the robustness of the results.
[0128] In the embodiments of the present invention, in the quasi-Newton and LMF methods for large residual problems, there are hyperparameters with high influence, which have a significant impact on the accuracy and precision of the algorithm. These include the maximum number of consecutive runs of the quasi-Newton method, the regularization coefficient, and the initial step size of the line search method. The hyperparameters with high influence are determined based on expert experience. Preferably, the hyperparameters are scored based on expert experience, and the hyperparameters with scores exceeding a preset value are selected as the hyperparameters to be optimized. The optimal hyperparameters are obtained based on w-fold cross-validation.
[0129] Step S302: Determine the optimization parameters of the parameter identification optimization model based on the optimal hyperparameters and the hybrid iterative algorithm of quasi-Newton and LMF.
[0130] Specifically, the determination of the optimization parameters of the parameter identification optimization model based on the optimal hyperparameters and the hybrid iterative algorithm of quasi-Newton and LMF includes:
[0131] S401: Initialize the optimization parameters to be solved in the parameter identification optimization model. X0 is the initial value for iterative calculation; T0 is the initial value for the second term of the Hesser matrix; k is the iteration number; i is the number of consecutive runs of the large residual quasi-Newton method; p is the maximum number of consecutive iterations of the large residual quasi-Newton method; ε is the minimum value of the gradient determinant. If the gradient determinant is less than this value, the iteration terminates; u k λ is the damping coefficient of the LMF method; p0 is the rate of descent; λ0 and λ1 are regularization coefficients; α0 is the initial step size of the line search method; where the maximum number of consecutive runs p, regularization coefficients λ1 and λ2, and the initial step size α0 of the line search method are determined according to the optimal hyperparameters.
[0132] Specifically, in an optional embodiment of the present invention, X0 is the initial value for iterative calculation, generally taken as zero; the initial value for the second term of the Hesser matrix is generally taken as a zero matrix; the number of iterations is initialized to 0; the number of consecutive runs of the large residual quasi-Newton method is initialized to 0; and the damping coefficient of the LMF method is initialized as u0 = τ × max{a ii},a ii For (J0) T J0 is a diagonal element, and τ is generally set to 1; the rate of descent is initialized to 1 × 10. -3 .
[0133] S402: If ||(J k ) T f k If ||<ε is true, then terminate the iteration; otherwise, go to S403.
[0134] S403: If i≤p does not hold, then go to S404; if i≤p holds, and ||(J k ) T J k +T kIf ||<0 holds true, go to S404; if i≤p holds true, and ||(J k ) T J k +T k || < 0 is not true, i = i + 1, go to S405;
[0135] S404: Add the derivative of the Elasticnet regularization term to the gradient term of the search direction formula. The iteration direction of the LMF algorithm is:
[0136] d k =-((J) k ) T J k +μ k I) -1 ((J k ) T f k +R k )
[0137] In the formula R k =[r k 1 ,r k 2 ,r k 3 ,...,r k N ] T , X k =[X k 1 ,X k 2 ,X k 3 ,...,X k N ] T N is the total number of kinematic parameters, λ1 and λ2 are the coefficients of the regularization term, see S406;
[0138] Specifically, the derivative of the Elasticnet regularization term is added to the gradient term of the search direction formula to make the model parameters sparser and further improve the generalization performance of the parameters.
[0139] S405: Quasi-Newton iterative direction for calculating large residual problems:
[0140] d k =-((J) k ) T J k +T k ) -1 ((J k ) T f k+R k )
[0141] Before the search begins, the search direction d is determined. k Normalization is performed, and the Wolfe-Powell line search method is used to determine the search step size, taking the search step size α. k >0, let d k =α k d k Update the second term of the Hessian matrix. Where q k =(J k+1 ) T f k+1 -(J k ) T f k+1 ,s k =d k Turn onto S406;
[0142] In an optional embodiment of the present invention, in order to improve the efficiency of the quasi-Newton normal search, the search direction d is adjusted before the search is started. k Normalization is performed, and the Wolfe-Powell line search method is used to find a suitable step size.
[0143] S406: Calculate the rate of decrease ρ of the optimized function value k , ρ k =Ared k / Pred k Ared k =F(X) k )-F(X k +d k ), Pred k =m k (0)-m k (d k If the iteration direction d at this time k It is calculated from the quasi-Newton method for large residual problems, and ρ k If p < p0, it indicates that the current calculation result of the quasi-Newton method for large residual problems is not as expected. Proceed to S404 and use the LMF method for iteration; if ρ k If p0 is not true, it means the current calculation result is as expected, X k+1 =X k +d k And proceed to the next iteration, k = k + 1, go to S402; if the iteration direction d at this time k Calculated using the LMF method, see S407;
[0144] The rate of decrease is the ratio of the actual decrease in the optimized function value to the estimated decrease.
[0145] S407, if ρ k If p ≥ 0, then update parameter X. k+1 =X k +d k and update the damping coefficient. v k+1 =2; otherwise, do not update the parameters, update the damping coefficient μ. k+1 =μ k v k ,v k+1 =2v k After this step is completed, proceed to the next iteration, k = k + 1, and go to step S402;
[0146] After the iteration terminates, the optimized parameters of the parameter identification optimization model are obtained.
[0147] Step S400: Based on the optimized parameters, the kinematic error model, and the first kinematic model, the second kinematic model is obtained.
[0148] Specifically, the second kinematic model is obtained by combining the optimization parameters based on the parameter identification optimization model, the kinematic error model, and the first kinematic model, including:
[0149] The kinematic parameter compensation values are obtained by linear transformation of the optimized parameters and the kinematic error model.
[0150] The second kinematic model is obtained by compensating the kinematic parameters of the first kinematic model with kinematic parameter compensation values.
[0151] The linear transformation process described herein is a conventional method for those skilled in the art and will not be elaborated upon here.
[0152] In an optional embodiment of the present invention, after obtaining the second kinematic model from the optimization parameters of the parameter identification optimization model, the kinematic error model, and the first kinematic model, the method further includes:
[0153] Random sampling is performed in the workspace to mark the spatial units of the sampling points. Based on the second kinematic model of these spatial units, the corrected positions of the robot's sampling points in the sample space are determined. The robot's operation is controlled, and position tracking and error calculation are performed using a robot measurement system to verify the calibration compensation effect in a real-world scenario. Figure 3 As shown.
[0154] Example 1
[0155] To verify the feasibility of this invention, an experiment was conducted using the UR10 robot. First, the robot's 1×1×1mm cubic workspace was divided into eight identical cubic space units, as follows: Figure 2As shown. Calibration calculations were performed using 350 sample data points collected in space. The MCPC link coordinate system diagram of the UR10 robot is shown below. Figure 5 The nominal kinematic parameters are shown in Table 1, and the parameter compensation values for one spatial unit are shown in Table 2. Twenty-four sample points are randomly generated in the workspace. The robot is controlled to move to these points, and laser tracker data is used to collect the robot's end effector data to calculate the position error. Then, compensation is applied to the robot's end effector at these 24 points, and the end effector data is collected again to calculate the position error. The results are as follows: Figure 6 The errors before and after compensation are shown in Table 3, which compares the errors before and after compensation.
[0156] The results show that after calibration and compensation, the average error of the robot end effector was reduced by nearly 87%, and the standard deviation of the error was increased by nearly 82%, indicating that both the absolute position accuracy of the robot end effector and the robustness of the kinematic model were greatly improved.
[0157] Table 1 Nominal kinematic parameters of MCPC for UR10 robot system
[0158]
[0159]
[0160] Table 2 Compensation values for MCPC kinematic parameters of UR10 robot system
[0161]
[0162] Table 3 Comparison of errors before and after compensation.
[0163] Before compensation 8.87347 4.99587 5.3994 2.04813 After compensation 1.4264 0.649264 0.742503 0.360232 Precision improvement rate 83.925% 87.004% 86.248% 82.412%
[0164] The implementation of the various embodiments of the present invention is based on programmed processing by a device with processor functionality. Therefore, in practical engineering, the technical solutions and functions of the various embodiments of the present invention can be encapsulated into various modules. Based on this reality, and building upon the above embodiments, the embodiments of the present invention provide a hybrid optimization identification system for robot geometric parameter calibration. This system is used to execute a hybrid optimization identification method for robot geometric parameter calibration from the above method embodiments. Figure 9 As shown, the system includes:
[0165] The first main module is used to build the robot measurement system, plan the robot's workspace, and collect robot motion sample data based on the robot measurement system and workspace.
[0166] The second main module is used to construct the first kinematic model based on the robot's structure, and to establish a kinematic error model based on the first kinematic model and differential kinematics theory.
[0167] The third main module is used to establish a parameter identification and optimization model based on the kinematic error model, determine the first hyperparameter based on the hybrid iterative algorithm of quasi-Newton and LMF and the cross-validation method, and train the parameter identification and optimization model based on the first hyperparameter and robot motion sample data.
[0168] The fourth main module is used to obtain the second kinematic model based on the parameter identification optimization model, the kinematic error model, and the first kinematic model.
[0169] It should be noted that the apparatus in the system embodiments provided by the present invention can be used not only to implement the methods in the above method embodiments, but also to implement the methods in other method embodiments provided by the present invention. The only difference is that corresponding functional modules are set. Its principle is basically the same as that of the above system embodiments provided by the present invention. As long as those skilled in the art can improve the apparatus in the above system embodiments by referring to the specific technical solutions in other method embodiments and combining technical features to obtain corresponding technical means and technical solutions composed of these technical means, on the basis of the above system embodiments, and on the premise of ensuring the practicality of the technical solutions, they can obtain corresponding system-like embodiments for implementing the methods in other method-like embodiments.
[0170] The methods in the embodiments of the present invention are implemented using electronic devices; therefore, it is necessary to describe the relevant electronic devices. For this purpose, embodiments of the present invention provide an electronic device comprising: at least one processor, a communication interface, at least one memory, and a communication bus, wherein the at least one processor, the communication interface, and the at least one memory communicate with each other via the communication bus. The at least one processor can invoke logical instructions in the at least one memory to execute all or part of the steps of the methods provided in the foregoing method embodiments.
[0171] Furthermore, when the logical instructions in at least one of the aforementioned memories can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various method embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0172] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0173] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can easily understand that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A hybrid optimization identification method for robot geometric parameter calibration, characterized in that, include: Build a robot measurement system, plan the robot's workspace, and collect robot motion sample data based on the robot measurement system and workspace; Based on the robot's structure, a first kinematic model is constructed, and a kinematic error model is established based on the first kinematic model and differential kinematics theory. The robot-based structure is used to construct a first kinematic model, and a kinematic error model is established based on the first kinematic model and differential kinematics theory. This includes: establishing a link coordinate system based on the robot's structure using robot kinematic modeling methods; constructing the first kinematic model based on the link coordinate system and the robot's structure; and establishing a first kinematic error model based on the first kinematic model in the link coordinate system and differential kinematics theory. The establishment of the first kinematic error model based on the first kinematic model in the link coordinate system and differential kinematics theory further includes: normalizing the variables to be optimized according to their order of magnitude in the kinematic error model to obtain first optimized variables; and substituting the first optimized variables into the kinematic error model to obtain a second kinematic error model. A parameter identification and optimization model is established based on a kinematic error model. The optimized parameters of the parameter identification and optimization model are determined based on a hybrid iterative algorithm of quasi-Newton and LMF and a cross-validation method. The determination of the optimized parameters of the parameter identification and optimization model based on the hybrid iterative algorithm of quasi-Newton and LMF and a cross-validation method includes: determining the optimal hyperparameters of the hybrid iterative algorithm of quasi-Newton and LMF based on k-fold cross-validation; determining the optimized parameters of the parameter identification and optimization model based on the optimal hyperparameters and the hybrid iterative algorithm of quasi-Newton and LMF; the determination of the optimal hyperparameters of the hybrid iterative algorithm of quasi-Newton and LMF based on k-fold cross-validation includes: Step 1 Step 1: Divide the training set according to the robot motion sample data. Let the size of the training set be z. Round z / w down to get m. Divide the training set into w random folds, with each fold having a data size of m. If there is obvious inconsistency among the samples, the samples are stratified. Step 2: Initialize the hyperparameters. Select w-1 fold samples for training and the rest for validation. Repeat w times. Calculate the average and standard deviation of the error of each hyperparameter group after w validations to obtain the model performance score for each hyperparameter group. Step 3: Repeat step 2 above and record the hyperparameters and model performance scores each time. Select the optimal hyperparameters based on the model performance scores. The second kinematic model is obtained based on the optimized parameters, the kinematic error model, and the first kinematic model.
2. The hybrid optimization identification method for robot geometric parameter calibration according to claim 1, characterized in that, The process of building a robot measurement system, planning the robot's workspace, and collecting robot motion sample data based on the robot measurement system and workspace includes: A measurement system for assembling robots based on laser trackers, tracking targets, robots, computers, adapter flanges, and cables; Based on the robot measurement system, the transformation relationship between the robot's base coordinate system and the laser tracking instrument coordinate system, and between the robot's end flange coordinate system and the tracking target coordinate system is determined; Plan the workspace based on the robot's expected tasks and reachability; The target point is obtained by uniformly sampling the workspace. The first motion sample data at the target point is collected and transformed into the robot base coordinate system based on the transformation relationship to obtain the second motion sample data.
3. The hybrid optimization identification method for robot geometric parameter calibration according to claim 1, characterized in that, The robot kinematics modeling methods include, but are not limited to: DH method, MD-H method, CPC method, MCPC method and POE method.
4. The hybrid optimization identification method for robot geometric parameter calibration according to claim 1, characterized in that, The optimization parameters for determining the parameter identification optimization model based on the optimal hyperparameter and the hybrid iterative algorithm of quasi-Newton and LMF include: S401: Initialize the optimization parameters to be solved in the parameter identification optimization model. X0 is the initial value for iterative calculation; T0 is the initial value for the second term of the Hesser matrix; k is the iteration number; i is the number of consecutive runs of the large residual quasi-Newton method; p is the maximum number of consecutive iterations of the large residual quasi-Newton method; ε is the minimum value of the gradient determinant. If the gradient determinant is less than this value, the iteration terminates; u k λ0 is the damping coefficient of the LMF method; p0 is the rate of descent; λ0 and λ1 are regularization coefficients; α0 is the initial step size of the line search method; where the maximum number of consecutive runs p, regularization coefficients λ1 and λ2, and the initial step size α0 of the line search method are determined according to the optimal hyperparameters. S402: If If the condition is met, the iteration terminates; otherwise, proceed to step S403. S403: If If not valid, then proceed to S404; if Established, and If established, proceed to S404; if Established, and This is not true, i = i + 1, go to S405; S404: Add the derivative of the elastic net regularization term to the gradient term of the search direction formula. The iteration direction of the LMF algorithm is: In the formula , (j=1,2,3,…,N), ν is the adjustment parameter for the damping coefficient, and N is the total number of kinematic parameters. and For the regularization coefficient, transfer to S406; S405: Quasi-Newton iterative direction for calculating large residual problems: Before the search begins, the search direction d is determined. k Normalization is performed, and the Wolfe-Powell line search method is used to determine the search step size. ,make Update the second term of the Hessian matrix. ,in , Turn onto S406; S406: Calculate the rate of decrease ρ of the optimized function value k , , , If the iteration direction d at this time k It is derived from the quasi-Newton method for large residual problems, and Then switch to S404 and use the LMF method for iteration; if If this is not true, it means that the current calculation result is in line with expectations. And proceed to the next iteration, k=k+1, go to S402; if the iteration direction d at this time k Calculated using the LMF method, see S407; S407, if Then update the parameters. and update the damping coefficient. Otherwise, do not update the parameters, but update the damping coefficient. After this step is completed, proceed to the next iteration, k=k+1, and go to step S402; After the iteration terminates, the optimized parameters of the parameter identification optimization model are obtained.
5. The hybrid optimization identification method for robot geometric parameter calibration according to claim 1, characterized in that, The process of obtaining the second kinematic model based on optimized parameters, a kinematic error model, and a first kinematic model includes: The kinematic parameter compensation values are obtained by linear transformation of the optimized parameters and the kinematic error model; The second kinematic model is obtained by compensating the kinematic parameters of the first kinematic model with kinematic parameter compensation values.
6. A hybrid optimization identification system for robot geometric parameter calibration, used to implement the hybrid optimization identification method for robot geometric parameter calibration as described in any one of claims 1-5, characterized in that, include: The first main module is used to build the robot measurement system, plan the robot's workspace, and collect robot motion sample data based on the robot measurement system and workspace. The second main module is used to construct the first kinematic model based on the robot's structure, and to establish a kinematic error model based on the first kinematic model and differential kinematics theory. The third main module is used to identify and optimize the parameter identification model based on the kinematic error model. It uses a hybrid iterative algorithm of quasi-Newton and LMF and a cross-validation method to determine the optimization parameters of the parameter identification and optimization model. The fourth main module is used to obtain the second kinematic model based on the optimized parameters, the kinematic error model, and the first kinematic model.
Citation Information
Patent Citations
A Calibration and Compensation Method for Industrial Robots Based on the Longhorn Beetle Algorithm
CN113043271B
Industrial robot calibration method based on neural network and distance error model
CN114918920A
Parameter identification optimization method for rigid-flexible coupling outer limb robot
CN116787439A