A robot error compensation method based on mechanism and data double driving
Patent Information
- Application Number
- CN202610883098.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2046-06-18
AI Technical Summary
目前的技术,如发明专利CN202410596892.X将柔性误差处理成数据驱动模型,进行训练,然而柔性误差会随负载的变化产生较大的变化,将其作为数据驱动模型进行预测,容易出现较大的预测误差,影响误差补偿的准确性
[0017]本发明的有益效果在于:在基于物理机理构建的误差模型中,除了构建常规的运动学误差模型获得几何误差外,还构建了刚柔耦合动力学模型获得柔性误差,其余无法通过建模计算的误差则使用神经网络模型进行训练并预测,且在神经网络模型预测残余误差时,使用关节指令位置与关节力矩作为双通道输入,有效提高残余误差预测的准确性,从而提高机器人误差预测的准确性。
Smart Images

Figure CN122442666B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot control technology, and specifically to a robot error compensation method based on both mechanism and data-driven approaches. Background Technology
[0002] Current robotics employs mechanistic modeling to identify geometric kinematic parameter deviations and compensate for rigid-flexible coupling dynamics. However, significant residual errors remain due to nonlinear dynamic hysteresis in joint transmission, friction, and time-varying thermal drift. Particularly for heavy-duty robots, the immense contact stress within joints induces complex nonlinear errors in joint transmission, which traditional purely analytical mechanistic modeling struggles to capture. Therefore, data-driven compensation is introduced in addition to mechanistic modeling compensation to effectively address residual errors under varying load conditions. Current technologies, such as the invention patent CN202410596892.X, treat flexible errors as data-driven models for training. However, flexible errors vary significantly with load changes, and using them as data-driven models for prediction can lead to large prediction errors, affecting the accuracy of error compensation. Summary of the Invention
[0003] The purpose of this invention is to provide a robot error compensation method based on both mechanism and data, specifically a method for compensating robot errors by combining the error calculated by the error model based on physical mechanism and the residual error predicted by the neural network model.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: a robot error compensation method based on both mechanism and data-driven approaches, comprising the following steps:
[0005] S1. Constructing a kinematic error model: ,in For geometric error, Identify the Jacobian matrix for a kinematically complete error model that includes joint transmission clearances. To account for parameter errors including joint transmission clearance, a rigid-flexible coupling dynamic model is constructed: ,in The joint torque induced by its own gravity includes the theoretical gravitational torque and the inertial torque, among which... For inertial torque, The inertia matrix, The centripetal force Coriolis matrix, For gravitational torque, The additional torque required to resist external loads; among which, This refers to the joint command position. For joint velocity, For joint acceleration, The Jacobian matrix for resisting external loads on joints. This refers to the external load force.
[0006] S2. Based on the rigid-flexible coupling dynamic model of step S1, combined with the equivalent stiffness of the joint. Calculate the expected joint flexible displacement and flexibility error: ,in To achieve the desired flexible joint displacement, This is a flexible error.
[0007] S3. Construct position residual samples: Combine all joint command positions from the joint command position dataset used for training. The data is input into the forward kinematics model to obtain the theoretical position coordinates corresponding to the commanded positions of all joints. Next, all joint command positions from the joint command position dataset used for training will be... The data is input into the robot for operation, and the robot's actual position coordinates are collected using a laser tracker. The actual location coordinates With theoretical position coordinates Subtract the difference, then subtract the geometric error. and flexibility error The position residual was then obtained. ,Right now ; Each joint command position in the joint command position dataset used for training A corresponding position residual value is obtained, which is used to obtain the position residual sample for training.
[0008] S4. Construct a neural network model with total joint torque. and joint command position As input, the position residual samples obtained in step S3 are used as the core labels for training the neural network model, so that the neural network model outputs the predicted value of the position residual.
[0009] S5. Actual command position for any specified joint. Substitute it into the rigid-flexible coupling dynamic model of step S1 Obtain the corresponding total joint torque Next and The input is fed into the neural network model that has been built and trained in step S4 to obtain the predicted value of the position residual. .
[0010] S6. The robot's underlying compensation controller can calculate the predicted joint compensation amount based on the predicted value of the position residual and the kinematic Jacobian matrix mapping. Finally, the joint command correction value is obtained. .
[0011] Specifically, the neural network model in step S4 is composed of a physical feature decoupler and a deep residual predictor connected in series. The physical feature decoupler includes a physical feature extractor and an adaptive feature fusion layer, and the deep residual predictor adopts a regression predictor.
[0012] Specifically, the physical feature extractor of the physical feature decoupler includes a p-channel and a t-channel. The p-channel is used to extract joint command positions. Feature extraction is performed, and the t-channel is used to analyze the total joint torque. Feature extraction and joint command position analysis are performed. Before inputting channel p, sine and cosine encoding is performed to obtain the following vector: .
[0013] Specifically, joint command position The vector obtained after sine and cosine encoding and total joint torque After inputting the p-channel and t-channel respectively, layer normalization was performed on both, resulting in... and After physical feature extraction, the following output is obtained: , ,in, This is the feature vector output by the p-channel. This is the feature vector output from channel t. For Mish activation function, For the layer normalization suppression operator, and These are the weight matrices for the p-channel and t-channel, respectively. and These are the bias terms for the p-channel and t-channel, respectively.
[0014] Specifically, the feature vector output after physical feature extraction and When entering the adaptive feature fusion layer, the following calculation is performed: ,in, , ,in This is for the operation of Hadamard element-wise multiplication. and These are the adaptive signal-to-noise ratio weights for the p-channel and t-channel, respectively. This is the global function expression for the physical feature extractor. Include and ,Right now , These are the trainable parameters in the physical feature extractor. This is the final output of the physical feature extractor.
[0015] Specifically, the deep residual predictor incorporates a residual jump bypass rule, and its overall function expression is as follows: ,in An array of fine-tuned parameters approximating all dominant residual maps in the deep residual predictor.
[0016] Specifically, in step S4, when training the neural network model, the mean squared error is used to construct the basic loss function, and the Adam algorithm is used to replace the conventional parameter tuning method to update the trainable parameters.
[0017] The beneficial effects of this invention are as follows: In the error model constructed based on physical mechanisms, in addition to constructing a conventional kinematic error model to obtain geometric errors, a rigid-flexible coupling dynamic model is also constructed to obtain flexible errors. The remaining errors that cannot be calculated through modeling are trained and predicted using a neural network model. Furthermore, when the neural network model predicts residual errors, joint command positions and joint torques are used as dual-channel inputs, which effectively improves the accuracy of residual error prediction, thereby improving the accuracy of robot error prediction. Attached Figure Description
[0018] Appendix Figure 1 This is a flowchart of a robot error compensation method based on both mechanism and data in an embodiment. Detailed Implementation
[0019] Example 1, referring to Figure 1 A robot error compensation method based on both mechanism and data-driven approaches includes the following steps:
[0020] S1. Constructing a kinematic error model: ,in For geometric error, Identify the Jacobian matrix for a kinematically complete error model that includes joint transmission clearances. To account for parameter errors including joint transmission clearance, a rigid-flexible coupling dynamic model is constructed: ,in The joint torque induced by its own gravity includes the theoretical gravitational torque and the inertial torque, among which... For inertial torque, The inertia matrix, The centripetal force Coriolis matrix, For gravitational torque, The additional torque required to resist external loads; among which, This refers to the joint command position. For joint velocity, For joint acceleration, The Jacobian matrix for resisting external loads on joints. This refers to the external load force.
[0021] S2. Based on the rigid-flexible coupling dynamic model of step S1, combined with the equivalent stiffness of the joint. Calculate the expected joint flexible displacement and flexibility error: ,in To achieve the desired flexible joint displacement, This is a flexible error.
[0022] S3. Construct position residual samples: Combine all joint command positions from the joint command position dataset used for training. The data is input into the forward kinematics model to obtain the theoretical position coordinates corresponding to the commanded positions of all joints. Next, all joint command positions from the joint command position dataset used for training will be... The data is input into the robot for operation, and the robot's actual position coordinates are collected using a laser tracker. The actual location coordinates With theoretical position coordinates Subtract the difference, then subtract the geometric error. and flexibility error The position residual was then obtained. ,Right now ; Each joint command position in the joint command position dataset used for training A corresponding position residual value is obtained, which is used to obtain the position residual sample for training.
[0023] S4. Construct a neural network model with total joint torque. and joint command position As input, the position residual samples obtained in step S3 are used as the core labels for training the neural network model, so that the neural network model outputs the predicted value of the position residual.
[0024] S5. Actual command position for any specified joint. Substitute it into the rigid-flexible coupling dynamic model of step S1 Obtain the corresponding total joint torque Next and The input is fed into the neural network model that has been built and trained in step S4 to obtain the predicted value of the position residual. .
[0025] S6. The robot's underlying compensation controller can calculate the predicted joint compensation amount based on the predicted value of the position residual and the kinematic Jacobian matrix mapping. Finally, the joint command correction value is obtained. .
[0026] Specifically, the neural network model in step S4 is composed of a physical feature decoupler and a deep residual predictor connected in series. The physical feature decoupler includes a physical feature extractor and an adaptive feature fusion layer, and the deep residual predictor adopts a regression predictor.
[0027] Specifically, the physical feature extractor of the physical feature decoupler includes a p-channel and a t-channel. The p-channel is used to extract joint command positions. Feature extraction is performed, and the t-channel is used to analyze the total joint torque. Feature extraction and joint command position analysis are performed. Before inputting channel p, sine and cosine encoding is performed to obtain the following vector: .
[0028] Specifically, joint command position The vector obtained after sine and cosine encoding and total joint torque After inputting the p-channel and t-channel respectively, layer normalization was performed on both, resulting in... and After physical feature extraction, the following output is obtained: , ,in, This is the feature vector output by the p-channel. This is the feature vector output from channel t. For Mish activation function, For the layer normalization suppression operator, and These are the weight matrices for the p-channel and t-channel, respectively. and These are the bias terms for the p-channel and t-channel, respectively.
[0029] Specifically, the feature vector output after physical feature extraction and When entering the adaptive feature fusion layer, the following calculation is performed: ,in, , ,in This is for the operation of Hadamard element-wise multiplication. and These are the adaptive signal-to-noise ratio weights for the p-channel and t-channel, respectively. This is the global function expression for the physical feature extractor. Include and ,Right now , These are the trainable parameters in the physical feature extractor. This is the final output of the physical feature extractor.
[0030] Specifically, the deep residual predictor incorporates a residual jump bypass rule, and its overall function expression is as follows: ,in An array of fine-tuned parameters approximating all dominant residual maps in the deep residual predictor.
[0031] Specifically, in step S4, when training the neural network model, the mean squared error (MSE) is used to construct the basic loss function, which is as follows: The parameters n and m define the total number of joint configurations covered by the training samples and the error feature dimension in a single sampling, respectively. and These are the model's predicted values and the actual values, respectively. Simultaneously, the Adam (Adaptive Moment Estimation) algorithm is used to replace the conventional parameter tuning method to update the trainable parameters. The Adam algorithm, by comprehensively calculating the historical first-moment and second-moment estimates of the objective function's gradient, provides a physical feature extractor (with parameters...). ) and depth residual predictor (parameters are A dynamically designed independent adaptive learning rate ensures robust convergence and efficient parameter updates on steep, unstructured error surfaces. The update rule for trainable parameters after adaptive momentum correction can be expressed as: , , , and , These are the first-order and second-order gradient estimates of the respective trainable parameters in Adam, corrected by introducing a bias correction mechanism. The global base learning rate, To prevent smooth minima with a denominator of zero (generally set to 10) -8 In addition, to give the neural network a larger exploration stride in the early stages of training to coarsely sweep the high-dimensional space, and to implement high-precision and fast convergence in the later stages of training, this embodiment also uses a more robust step-adaptive learning rate decay method: ,in, For the first The current learning rate in the round of iterations; The initial learning rate of the network is set to . ; The attenuation factor is set to 0.5; The decay period is set to 150 rounds; This represents the total number of iterations currently in progress; Represents the floor function
[0032] Of course, the above are only preferred embodiments of the present invention and are not intended to limit the scope of application of the present invention. Therefore, any equivalent changes made to the principle of the present invention should be included within the protection scope of the present invention.
Claims
1. A robot error compensation method based on both mechanism and data-driven approaches, characterized in that, Includes the following steps: S1. Constructing a kinematic error model: ,in For geometric error, Identify the Jacobian matrix for a kinematically complete error model that includes joint transmission clearances. To account for parameter errors including joint transmission clearance, a rigid-flexible coupling dynamic model is constructed: ,in The total joint torque, The joint torque induced by its own gravity includes the theoretical gravitational torque and the inertial torque, among which... For inertial torque, The inertia matrix, The centripetal force Coriolis matrix, For gravitational torque, The additional torque required to resist external loads; among which, This refers to the joint command position. For joint velocity, For joint acceleration, The Jacobian matrix for resisting external loads on joints. For external load force; S2. Based on the rigid-flexible coupling dynamic model of step S1, combined with the equivalent stiffness of the joint. Calculate the expected joint flexible displacement and flexibility error: ,in To achieve the desired flexible joint displacement, This is for flexible error; S3. Construct position residual samples: Combine all joint command positions from the joint command position dataset used for training. The data is input into the forward kinematics model to obtain the theoretical position coordinates corresponding to the commanded positions of all joints. Next, all joint command positions from the joint command position dataset used for training will be... The data is input into the robot for operation, and the robot's actual position coordinates are collected using a laser tracker. The actual location coordinates With theoretical position coordinates Subtract the difference, then subtract the geometric error. and flexibility error The position residual was then obtained. ,Right now ; Each joint command position in the joint command position dataset used for training A corresponding position residual value is obtained, which is used to obtain the position residual sample for training. S4. Construct a neural network model with total joint torque. and joint command position As input, the position residual samples obtained in step S3 are used as the core label quantity for model training to train the neural network model, so that the neural network model outputs the predicted value of the position residual. S5. Actual command position for any specified joint. Substitute it into the rigid-flexible coupling dynamic model of step S1 Obtain the corresponding total joint torque Next and The input is fed into the neural network model that has been built and trained in step S4 to obtain the predicted value of the position residual. ; S6. The robot's underlying compensation controller can calculate the predicted joint compensation amount based on the predicted value of the position residual and the kinematic Jacobian matrix mapping. Finally, the joint command correction value is obtained. .
2. The robot error compensation method based on both mechanism and data-driven approaches according to claim 1, characterized in that: The neural network model in step S4 is composed of a physical feature decoupler and a deep residual predictor connected in series. The physical feature decoupler includes a physical feature extractor and an adaptive feature fusion layer, and the deep residual predictor adopts a regression predictor.
3. The robot error compensation method based on both mechanism and data-driven approaches according to claim 2, characterized in that: The physical feature extractor of the physical feature decoupling device includes a p-channel and a t-channel. The p-channel is used for joint command position. Feature extraction is performed, and the t-channel is used to analyze the total joint torque. Feature extraction and joint command position analysis are performed. Before inputting channel p, sine and cosine encoding is performed to obtain the following vector: .
4. The robot error compensation method based on both mechanism and data-driven approaches according to claim 3, characterized in that: Joint command position The vector obtained after sine and cosine encoding and total joint torque After inputting the p-channel and t-channel respectively, layer normalization was performed on both, resulting in... and After physical feature extraction, the following output is obtained: , ,in, This is the feature vector output by the p-channel. This is the feature vector output from channel t. For Mish activation function, For the layer normalization suppression operator, and These are the weight matrices for the p-channel and t-channel, respectively. and These are the bias terms for the p-channel and t-channel, respectively.
5. The robot error compensation method based on both mechanism and data-driven approaches according to claim 4, characterized in that: The feature vector output after physical feature extraction and When entering the adaptive feature fusion layer, the following calculation is performed: ,in, , ,in This is for the operation of Hadamard element-wise multiplication. and These are the adaptive signal-to-noise ratio weights for the p-channel and t-channel, respectively. Represents the transpose of a matrix. This is the global function expression for the physical feature extractor. Include and ,Right now , These are the trainable parameters in the physical feature extractor. This is the final output of the physical feature extractor.
6. The robot error compensation method based on both mechanism and data-driven approaches according to claim 5, characterized in that: The depth residual predictor incorporates a residual jump bypass rule, and its overall function expression is as follows: ,in An array of fine-tuned parameters approximating all dominant residual maps in the deep residual predictor.
7. The robot error compensation method based on both mechanism and data-driven approaches according to claim 1, characterized in that: In step S4, when training the neural network model, the mean squared error is used to construct the basic loss function, and the Adam algorithm is used to replace the conventional parameter tuning method to update the trainable parameters.
Citation Information
Patent Citations
Robot positioning error compensation method and system driven by mechanism data fusion
CN118418127A
Construction method and system of robot torque residual compensation model
CN120680522A