Multi-joint robot gap error compensation method based on physical information network
Through the method based on physical information network, a network model for detecting and compensating gap errors of multi-joint robots is constructed and trained, which solves the problem that the prior art cannot effectively detect and compensate gap errors, and achieves higher precision robot control performance.
Patent Information
- Application Number
- CN202510247116.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-03-04
AI Technical Summary
Existing industrial robot dynamics and friction reconstruction technologies cannot effectively detect and compensate joint gap errors of multi-joint robots, resulting in reduced accuracy of dynamic models and reduced control performance.
Using a method based on physical information network, data is collected through robot excitation experiments, dynamic residual error data sets are constructed, error detection and classification networks are trained, and gap error model and PINN compensation network based on Gaussky functions are constructed to realize real-time detection, classification and compensation of dynamic gap errors.
It realizes accurate compensation of robot dynamic gap error, improves robot control accuracy and robustness, and is better than existing methods in terms of gap error compensation effect.
Smart Images

Figure CN120056110A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a technology in the field of robot control, specifically a method for compensating the clearance error of a multi-joint robot based on the Cyber-Physical System (CPS). Background Art
[0002] An accurate joint dynamics model and torque feedback are effective means to improve the control performance of a robot. However, non-linear factors such as joint gear clearances will affect the servo tracking accuracy and dynamics model accuracy of the robot joints, thereby reducing the actual control performance of the robot and affecting the realization of specific functions such as collision detection. Especially for multi-joint serial robots, their serial motion structure further amplifies the negative impact of joint clearances. Existing industrial robot dynamics and friction reconstruction technologies cannot effectively detect the occurrence of robot joint clearance errors and are unable to effectively model and compensate for the dynamics errors caused by robot joint clearances because they do not consider the influence of joint clearances on the motion and force performance of the robot. Summary of the Invention
[0003] Aiming at the above deficiencies of the existing technology, the present invention proposes a method for compensating the clearance error of a multi-joint robot based on the Cyber-Physical System (CPS), which can avoid modeling the complex force contact process of joint clearances. By learning the potential mapping relationship between the joint motion state and the clearance error of the robot, it can effectively compensate for the clearance error of high-performance joint dynamics, and improve the accuracy and robustness of the robot control technology based on the dynamics model.
[0004] The present invention is realized through the following technical solutions:
[0005] The present invention relates to a method for compensating the clearance error of a multi-joint robot based on the Cyber-Physical System (CPS). By collecting the joint angle, angular velocity and current data of each joint of the robot during the excitation experiment and calculating the dynamic residual error of the robot to generate a data set, which is used to train the constructed error detection and classification network; then constructing a clearance error model based on the Gaussian function and establishing a clearance error compensation network based on PINN. After training with the data set, the trained PINN-based clearance error compensation framework is used in the online stage to predict the error amplitude and perform error compensation.
[0006] The present invention relates to a system for implementing the above method, including: a dataset construction unit, a model training unit, and an online compensation unit, where: the dataset construction unit collects joint motion data and current or torque data through a robot excitation experiment, performs modeling and identification of robot dynamics and friction, and calculates the dynamic residual error of the robot. Then, by analyzing the relationship between the joint clearance and joint motion, the clearance error is separated from the dynamic error, and the dynamic clearance error is classified and labeled according to the joint motion state criterion and repeatability criterion. Finally, a dataset for online detection and classification of robot dynamic clearance errors is generated; the model training unit performs time series detection and classification of dynamic clearance errors by learning the historical information of robot joint motion. At the same time, a robot dynamic clearance error model is constructed based on the Gaussian basis function, and corresponding PINN compensation network branches are designed for different clearance error types and trained until convergence to obtain the PINN compensation network model for robot dynamic clearance errors; the online compensation unit deploys the trained PINN compensation network model to the robot control host computer to realize online inference and compensation of robot dynamic clearance errors. Technical effects
[0007] According to the present invention, the clearance error in the dynamic error is separated based on the correlation between the robot joint clearance and joint motion. Through the dynamic clearance error model based on the Gaussian basis function, each parameter of the error model is used as the training target of the neural network, and the corresponding PINN framework is constructed to achieve precise compensation of the dynamic clearance error. Compared with other existing methods that do not consider the potential mapping relationship between the robot joint motion state and clearance error, the present invention can realize real-time detection and classification of robot dynamic clearance errors and accurate prediction of dynamic clearance error signals, and achieve precise compensation of dynamic clearance errors. Description of the drawings
[0008] Figure 1 It is a flowchart of the present invention;
[0009] Figure 2 It is a hardware architecture diagram of the embodiment;
[0010] Figures 3 to 8 It is a diagram of the clearance error detection and classification results of the embodiment;
[0011] Figure 9 It is a schematic diagram of the clearance error compensation network based on PINN of the embodiment;
[0012] Figure 10 It is a diagram of the clearance error compensation results of the embodiment. Detailed implementation manners
[0013] As Figure 1As shown in the figure, this embodiment relates to a method for compensating the clearance error of a multi-joint robot based on the Cyber-Physical System,
[0014] Step 1: Conduct a robot excitation experiment and collect joint data, specifically including:
[0015] 1.1) Generate an excitation trajectory for the robot's motion in the form of a fifth-order Fourier series. The motion trajectory of the i-th joint is specifically: where: a i,k and b i,k are the coefficients of the k-th trigonometric function of the i-th joint, q i,0 is a constant term to ensure that the trajectory can satisfy the initial position and velocity constraints, ω f is the fundamental frequency of the excitation trajectory, and t is time.
[0016] The excitation trajectory in the form of a fifth-order Fourier series is differentiable in multiple orders, and it is easy to obtain the analytical expressions of velocity and acceleration. Moreover, the flexible effect of the robot can be avoided by designing the frequency range.
[0017] 1.2) Use the Patternsearch toolbox in MATLAB to further optimize the excitation trajectory of the robot's motion by the method of the condition number of constraints to cover more motion states. Specifically: under the constraints of the limit position, velocity, acceleration of the robot joints and the constraint that the initial velocity is zero, use the optimization algorithm in Patternsearch to obtain the excitation trajectory with the minimum condition number of the observation matrix.
[0018] 1.3) Conduct a robot excitation experiment according to the optimized excitation trajectory. Use the robot joint end encoder to collect the angle and angular velocity information of each joint of the robot, use the robot joint driver to feedback the drive current signal of each joint of the robot, and calculate the current estimated torque of each joint of the robot according to the drive current signal of each joint. Specifically: τ = krI, where: I is the drive current of each joint of the robot, k is the motor torque constant of each joint, r is the transmission ratio coefficient of each joint, and τ is the current estimated torque of each joint. The values of k and r are provided by the robot manufacturer or identified by oneself.
[0019] 1.4) Perform mean filtering, low-pass filtering, and differential processing on the collected angle, angular velocity information, and current estimated torque of each joint of the robot in turn to obtain the angular acceleration of each joint.
[0020] For the low-pass filtering, a fifth-order Butterworth low-pass filter is preferably used.
[0021] Step 2: Conduct robot dynamics and friction modeling and calculate the joint torque residuals, specifically including:
[0022] 2.1) Conduct robot dynamics modeling, specifically: the dynamic torque of the robot joints where: q, represent the joint angle, angular velocity, and angular acceleration of the robot respectively, M(q) is the mass matrix of the robot, is the force generated by centripetal force and Coriolis force, G(q) is the gravity, and τ dyn is the dynamic torque of each joint of the robot.
[0023] 2.2) Conduct robot friction modeling, specifically: the friction force of the k-th joint of the robot where: the friction model matrix α k are empirical parameters respectively, sign(·) is the sign function, and the friction coefficients are the Coulomb friction coefficient, viscous friction coefficient, and friction offset of the k-th joint respectively.
[0024] 2.3) Solve the constructed robot dynamics model and friction model through the parameter identification method based on least squares or the model training method based on PINN to obtain the dynamic torque τ dyn of each joint of the robot and the friction torque τ fri Then, calculate the torque residual τ err of each joint of the robot = τ - τ dyn - τ fri .
[0025] Step three, construct a robot dynamics clearance error classification data set according to the robot motion state, specifically including:
[0026] 3.1) Generate feature factors according to the robot motion state, specifically: calculate the feature factor representing the motion state of the k-th joint of the robot, where: t i and are the time and joint velocity corresponding to the i-th motion state sample respectively; when then it means that the motion direction of the k-th joint of the robot is reversed at the t i th moment.
[0027] 3.2) Generate a clearance error occurrence label according to the state of the robot where: κ i = 1 indicates that there is a commutation error at this moment. When κ i = 2 indicates that there is a start / stop error at this moment. When κ i = 0, it indicates that there is no error caused by clearance at this moment. Further, screen out the repeated labels corresponding to the same clearance error sample according to the repeatability criterion.
[0028] When the dynamic clearance error of the robot occurs, its error proportion is much larger than other error components in the torque residual. Therefore, the dynamic clearance error of the robot can be approximately obtained: κ i = 1 or κ i = 2 indicates the existence of the dynamic clearance error, and it can be approximated as the torque residual, that is, the torque residual τ of each joint of the robot calculated in step 2.3 err .
[0029] 3.3) Construct a classification dataset for the dynamic clearance error of the robot: For the joint angle q, angular velocity and angular acceleration after preprocessing in step one, calculate the corresponding robot clearance error label κ at all times. Use a sliding window with a length of 32 to perform sliding window processing on q, that is, use the joint angle, angular velocity, and angular acceleration of each joint of the robot at 32 moments before the current moment as samples of the dataset; use the clearance error label corresponding to the current moment as the sample label. For the dataset collected over a period of time, divide it into a training set, a validation set, and a test set according to the ratio of 60%, 20%, and 20%.
[0030] Step four, based on the dataset generated in step three, train the temporal convolutional network (TCN) for classification to achieve online detection and class prediction of clearance errors: Use the joint angle, angular velocity, and angular acceleration of each joint of the robot at 32 moments before the current moment as input, and use the clearance error label corresponding to the current moment as the prediction result. Extract the historical information of the input robot motion state through a stacked one-dimensional convolutional architecture and dilated convolution, detect whether an error occurs, and judge the category of the error.
[0031] The dilated convolution mentioned above where: * d is the dilated convolution operation, x is the input data, f is the dilated convolution filter, k is the filter size, and d is the dilation factor.
[0032] The prediction result where: is the predicted label value of the clearance error category. When the predicted label value changes from 0 to non-0 at a certain moment, it indicates that a clearance error will occur at that moment. Through the prediction of the clearance error category, real-time online detection of the joint clearance error is achieved. As Figures 3 - 8 shown, it is the clearance error detection and classification results of each joint of the robot.
[0033] Step five, construct a clearance error model based on the Gaussian function and establish a clearance error compensation network based on PINN for predicting the error amplitude and performing error compensation, specifically including:
[0034] 5.1) The j-th gap error sample Φ j (S j , δ Rev ) = Φ j (t), t ∈ B(S j , δ Rev ), where: B(S j , δ Rev ) is the time interval during which the gap error persists, that is, the j-th consecutive interval where the error class label κ is non-zero. a j , b j , c j are parameters that determine the shape of the Gaussian basis function, and are updated through learning to ensure that the Gaussian basis function can accurately fit the gap error. The length of a single gap error sample in the time domain is limited.
[0035] 5.2) Use a multi-layer perceptron (MLP) to learn the mapping relationship between the robot motion state and the Gaussian basis function shape parameters of the gap error, classify the gap errors in steps 2 - step 4, and obtain the predicted values of the gap errors during a period of motion: Specifically: Predicted value where: are the predicted values of the parameters of the Gaussian basis function. The joint angle q and the angular acceleration are used as the inputs of the model because the joint angle has a greater impact on the time-domain offset degree of the gap error, while the angular acceleration has a greater impact on the peak value of the gap error. κ is the error type, and different types of errors use different branches of the MLP for learning to achieve separate modeling of two types of gap errors with different characteristics. θ is the network parameter, which is updated during the model training process. and are the predictions of the j-th commutation error sample and start-stop error sample respectively.
[0036] After specific experiments, under the hardware facilities of a six-axis serial robot body, a robot control cabinet, a host computer with TwinCAT3 software, a Beckhoff controller, and an EtherCAT communication bus as shown in Figure 2 , cooperate with the PyTorch environment to build the robot dynamics gap error model based on the Gaussian basis function described in step 5.1, and build the corresponding PINN gap error compensation network; Since the gap error usually has a higher peak and a sparser time-domain distribution compared to the dynamic errors caused by other factors, the loss function of the designed network is: where: is the weighted coefficient of the loss function, which emphasizes the influence of errors with larger magnitudes, thereby achieving a better approximation of the clearance error. σ is an integer close to 0, introduced to prevent calculation errors when the error is zero. Adam is selected as the optimizer, and the learning rate is set to 0.01. The above PINN clearance error compensation network model is trained until convergence. In the present invention, the parameters of the clearance error model are predicted through the PINN network instead of directly predicting the clearance error value, which effectively simplifies the complexity of the mapping relationship and makes the proposed error compensation method more robust and easy to learn.
[0037] Select a new robot motion trajectory. First, use the online detection and classification method of clearance error in step three for real-time online detection; when a clearance error is detected, online inference and compensation of the clearance error are performed through the trained PINN clearance error compensation network model.
[0038] After specific actual experiments, under the above hardware environment settings, the root mean square error values (RMSE) of the torque prediction errors of each joint of the robot finally are reduced from 2.2218 N·m, 1.8042 N·m, 1.0625 N·m, 0.5756 N·m, 0.2578 N·m, 0.2551 N·m before compensation to 1.4213 N·m, 1.4343 N·m, 0.6292 N·m, 0.2745 N·m, 0.1356 N·m, 0.6775 N·m. And comparisons are made with other existing methods, including the method based on MLP, the method based on TCN, the method based on convolutional neural network (CNN), and the method based on long short-term memory network (LSTM), as Figure 10 shown. The results show that the present invention can achieve high-precision clearance error compensation, which is better than the existing methods. The comparison results are shown in Table 1.
[0039] Table 1 Comparison of RMSE of clearance error compensation effects (N·m)
[0040] Compared with the prior art, in the present invention, a robot dynamics clearance error model based on Gaussian basis functions can effectively fit the actual robot dynamics clearance error, improve the compensation effect of the robot dynamics clearance error, and achieve higher-precision joint dynamics torque prediction; by predicting the parameters of the clearance error model through the PINN network instead of directly predicting the clearance error value, this effectively simplifies the complexity of the mapping relationship, makes the proposed error compensation method more robust and easy to learn, and ensures the overall machine motion control performance of the industrial robot based on the dynamics model.
[0041] The above specific embodiments can be locally adjusted in different ways by those skilled in the art without departing from the principles and purposes of the present invention. The protection scope of the present invention is subject to the claims and is not limited by the above specific embodiments. All implementation solutions within its scope are subject to the present invention.
Claims
1. A multi-joint robot gap error compensation method based on physical information network, characterized in that: By collecting the angle, angular velocity and current data of each joint of the robot during the robot excitation experiment and calculating the dynamic residual error of the robot, a data set is generated to train the constructed error detection and classification network; The gap error model based on Gaussian basis function is reconstructed and a gap error compensation network based on PINN is established. After training with the data set, the trained PINN-based gap error compensation framework is used in the online stage to predict the error amplitude and perform error compensation.
2. The multi-joint robot gap error compensation method based on physical information network according to claim 1 is characterized in that: The robot incentive experiment is realized by the following methods: 1.1) The fifth-order Fourier series form is used to generate the excitation trajectory of the robot motion. The motion trajectory of the i-th joint is specifically: Among them: a i,k and b i,k is the coefficient of the kth trigonometric function of the ith joint, q i,0 To ensure that the trajectory can satisfy the constant term of the initial position and velocity constraints, ω f is the fundamental frequency of the excitation trajectory, t is the time; 1.2) Using the Patternsearch toolbox in MATLAB, the excitation trajectory of the robot motion is further optimized by the method of constraint condition number to cover more motion states. Specifically, under the constraints of the robot joint's extreme position constraints, velocity constraints, acceleration constraints, and the initial velocity being zero, the optimization algorithm in Patternsearch is used to obtain the excitation trajectory with the minimum observation matrix condition number; 1.3) Carry out robot excitation experiment according to the optimized excitation trajectory, use the robot joint end encoder to collect the angle and angular velocity information of each joint of the robot, use the robot joint driver feedback to obtain the driving current signal of each joint of the robot, and calculate the current estimated torque of each joint of the robot according to the driving current signal of each joint, specifically: τ = krI, where: I is the driving current of each joint of the robot, k is the motor torque constant of each joint, r is the transmission ratio coefficient of each joint, τ is the current estimated torque of each joint, and the values of k and r are provided by the robot manufacturer or identified by itself; 1.4) The collected angle and angular velocity information of each joint of the robot and the current estimated torque are successively subjected to mean filtering, low-pass filtering and differential processing to obtain the angular acceleration of each joint.
3. The multi-joint robot gap error compensation method based on physical information network according to claim 1 is characterized in that: The dynamic residual error is calculated as follows: 2.1) Carry out robot dynamics modeling, specifically: robot joint dynamics torque Where: q, are the robot joint angle, angular velocity and angular acceleration respectively, M(q) is the robot’s mass matrix, is the force generated by the centripetal force and the Coriolis force, G(q) is the gravity, τ dyn is the dynamic torque of each joint of the robot; 2.2) Robot friction modeling, specifically: the friction force of the robot's kth joint Where: Friction model matrix α k are empirical parameters, sign(·) is the sign function, and the friction coefficient are the Coulomb friction coefficient, viscous friction coefficient and friction offset of the kth joint respectively; 2.3) Solve the constructed robot dynamics model and friction model through the least squares-based parameter identification method or the PINN-based model training method to obtain the dynamic torque τ of each joint of the robot dyn and friction torque τ fri Then, calculate the torque residual τ of each joint of the robot err =τ-τ dyn -τ fri .
4. The multi-joint robot gap error compensation method based on physical information network according to claim 1 is characterized in that: The data set is obtained in the following way: 3.1) Generate characteristic factors according to the robot's motion state, specifically: calculate the characteristic factor that characterizes the kth joint motion state of the robot Where: t i and are the time and joint speed corresponding to the i-th motion state sample respectively; Then it is the tth i At time k, the motion direction of the robot's joint is reversed; 3.2) Generate gap error occurrence label based on robot status Where: i =1 indicates that there is a commutation error at this moment. i =2 indicates that there is a start-stop error at this moment. i =0 indicates that there is no gap-induced error at this moment, and the repeated labels corresponding to the same gap error sample are further screened out according to the repeatability criterion; When the robot dynamic clearance error occurs, its error proportion is much larger than other error components in the torque residual, so the robot dynamic clearance error is approximately obtained: κ i =1 or κ i = 2 indicates that the dynamic clearance error exists and can be approximated as the torque residual, that is, the torque residual τ of each joint of the robot calculated in step 2.3 err ; 3.3) Constructing the robot dynamics gap error classification dataset: The joint angle q and angular velocity preprocessed in step 1 and angular acceleration Calculate the robot gap error label κ corresponding to each moment, and use a sliding window of length 32 to compare q, Sliding window processing is performed, that is, the joint angles, angular velocities, and angular accelerations of each joint of the robot at 32 moments before the current moment are used as samples of the data set; the gap error label corresponding to the current moment is used as the sample label, and the data set collected over a period of time is divided into training set, validation set, and test set according to the ratio of 60%, 20%, and 20%.
5. The multi-joint robot gap error compensation method based on physical information network according to claim 1 is characterized in that: The error detection and classification network obtained by the training structure refers to: training a temporal convolutional network (TCN) for classification based on a data set to achieve online detection and category prediction of gap errors: taking the joint angles, angular velocities, and angular accelerations of each joint of the robot at 32 moments before the current moment as input, and taking the gap error label corresponding to the current moment as the prediction result, extracting the historical information of the input robot motion state through a stacked one-dimensional convolution architecture and dilated convolution, detecting whether an error occurs and determining the category of the error.
6. The multi-joint robot gap error compensation method based on physical information network according to claim 5 is characterized in that: The dilated convolution in:* d For the extended convolution operation, x is the input data, f is the extended convolution filter, k is the filter size, and d is the dilation factor; The prediction results in: is the predicted label value of the gap error category. When the predicted label value changes from 0 to non-0 at a certain moment, it indicates that a gap error will occur at that moment. The real-time online detection of the joint gap error is achieved by predicting the gap error category.
7. The multi-joint robot gap error compensation method based on physical information network according to claim 1 is characterized in that: The construction of the gap error model based on the Gaussian basis function and the establishment of the gap error compensation network based on the PINN specifically include: 5.1) The jth gap error sample Φ j (S j ,δ Rev )=Φ j (t),t∈B(S j ,δ Rev ),in: B(S j ,δ Rev ) is the time interval during which the gap error lasts, that is, the jth continuous interval in which the error category label κ is not 0, a j , b j , c j It is the parameter that determines the shape of the Gaussian basis function, and is updated through learning to ensure that the Gaussian basis function can accurately fit the gap error; 5.2) The mapping relationship between the robot motion state and the Gaussian basis function morphological parameters of the gap error is learned through a multi-layer perceptron (MLP), the gap error is classified, and the predicted value of the gap error is obtained: specifically: Predicted value in: is the predicted value of the parameters of the Gaussian basis function, the joint angle q and the angular acceleration As the input of the model, since the joint angle has a greater impact on the time domain offset of the gap error, and the angular acceleration has a greater impact on the peak value of the gap error, κ is the error type. Different types of errors are learned using MLPs with different branches to achieve separate modeling of the two types of gap errors with different characteristics. θ is the network parameter, which is updated during the model training process. and They are the predictions of the jth commutation error sample and start-stop error sample, respectively.
8. A multi-joint robot gap error compensation system based on a physical information network for implementing any of the methods described in claims 1-7, characterized in that: include: A data set construction unit, a model training unit and an online compensation unit, wherein: the data set construction unit collects joint motion data and current or torque data through a robot excitation experiment, models and identifies the robot's dynamics and friction, and calculates the robot's dynamic residual error, then separates the gap error from the dynamic error by analyzing the relationship between the joint gap and the joint motion, and classifies and labels the dynamic gap error according to the joint motion state criterion and the repeatability criterion, and finally generates a data set for online detection and classification of the robot's dynamic gap error; the model training unit performs time-series detection and classification of the dynamic gap error by learning the historical information of the robot's joint motion, and constructs a robot dynamic gap error model based on the Gaussian basis function, and designs corresponding PINN compensation network branches for different gap error types and trains until convergence, to obtain a PINN compensation network model of the robot's dynamic gap error; The online compensation unit deploys the trained PINN compensation network model to the robot control host computer to realize the online reasoning and compensation of the robot's dynamic clearance error.
Citation Information
Patent Citations
Automatic measuring compensation method and correction device for five-axis machine tool structure errors
CN108372428A
Semi-parameterized industrial robot dynamics modeling method of convolutional neural network
CN112327630A
Industrial robot position error compensation method and system based on GBDT algorithm
CN115107022A
Method, device and equipment for monitoring torque of low-speed shaft of wind turbine generator
CN116085192A
Full life cycle industrial robot position error prediction and compensation method
CN118596147A
Cited By
Compensation method for robot imitation learning training process
CN121028677A
Error optimization method and device for joint attitude angle of reflector antenna
CN121349175A
Error optimization method and device for joint attitude angle of reflector antenna
CN121349175B