Robot machining error joint prediction method, medium, equipment and product
By analyzing the coupling mechanism of the robot's geometric error and flexibility error, combining empirical mode decomposition, Gaussian process regression model and time convolutional neural network, the robot processing error is decomposed and predicted, which solves the problem of insufficient error prediction accuracy in the existing technology and achieves high-precision processing error prediction.
Patent Information
- Application Number
- CN202510661254.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-09-12
AI Technical Summary
Existing robot machining error prediction methods lack analysis of the error formation mechanism and cannot effectively deal with the complex correlation of errors in the spatial and temporal domains, resulting in a decrease in prediction accuracy, especially when the workpiece position changes and the machining parameters are adjusted.
By analyzing the coupling mechanism of the robot's geometric error and flexibility error, a mathematical model is established. Based on empirical mode decomposition, the error is decomposed into low-frequency system components and high-frequency working condition-related components. The Gaussian process regression model is used to predict the system components, and the temporal convolutional neural network is used to predict the working condition-related components. The two prediction results are then superimposed.
The overall accuracy of robot machining error prediction is significantly improved, the dynamic characteristics of the machining process are captured, and the applicability and accuracy of the model are improved.
Smart Images

Figure CN120632805A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot machining error prediction, and in particular to a robot machining error joint prediction method, medium, equipment, and product. Background Art
[0002] Industrial robots face significant precision issues during milling, severely restricting their widespread application in high-precision machining scenarios. Industrial robot machining errors primarily stem from two factors: geometric error, including deviations in the robot's structural parameters, joint clearances, and assembly errors, which lead to millimeter-level posture errors in the robot under static conditions. Second, flexibility error stems from the robot's low joint stiffness, resulting in significant deformation under cutting forces. Furthermore, operating conditions such as the robot's posture changes, dynamic characteristics, and cutting parameters during machining also have a complex impact on machining accuracy.
[0003] Currently, research on robot machining errors is primarily divided into three approaches: direct measurement, calibration modeling, and data-driven prediction. Direct measurement utilizes external sensing devices such as laser trackers and vision systems to measure robot pose errors in real time. While highly accurate, this approach suffers from high equipment costs and susceptibility to environmental interference. Calibration modeling constructs a theoretical error model through parameter identification, but struggles to accurately characterize complex nonlinear errors and suffers from discrepancies between the calibration space and the workspace. Data-driven prediction utilizes machine learning techniques to establish error mapping relationships, boasting strong nonlinear fitting capabilities and considered one of the most effective methods.
[0004] However, existing data-driven methods generally adopt an end-to-end direct prediction model, taking the robot state and machining conditions as input and directly outputting prediction errors. This approach lacks analysis of the error's underlying mechanisms. This approach ignores the fact that systematic components and condition-dependent components in machining errors have different characteristics. As a result, the constructed prediction models have limited generalization capabilities, and prediction accuracy decreases significantly under conditions such as workpiece position changes and machining parameter adjustments.
[0005] In addition, traditional error prediction methods fail to effectively deal with the complex correlation of errors in the spatial and temporal domains, and cannot accurately capture the dynamic characteristics of the machining process, especially the error variation patterns in different stages such as cutting in, stable machining, and cutting out, which limits the scope of application and accuracy of the prediction model. Summary of the Invention
[0006] The purpose of the present invention is to propose a robot machining error joint prediction method in order to solve the problem, comprising the following steps: S1. Analyze the coupling mechanism between robot geometric error and flexibility error, and establish a mathematical model of robot processing error; S2. Error decomposition strategy based on empirical mode decomposition, which decomposes the machining error into low-frequency system components and high-frequency working condition-related components; S3. The Gaussian process regression model is used to predict the error based on the system components, and the time convolutional neural network is used to construct a prediction model based on the error of the working condition-related components; the two parts of the prediction results are superimposed to obtain a joint prediction of the processing error.
[0007] Furthermore, the mathematical model of the robot's geometric error is: , in, represents the homogeneous transformation matrix of two adjacent links, 、 、 and Respectively represent connecting rod i The length of the common perpendicular line, the connecting rod offset, the connecting rod rotation angle and the joint angle, 、 、 and Respectively represent connecting rod i The errors of the common perpendicular length, connecting rod offset, connecting rod rotation angle and joint angle.
[0008] Furthermore, the mathematical model of the robot's flexibility error is: , in, represents the flexibility error of the robot end, represents the Jacobian matrix, represents the joint angle sequence, represents the joint stiffness matrix, Represents the generalized force acting on the end.
[0009] Furthermore, the coupling mechanism between the robot geometric error and the flexibility error is as follows: the robot geometric error is related to the position of the joint space, Characterizing the position of the joint space, in the robot's flexibility error, the end flexibility is related to the position of the joint space, and the generalized force on the end is related to the time-varying process data of the machining parameters; The mathematical model of robot machining error is expressed as: , Among them, e represents the robot processing error, It is an abstract expression of the mapping model.
[0010] Further, The error decomposition strategy based on empirical mode decomposition decomposes the machining error into low-frequency system components and high-frequency working condition-related components, which can be expressed as: , Where n represents the number of IMF components, Indicates the i The jth IMF component of the processing error signal; The correlation coefficient between the IMF component and the original processing error is expressed as: , in, represents the correlation coefficient between the j-th order modal component and the original processing error, represents the covariance calculation function, and Respectively and variance; The IMF components whose correlation coefficients exceed the set threshold are defined as systematic errors, and the rest are working condition related components.
[0011] Furthermore, the Gaussian process regression model is used to predict the errors based on the system components, specifically: Observed values of the errors of the systematic components and test values Obey the joint Gaussian prior distribution, expressed as: , in, The training set input matrix representing the system component errors, The test set input matrix representing the system component errors, express The covariance matrix of yes The covariance matrix of yes and The covariance matrix of represents the variance of the Gaussian distribution, and I represents the identity matrix; The posterior distribution of is expressed as: , in, express The posterior distribution of Indicates the mean , the variance is Gaussian distribution; is the mean of the predicted values of the Gaussian process regression model; express variance; use The posterior distribution of is used to predict new test points.
[0012] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the above-mentioned robot processing error joint prediction method.
[0013] The present invention also proposes an electronic device, comprising a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the above-mentioned robot processing error joint prediction method.
[0014] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above-mentioned robot machining error joint prediction method when executed by a processor.
[0015] The beneficial effects brought about by the technical solution provided by the present invention are: The present invention analyzes the coupling mechanism between the robot's geometric error and flexibility error, deeply analyzes the error formation mechanism, and establishes a mathematical model of the robot's processing error. Based on the error decomposition strategy of empirical mode decomposition, the processing error is decomposed into a low-frequency system component that is space-dependent and a high-frequency working condition-related component that is time-dependent. The different error characteristic components are decomposed, laying the foundation for the targeted prediction of errors with different characteristics. A Gaussian process regression model is used for the systematic error component, and a time convolutional neural network is used for the working condition-related error component. The complex correlation of errors in the spatial and temporal domains is effectively processed, the dynamic characteristics of the processing process are captured, and the respective advantages of the two models are fully utilized to process errors with different characteristics, significantly improving the overall prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of a method for joint prediction of robot machining errors according to an embodiment of the present invention; Figure 2 is the robot geometric model and kinematic chain selected in the embodiment of the present invention; wherein, Figure 2 (a) is the robot geometric model and axis definition. Figure 2 (b) is the description of the robot kinematic chain. Figure 2 (c) is the description of the robot's kinematic parameters; Figure 3 is a scatter plot of the model training loss function and training set prediction performance in an embodiment of the present invention; wherein, Figure 3 (a) is the loss function of the first set of training sets for the temporal convolutional neural network training. Figure 3 (b) is the prediction of the system error of the first training set. Figure 3(c) is the error prediction of the first group of training set working conditions. Figure 3 (d) is the loss function of the second set of training sets for the temporal convolutional neural network training. Figure 3 (e) is the system error prediction of the second training set. Figure 3 Middle (f) is the prediction of the error related to the working condition of the second training set; Figure 4 It is a block diagram of an electronic device in an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0017] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0018] The flowchart of the robot processing error joint prediction method according to the embodiment of the present invention is as follows: Figure 1 , specifically including the following steps: S1. Analyze the coupling mechanism between robot geometric error and flexibility error, and establish a mathematical model of robot processing error.
[0019] First, for industrial robots, this invention takes a 6-link robot as an example, and the forward kinematics between adjacent links can be described as: , in, Represents the homogeneous transformation matrix of two adjacent links; Indicates along z Axis Translation The resulting matrix, Indicates winding z Axis rotation The resulting matrix, Indicates translation along the x-axis The resulting matrix, Indicates winding x Axis rotation The resulting matrix; 、 、 and Indicates connecting rod i The kinematic parameters of the connecting rod are i The length of the common perpendicular line, the offset of the connecting rod, the connecting rod angle and the joint angle.
[0020] The forward motion transfer relationship from the base to the end can be described as: , in, represents the pose of the end effector relative to the base, represents the position of the first link relative to the base, Represents the homogeneous transformation matrix of two adjacent links, that is, i -1 connecting rod relative to the i The position of the connecting rod.
[0021] Industrial robots are affected by the deviation of the body's kinematic parameters. Without any movement and external load, there is a large geometric end error. 、 、 and With the existence of , the micromotion of the homogeneous transformation matrix between adjacent links can be expressed as: , in, represents the homogeneous transformation matrix of two adjacent links, 、 、 and Respectively represent connecting rod i The length of the common perpendicular line, the connecting rod offset, the connecting rod rotation angle and the joint angle, 、 、 and They represent the errors of the common perpendicular length, connecting rod offset, connecting rod rotation angle and joint angle of connecting rod i respectively.
[0022] The actual results of each kinematic parameter can be obtained through kinematic parameter identification. Taking a 6-joint robot as an example, the actual results of each kinematic parameter are shown in Table 1. Some of these parameters cannot be directly identified in the least squares identification process because they are coupled with other parameters.
[0023] Table 1
[0024] In addition to geometric motion parameter errors, industrial robots have high link rigidity and low joint rigidity. Therefore, when subjected to external forces, the robot will exhibit a certain degree of flexibility error, which can be described as follows: , in, represents the flexibility error of the robot end, represents the Jacobian matrix, represents the joint angle sequence, represents the joint stiffness matrix, Represents the generalized force acting on the end, including three-dimensional forces and three-dimensional moments.
[0025] The coupling mechanism between robot geometric error and compliance error can be described as follows: Robotic processing is affected by both geometric error and compliance error. Furthermore, the robot's geometric error is related to its position in joint space. For compliance error, end-point flexibility is position-dependent, while external generalized forces are related to the time-varying process data of processing parameters. These two influencing factors are coupled to each other and affect the actual processing process. Therefore, for robot processing error prediction, the overall relationship can be qualitatively described as follows: , Among them, e represents the robot processing error, is the abstract expression of the mapping model, F is the generalized force on the end, is the joint angle sequence.
[0026] S2. Based on the error decomposition strategy of empirical mode decomposition, the machining error is decomposed into low-frequency system components and high-frequency working condition related components. The specific steps are as follows: S21. Determine the processing error All the maximum and minimum points of are fitted with a cubic function to obtain the maximum and minimum envelopes, and the average signal is calculated. The average signal is expressed as: , in, Indicates the i Processing error The average signal, Indicates the i The maximum envelope of the machining error, Indicates the i The minimum envelope of the machining error.
[0027] S22, processing error Subtract the mean signal , and the processing error after removing the low-frequency signal is obtained ; S23, removing the processing error of the low-frequency signal as the processing error of the next iteration Repeat steps S21 and S22 to decompose the first layer of the decomposition that meets the two conditions of IMF. The processing error after removing the low-frequency signal after iteration is taken as the first-order eigenmode component of the original processing error ,Right now .
[0028] S24, subtract the original processing error (processing error of the first iteration) from As the processing error of the next layer iteration, repeat steps S21-S23 and take the jth layer decomposition that meets the two conditions of IMF as the processing error of the next layer iteration. The processing error after removing the low-frequency signal after iteration is taken as the j-order intrinsic modal component of the original processing error ,Right now .
[0029] The original machining error is decomposed into: , in, represents the original processing error, n represents the number of decomposition levels, that is, the number of IMF components; represents the number of iterations of the j-th layer decomposition, Indicates the iteration in the j-th layer decomposition The processing error of the low-frequency signal is removed. Indicates the i The jth IMF component of the machining error signal.
[0030] After signal decomposition is completed, the correlation coefficient between each intrinsic modal component and the original signal is expressed as: , in, represents the correlation coefficient between the j-th order intrinsic modal component and the original processing error, represents the covariance calculation function, and Respectively and The variance of .
[0031] In order to distinguish between systematic errors and errors related to working conditions, the IMF components with a sum of correlation coefficients exceeding 0.9 are defined as systematic errors, and the rest are defined as error components related to working conditions.
[0032] S3. The Gaussian process regression model is used to predict the error based on the system components, and the time convolutional neural network is used to construct a prediction model based on the error of the working condition-related components; the two parts of the prediction results are superimposed to obtain a joint prediction of the processing error.
[0033] The robot's low-frequency system error is mainly related to the robot's joint angle and external generalized force. Analyzing this relationship from the state level, the data is defined as: , , in Represents the maximum value, mean, variance, root mean square, kurtosis and skewness corresponding to a cutting force sequence, accumulating six dimensions. is the robot joint angle.
[0034] The data description of the robot's high-frequency working condition related components is: , , in is the joint angle motion sequence corresponding to the number of machining error measurement results. is the generalized force sequence corresponding to the number of machining error measurement results.
[0035] System error prediction based on Gaussian process regression, according to the definition of Gaussian process, the observed value and test values Obey the joint Gaussian prior distribution, that is: , in, The training set input matrix representing the system component errors, The test set input matrix representing the system component errors, express The covariance matrix of yes The covariance matrix of yes and The covariance matrix of represents the variance of the Gaussian distribution, and I represents the identity matrix; The posterior distribution of is expressed as: , in, express The posterior distribution of Indicates the mean , the variance is Gaussian distribution; is the mean of the predicted values of the Gaussian process regression model; express variance; use The posterior distribution of the new test point is used to predict the confidence interval of the prediction result at different confidence levels. The only decision.
[0036] Working condition related error prediction based on time convolutional network: For the working condition related error prediction part, time convolutional neural network is used. In the sequence, the result of the dilated convolution operation on element s can be expressed as: , in, Representation sequence The result of the dilated convolution operation of element s in, represents the training set input sequence of the robot's high-frequency working condition related component error, Represents the convolution operator, d is the dilation factor used to increase the receptive field of the model, and k is the size of the filter. Refers to the i-th element operation function in the filter. For all input sequences The elements, It is also related to the direction of historical data. Generally speaking, the effective length of time series historical data is .
[0037] In order to prevent the gradient of the model from disappearing during the back propagation process, residual blocks and weight normalization are added to the backbone structure. The network output after residual can be expressed as: , in, Represents the network output after residual; Indicates that the input is , the result of the dilated convolution operation with parameter W; is the activation function; Matrix of training parameters for the model.
[0038] By superimposing the prediction results of system error and working condition related error, the overall prediction result of robot machining error can be obtained.
[0039] During the experiment of the method of the present invention, model training was carried out for two groups of plane slot milling tasks respectively. The robot geometric model and kinematic chain reference selected in the embodiment of the present invention were Figure 2 . Figure 2 (a) shows the robot geometric model and axis definition, which identifies the six joint rotation axes of the manipulator, as well as the robot base coordinate system and tool coordinate system; Figure 2 (b) is the description of the robot kinematic chain, where 1, 2, 3, 4, 5, and 6 are active joints; Figure 2 (c) is the description of the robot kinematic parameters. The figure shows the robot joint coordinate system and kinematic parameters, where a is the length of the connecting rod, d is the distance between adjacent joints, and the coordinate system Is the robot base coordinate system, coordinate system 、 、 、 、 、 They are the coordinate systems of the 6 active joints, 、 、 They are the coordinate systems of the three passive joints, is the tool coordinate system.
[0040] For the system error modeling part based on Gaussian process regression, the data is Z-score normalized before model training to reduce the impact of the magnitude difference of each dimension on the data distribution in the feature space. During the model training process, the radial basis kernel function (Gaussian kernel function) is used. Through test optimization, the length scale of the kernel function is preferably 0.5. For the model structure of the temporal convolutional neural network, after optimization, the number of three channels is 16, 16 and 32 respectively, except for the input and output layers. The size of the convolution kernel in the dilated convolution process is set to 5. The learning rate of the gradient descent of the loss function in the model training process is set to 6e-3. In order to prevent the risk of overfitting, the L2 regularization technology is used to improve the generalization performance of the model, and the regularization coefficient is set to 1e-6. The overall model is trained for 200 rounds. Through the above model configuration, the loss function of the model training process and the scatter plot of the model prediction performance on the training set are as shown below. Figure 3 As shown. Among them, Figure 3 (a) is the loss function of the first set of training sets for the temporal convolutional neural network training. Figure 3 (b) is the prediction of the system error of the first training set. Figure 3 (c) is the error prediction of the first group of training set working conditions. Figure 3 (d) is the loss function of the second set of training sets for the temporal convolutional neural network training. Figure 3 (e) is the system error prediction of the second training set. Figure 3 (f) in the middle shows the error prediction of the second group of training set working conditions.
[0041] from Figure 3 The results show that the designed model can achieve rapid convergence of the loss function in the training of temporal convolutional neural networks. In order to evaluate the prediction performance of the model on the training set, four evaluation indicators are quantified, namely, mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE) and coefficient of determination (R2). Figure 3 The results show that the constructed models have very small prediction bias on the training set. 2 From the above, we can see that all tasks are above 0.95, which further confirms the effectiveness of model training.
[0042] The above-trained models are used to carry out model prediction respectively, and the results of system error and working condition-related error prediction are superimposed to obtain the overall prediction result of the robot processing error.
[0043] From the above analysis, it can be concluded that in the actual implementation process, the method proposed in the present invention has a very high prediction accuracy for machining error prediction, with the maximum RMSE being only 2.241 μm.
[0044] In an exemplary embodiment, a computer-readable storage medium is included, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned robot machining error joint prediction method is implemented.
[0045] See also Figure 4 In an exemplary embodiment, an electronic device is also included, including at least one processor, at least one memory, and at least one communication bus.
[0046] Wherein, a computer program is stored in the memory, and the computer program includes computer-readable instructions. The processor calls the computer-readable instructions stored in the memory through the communication bus to execute the above-mentioned robot processing error joint prediction method.
[0047] In an exemplary embodiment, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above-mentioned robot machining error joint prediction method when executed by a processor.
[0048] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A joint prediction method for robot machining errors, characterized in that: The following steps are involved: S1. Analyze the coupling mechanism between robot geometric error and flexibility error, and establish a mathematical model of robot processing error; S2. Error decomposition strategy based on empirical mode decomposition, which decomposes the machining error into low-frequency system components and high-frequency working condition-related components; S3. The Gaussian process regression model is used to predict the error based on the system component, and the time convolutional neural network is used to construct a prediction model based on the error of the working condition-related component; the two parts of the prediction results are superimposed to obtain a joint prediction of the processing error.
2. A robot machining error joint prediction method according to claim 1, characterized in that: The mathematical model of the robot's geometric error is: , in, represents the homogeneous transformation matrix of two adjacent links, 、 、 and Respectively represent connecting rod i The length of the common perpendicular line, the connecting rod offset, the connecting rod rotation angle and the joint angle, 、 、 and Respectively represent connecting rod i The errors of the common perpendicular length, connecting rod offset, connecting rod rotation angle and joint angle.
3. A robot processing error joint prediction method according to claim 2, characterized in that: The mathematical model of the robot's flexibility error is: , in, represents the flexibility error of the robot end, represents the Jacobian matrix, represents the joint angle sequence, represents the joint stiffness matrix, Represents the generalized force acting on the end.
4. A robot processing error joint prediction method according to claim 3, characterized in that: The coupling mechanism between robot geometric error and flexibility error is as follows: the robot geometric error is related to the position of the joint space, which is determined by Characterizing the position of the joint space, in the robot's flexibility error, the end flexibility is related to the position of the joint space, and the generalized force on the end is related to the time-varying process data of the machining parameters; The mathematical model of robot machining error is expressed as: , Among them, e represents the robot processing error, It is an abstract expression of the mapping model.
5. The robot machining error joint prediction method according to claim 1, characterized in that: The error decomposition strategy based on empirical mode decomposition decomposes the machining error into low-frequency system components and high-frequency working condition-related components, which can be expressed as: , Where n represents the number of IMF components, Indicates the i The jth IMF component of the processing error signal; The correlation coefficient between the IMF component and the original processing error is expressed as: , in, represents the correlation coefficient between the j-th order modal component and the original processing error, represents the covariance calculation function, and Respectively and variance; The IMF components whose correlation coefficients exceed the set threshold are defined as systematic errors, and the rest are working condition related components.
6. A robot processing error joint prediction method according to claim 1, characterized in that: The Gaussian process regression model is used to predict the error based on the system components, specifically: Observed values of the errors of the systematic components and test values Obey the joint Gaussian prior distribution, expressed as: , in, The training set input matrix representing the system component errors, The test set input matrix representing the system component errors, express The covariance matrix of yes The covariance matrix of yes and The covariance matrix of represents the variance of the Gaussian distribution, and I represents the identity matrix; The posterior distribution of is expressed as: , in, express The posterior distribution of Indicates the mean , the variance is Gaussian distribution; is the mean of the predicted values of the Gaussian process regression model; express variance; use The posterior distribution of is used to predict new test points.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the method according to any one of claims 1 to 6.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.