A method for predicting position error and its confidence interval of an industrial robot based on Gaussian process regression
By establishing a robot position error prediction model based on Gaussian process regression, the problem of failing to effectively consider random noise in existing technologies is solved, and a fast and efficient position error prediction and confidence interval estimation is achieved, accurately reflecting the uncertainty of the error.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI UNIV
- Filing Date
- 2022-11-07
- Publication Date
- 2026-05-29
Smart Images

Figure CN115635509B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of robotics technology, and specifically relates to a method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression. Background Technology
[0002] With the continuous development of robotics technology, industrial robots have been widely used in industries such as automotive manufacturing, aerospace, and medicine. Position accuracy, as one of the important indicators for evaluating the performance of industrial robots, is subject to high industrial requirements and process standards across various industries. However, factors such as machining and assembly errors, insufficient load, and insufficient stiffness can significantly impact the position accuracy of industrial robots, ultimately making it difficult to meet industrial requirements. This necessitates predicting the end-effector position error of industrial robots to achieve further accuracy compensation. However, the presence of random errors in industrial robot position errors presents considerable challenges to error prediction.
[0003] However, most current methods for error prediction include parameter identification algorithms, extended Kalman filters (EKF), artificial neural networks (ANN), neural networks, and spatial interpolation. While these models can predict industrial robot position errors relatively well, they all treat the robot position error as a fixed value. However, robot error sources include random errors generated by random noise, so robot position errors are random in nature, not fixed values, but rather distributed within a range with specific probabilities. Therefore, the aforementioned algorithms cannot meet the requirements.
[0004] Compared to existing error compensation algorithms, Gaussian process regression (GPR) can account for random errors caused by noise. Model training based on GPR mainly relies on input-output data and the covariance function, effectively solving complex nonlinear problems. Furthermore, the model is simple, requires few training parameters, and offers a wide variety of kernel functions, allowing for the selection of different function models depending on the research problem, thus demonstrating strong applicability. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, this invention provides a method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression. This method takes into account the randomness of robot position error and establishes a position error prediction model based on Gaussian process regression. It can accurately predict the position error and confidence interval of the target position and use the confidence interval to reflect the uncertainty of the position error, that is, the randomness of the error caused by random noise, rather than treating the position error as a deterministic value.
[0006] To achieve the above objectives, the following technical solutions are adopted:
[0007] A method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression includes the following steps:
[0008] 1) Input the joint angle vectors and the position error sample set D = {θ, e(θ)}. Select several sets of random joint angle vectors θ = [θ1, θ2, ..., θ] in the robot joint space. n ] T The theoretical position of the corresponding sampling position is obtained using the robot's forward kinematics. The robot controller system controls the robot TCP to reach the sampling position. The measuring device measures the actual sampling position of the TCP. The position error of the TCP is the difference between the actual position and the theoretical position, which can be obtained by n sets of joint angle vectors and the corresponding position error e(θ)=[e(θ1),e(θ2),...,e(θ)]. n )] T Where, e(θ) i )=[e x (θ i ),e y (θ i ),e z (θ i )] T (i = 1, 2, ..., n), the TCP position error is a vector composed of position errors along the x, y, and z directions. Since the prediction methods for position errors and confidence intervals along the x, y, and z directions are the same, subsequent steps will take the prediction of position errors and their confidence intervals along the x-axis as an example. Subsequent steps will use a new dataset D = {θ, e}. x (θ)}, where θ represents the input joint angle vector matrix, e x (θ) represents the output vector along the x-axis in the Gaussian model;
[0009] 2) A position error model along the x-axis based on Gaussian process regression (GPR) is obtained through training. The calculation process is as follows:
[0010] 2.1) The position error along the x-axis includes a definite position error and random noise ε. Therefore, the formula for calculating the position error along the x-axis is as shown in equation (1):
[0011] e x (θ i )=f x (θ i )+ε i (1)
[0012] Where, i∈[1,n], i∈Z, θ i Let x be any input joint angle vector, and ε represent the x-axis of the coordinate system. i The noise is Gaussian and independent, and follows a pattern with a mean of 0 and a variance of σ.2 The Gaussian distribution, i.e., ε i ~N(0,σ 2 f x (θ i ) represents the direction along the x-axis and θ i The relevant positional error is given by a mean function μ(θ). i ) and a covariance function k(θ) i ,θ j Determine the function f. x (θ i The process is a Gaussian process, and the definition expressions of the mean function and covariance function are as shown in equation (2):
[0013]
[0014] Where, θ i ,θ j Let f be any two joint angle vectors, i,j∈[1,n], i,j∈Z, f x (θ i As a Gaussian process, its expression is as shown in equation (3):
[0015] f x (θ i )~GP(μ(θ i ),k(θ i ,θ j (3)
[0016] 2.2) In practical applications, to define a single Gaussian process, it is necessary to specify the mean function and covariance function terms. Here, the Gaussian kernel function is used as the covariance kernel function. In this study, the expressions for the mean function and covariance function used are as shown in equations (4) and (5):
[0017] μ(θ i )=aθ i +b (4)
[0018]
[0019] Where a and b represent the hyperparameters of the Gaussian model, σ f The standard deviation of the Gaussian kernel function is represented by l, and the characteristic length scale of the kernel function is represented by l.
[0020] 2.3) According to equations (1) and (3), e x (θ i It follows an independent Gaussian process, expressed as in equation (6):
[0021] e x (θ i )~GP(μ(θi ),k(θ i ,θ j )+σ 2 δ mn (6)
[0022] Where, δ mn Let Kronecker function be defined, and the function condition be given in equation (7):
[0023]
[0024] From the properties of the joint Gaussian distribution and equation (6), we can obtain that for the sample set {θ,e} x For (θ)}, e x (θ) also follows a Gaussian distribution, as shown in equation (8):
[0025] e x (θ)~N(μ(θ),K(θ,θ)+σ 2 I) (8)
[0026] Where I is the identity matrix, σ 2 Let μ(θ) be the variance term caused by noise, and K(θ,θ) be the mean function term. The expression for the mean function μ(θ) is shown in equation (9):
[0027] μ(θ)=[μ(θ1),μ(θ2),...,μ(θ n (9)
[0028] The covariance matrix K(θ,θ) of the input joint angle vector sample set is calculated using the formula shown in equation (10):
[0029]
[0030] 2.4) Let the hyperparameter set Initialize the hyperparameters. Calculate the log-marginal likelihood function, as shown in equation (11):
[0031]
[0032] Wherein, log P(e x (θ) is a relation to P(e x Taking the logarithm of ξ, we maximize the log-marginal likelihood function by performing gradient descent on ξ, and iteratively update the hyperparameter ξ value. The next step is determined based on whether the updated hyperparameter value satisfies the iteration condition. If the iteration condition is not met, we return to recalculate the covariance matrix K(θ,θ). If the iteration condition is met, we proceed to the next step.
[0033] 3) Input the target joint angle vector θ * As explained in step 2.1, ex (θ * The x-axis represents the target position error, which can be calculated using the formula (12):
[0034] e x (θ * )=f x (θ * )+ε (12)
[0035] Among them, f x (θ * It follows a Gaussian distribution, as shown in equation (13):
[0036] f x (θ * )~N(μ(θ * ),K(θ * ,θ * (13)
[0037] Among them, f x (θ * ) represents a function of position error related to joint angles, and the mean function is given by μ(θ). * )=aθ * +b is calculated, where the values of a and b have already been calculated in step 2.4. K(θ) * ,θ * The Gaussian kernel function is still used for calculation;
[0038] 4) Determine the GPR prior model along the x-axis. Based on the properties of the Gaussian distribution, [e...] x (θ),f x (θ * The joint distribution of ] is still a Gaussian distribution, and the prior expression of the corresponding joint Gaussian distribution is as shown in equation (14):
[0039]
[0040] Where K(θ,θ) * The training input joint angle vector θ and the target input joint angle vector θ * The covariance matrix, K(θ) * K(θ,θ) is a function of K(θ,θ) * The transpose of ) matrix;
[0041] Calculate the covariance matrix K(θ) of the target input. * ,θ), the calculation formula is as shown in equation (15):
[0042] K(θ * ,θ)=[k(θ * ,θ1),k(θ * ,θ2),…,k(θ* ,θ n (15)
[0043] Where, k(θ) * ,θ i All of them are calculated from the hyperparameters derived in equation (5);
[0044] Calculate the covariance matrix K(θ,θ) of the target input. * The calculation formula is as shown in equation (16):
[0045] K(θ,θ * )=[k(θ1,θ * ),k(θ2,θ * ),…,k(θ n ,θ * (16)
[0046] Where, k(θ) i ,θ * All of them are calculated from the hyperparameters derived in equation (5);
[0047] Calculate the covariance matrix K(θ) of the target input. * ,θ * The calculation formula is as shown in equation (17):
[0048] K(θ * ,θ * )=k(θ * ,θ * (17)
[0049] Where, k(θ) * ,θ * The hyperparameters are calculated from equation (5), which has already been derived.
[0050] 5) Determine the GPR posterior model along the x-axis. Given the joint probability distribution of equation (14), f is directly calculated based on the properties of the Gaussian joint distribution. x (θ * Conditional posterior distribution P(f) x (θ * )|e x (θ)), the calculation formula is as shown in equation (18):
[0051]
[0052] In the formula:
[0053]
[0054] 6) Predict the target position error and estimate the probability density function of the target position error. From equation (12), it can be determined that the target position error e along the x-axis is... x (θ * ) is a function f related to the joint angle. x (θ * Composed of both ) and random noise, e can be derived. x (θ * The conditional probability distribution P(e) x (θ * )|e x (θ)), the calculation formula is as shown in equation (19):
[0055]
[0056] Among them, the variance σ caused by noise 2 The result has already been calculated in step 2.4 and can be obtained.
[0057] Robot joint angle vector θ at a given target position * The predicted average position error of the target position along the x-axis can be estimated based on the constructed GPR-based position error model. and variance Based on the properties of the Gaussian distribution, it can be inferred that It is the 95% confidence interval along the x-axis. This is the 99.7% confidence interval along the x-axis. Similarly, based on steps 1 to 6, the predicted mean of the target position's positional error along the y-axis and z-axis can be estimated. and variance It can be inferred that These are the 95% confidence intervals along the y-axis and z-axis, respectively. These are the 99.7% confidence intervals along the y-axis and z-axis, respectively. The calculation is performed using the formula shown in equation (20):
[0058]
[0059] Finally, the absolute position error of the target position can be calculated.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] It can quickly, efficiently and accurately predict robot position errors, while using Gaussian process regression algorithm to reduce the complexity of the entire system; it can predict the probability density function of target position error, that is, it can predict the distribution of actual target position error. Attached Figure Description
[0062] Figure 1 This is a flowchart of the logic of the Gaussian process regression algorithm for predicting robot position error. Detailed Implementation
[0063] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0064] like Figure 1 As shown, a method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression includes the following steps:
[0065] 1) Input the joint angle vectors and the position error sample set D = {θ, e(θ)}. Select several sets of random joint angle vectors θ = [θ1, θ2, ..., θ] in the robot joint space. n ] T The theoretical position of the corresponding sampling position is obtained using the robot's forward kinematics. The robot controller system controls the robot TCP to reach the sampling position. The measuring device measures the actual sampling position of the TCP. The position error of the TCP is the difference between the actual position and the theoretical position, which can be obtained by n sets of joint angle vectors and the corresponding position error e(θ)=[e(θ1),e(θ2),...,e(θ)]. n )] T Where, e(θ) i )=[e x (θ i ),e y (θ i ),e z (θ i )] T (i = 1, 2, ..., n), the TCP position error is a vector composed of position errors along the x, y, and z directions. Since the prediction methods for position errors and confidence intervals along the x, y, and z directions are the same, subsequent steps will take the prediction of position errors and their confidence intervals along the x-axis as an example. Subsequent steps will use a new dataset D = {θ, e}. x (θ)}, where θ represents the input joint angle vector matrix, e x (θ) represents the output vector along the x-axis in the Gaussian model;
[0066] 2) A position error model along the x-axis based on Gaussian process regression (GPR) is obtained through training. The calculation process is as follows:
[0067] 2.1) The position error along the x-axis includes a definite position error and random noise ε. Therefore, the formula for calculating the position error along the x-axis is as shown in equation (1):
[0068] e x (θ i )=f x (θi )+ε i (1)
[0069] Where, i∈[1,n], i∈Z, θ i Let x be any input joint angle vector, and ε represent the x-axis of the coordinate system. i The noise is Gaussian and independent, and follows a pattern with a mean of 0 and a variance of σ. 2 The Gaussian distribution, i.e., ε i ~N(0,σ 2 f x (θ i ) represents the direction along the x-axis and θ i The relevant positional error is given by a mean function μ(θ). i ) and a covariance function k(θ) i ,θ j Determine the function f. x (θ i The process is a Gaussian process, and the definition expressions of the mean function and covariance function are as shown in equation (2):
[0070]
[0071] Where, θ i ,θ j Let f be any two joint angle vectors, i,j∈[1,n], i,j∈Z, f x (θ i As a Gaussian process, its expression is as shown in equation (3):
[0072] f x (θ i )~GP(μ(θ i ),k(θ i ,θ j (3)
[0073] 2.2) In practical applications, to define a single Gaussian process, it is necessary to specify the mean function and covariance function terms. Here, the Gaussian kernel function is used as the covariance kernel function. In this study, the expressions for the mean function and covariance function used are as shown in equations (4) and (5):
[0074] μ(θ i )=aθ i +b (4)
[0075]
[0076] Where a and b represent the hyperparameters of the Gaussian model, σ f The standard deviation of the Gaussian kernel function is represented by l, and the characteristic length scale of the kernel function is represented by l.
[0077] 2.3) According to equations (1) and (3), e x (θ i It follows an independent Gaussian process, expressed as in equation (6):
[0078] e x (θ i )~GP(μ(θ i ),k(θ i ,θ j )+σ 2 δ mn (6)
[0079] Where, δ mn Let Kronecker function be defined, and the function condition be given in equation (7):
[0080]
[0081] From the properties of the joint Gaussian distribution and equation (6), we can obtain that for the sample set {θ,e} x For (θ)}, e x (θ) also follows a Gaussian distribution, as shown in equation (8):
[0082] e x (θ)~N(μ(θ),K(θ,θ)+σ 2 I) (8)
[0083] Where I is the identity matrix, σ 2 Let μ(θ) be the variance term caused by noise, and K(θ,θ) be the mean function term. The expression for the mean function μ(θ) is shown in equation (9):
[0084] μ(θ)=[μ(θ1),μ(θ2),...,μ(θ n (9)
[0085] The covariance matrix K(θ,θ) of the input joint angle vector sample set is calculated using the formula shown in equation (10):
[0086]
[0087] 2.4) Let the hyperparameter set Initialize the hyperparameters. Calculate the log-marginal likelihood function, as shown in equation (11):
[0088]
[0089] Wherein, log P(e x (θ) is a relation to P(e xTaking the logarithm of ξ, we maximize the log-marginal likelihood function by performing gradient descent on ξ, and iteratively update the hyperparameter ξ value. The next step is determined based on whether the updated hyperparameter value satisfies the iteration condition. If the iteration condition is not met, we return to recalculate the covariance matrix K(θ,θ). If the iteration condition is met, we proceed to the next step.
[0090] 3) Input the target joint angle vector θ * As explained in step 2.1, e x (θ * The x-axis represents the target position error, which can be calculated using the formula (12):
[0091] e x (θ * )=f x (θ * )+ε (12)
[0092] Among them, f x (θ * It follows a Gaussian distribution, as shown in equation (13):
[0093] f x (θ * )~N(μ(θ * ),K(θ * ,θ * (13)
[0094] Among them, f x (θ * ) represents a function of position error related to joint angles, and the mean function is given by μ(θ). * )=aθ * +b is calculated, where the values of a and b have already been calculated in step 2.4. K(θ) * ,θ * The Gaussian kernel function is still used for calculation;
[0095] 4) Determine the GPR prior model along the x-axis. Based on the properties of the Gaussian distribution, [e...] x (θ),f x (θ * The joint distribution of ] is still a Gaussian distribution, and the prior expression of the corresponding joint Gaussian distribution is as shown in equation (14):
[0096]
[0097] Where K(θ,θ) * The training input joint angle vector θ and the target input joint angle vector θ * The covariance matrix, K(θ) * K(θ,θ) is a function of K(θ,θ) *The transpose of ) matrix;
[0098] Calculate the covariance matrix K(θ) of the target input. * ,θ), the calculation formula is as shown in equation (15):
[0099] K(θ * ,θ)=[k(θ * ,θ1),k(θ * ,θ2),…,k(θ * ,θ n (15)
[0100] Where, k(θ) * ,θ i All of them are calculated from the hyperparameters derived in equation (5);
[0101] Calculate the covariance matrix K(θ,θ) of the target input. * The calculation formula is as shown in equation (16):
[0102] K(θ,θ * )=[k(θ1,θ * ),k(θ2,θ * ),…,k(θ n ,θ * (16)
[0103] Where, k(θ) i ,θ * All of them are calculated from the hyperparameters derived in equation (5);
[0104] Calculate the covariance matrix K(θ) of the target input. * ,θ * The calculation formula is as shown in equation (17):
[0105] K(θ * ,θ * )=k(θ * ,θ * (17)
[0106] Where, k(θ) * ,θ * The hyperparameters are calculated from equation (5), which has already been derived.
[0107] 5) Determine the GPR posterior model along the x-axis. Given the joint probability distribution of equation (14), f is directly calculated based on the properties of the Gaussian joint distribution. x (θ * Conditional posterior distribution P(f) x (θ * )|e x (θ)), the calculation formula is as shown in equation (18):
[0108]
[0109] In the formula:
[0110]
[0111] 6) Predict the target position error and estimate the probability density function of the target position error. From equation (12), it can be determined that the target position error e along the x-axis is... x (θ * ) is a function f related to the joint angle. x (θ * Composed of both ) and random noise, e can be derived. x (θ * The conditional probability distribution P(e) x (θ * )|e x (θ)), the calculation formula is as shown in equation (19):
[0112]
[0113] Among them, the variance σ caused by noise 2 The result has already been calculated in step 2.4 and can be obtained.
[0114] Robot joint angle vector θ at a given target position * The predicted average position error of the target position along the x-axis can be estimated based on the constructed GPR-based position error model. and variance Based on the properties of the Gaussian distribution, it can be inferred that It is the 95% confidence interval along the x-axis. This is the 99.7% confidence interval along the x-axis. Similarly, based on steps 1 to 6, the predicted mean of the target position's positional error along the y-axis and z-axis can be estimated. and variance It can be inferred that These are the 95% confidence intervals along the y-axis and z-axis, respectively. These are the 99.7% confidence intervals along the y-axis and z-axis, respectively. The calculation is performed using the formula shown in equation (20):
[0115]
[0116] Finally, the absolute position error of the target position can be calculated.
[0117] The above embodiments of the present invention provide a method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression, comprising the following steps: (1) obtaining relevant joint angle vectors and sample information of position errors along the x, y, and z axes; (2) obtaining position error models based on Gaussian process regression (GPR) along the x, y, and z axes respectively through parameter training; (3) determining the GPR prior models along the x, y, and z axes respectively; (4) determining the GPR posterior models along the x, y, and z axes respectively; (5) predicting the absolute position error of the target position based on the target joint angle vector and deriving the confidence intervals along the x, y, and z axes, which also provides the necessary data for the next step of position error compensation. The linear regression model established by the Gaussian process in this invention has lower complexity and can more accurately and efficiently predict the position error of the target position. The prediction and derivation of the relevant confidence intervals can accurately reflect the uncertainty of the position error.
[0118] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above embodiments. Various changes can be made according to the purpose of the invention. Any changes, modifications, substitutions, combinations or simplifications made based on the spirit and principle of the technical solution of the present invention shall be equivalent substitutions. As long as they meet the purpose of the invention and do not deviate from the technical principle and inventive concept of the present invention, they shall fall within the protection scope of the present invention.
Claims
1. A method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression, characterized in that, Includes the following steps: 1) Input the joint angle vector and position error sample set D = {θ, e(θ)}; 2) Train to obtain position error models along the x, y, and z axes respectively based on Gaussian process regression (GPR); 3) Input the target joint angle vector θ * ; 4) Determine the GPR prior models along the x, y, and z axes respectively; 5) Determine the GPR posterior model along the x, y, and z axes respectively; 6) Predict the absolute position error of the target and the confidence intervals along the x, y, and z axes, respectively.
2. The method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression according to claim 1, characterized in that, Step 1) specifically refers to: Select several sets of random joint angle vectors θ = [θ1, θ2, ..., θ] in the robot's joint space. n ] T The theoretical position of the corresponding sampling position is obtained using the robot's forward kinematics. The robot controller system controls the robot TCP to reach the sampling position. The measuring device measures the actual sampling position of the TCP. The position error of the TCP is the difference between the actual position and the theoretical position. This yields n sets of joint angle vectors and the corresponding position error e(θ) = [e(θ1), e(θ2), ..., e(θ...]. n )] T , where e(θ) i )=[e x (θ i ),e y (θ i ),e z (θ i )] T (i = 1, 2, ..., n), the TCP position error is a vector composed of position errors along the x, y, and z directions. Since the prediction methods for position errors and confidence intervals along the three directions are the same, subsequent steps will take the prediction of position errors and their confidence intervals along the x-axis as an example. Subsequent steps will use a new dataset D = {θ, e}. x (θ)}, where θ represents the input joint angle vector matrix, e x (θ) represents the output vector along the x-axis in the Gaussian model.
3. The method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression according to claim 1, characterized in that, Step 2) specifically refers to: 2.1) The position error along the x-axis includes a definite position error and random noise ε. Therefore, the formula for calculating the position error along the x-axis is as shown in equation (1): e x (i i )=f x (i i )+e i (1) Where, i∈[1,n], i∈Z, θ i Let x be any input joint angle vector, and ε represent the x-axis of the coordinate system. i The noise is Gaussian and independent, and follows a pattern with a mean of 0 and a variance of σ. 2 The Gaussian distribution, i.e., ε i ~N(0,σ 2 );f x (θ i ) represents the direction along the x-axis and θ i The relevant positional error is given by a mean function μ(θ). i ) and a covariance function k(θ) i ,θ j Determine the function f. x (θ i The process is a Gaussian process, and the definition expressions of the mean function and covariance function are as shown in equation (2): Where, θ i ,θ j Let f be any two joint angle vectors, i,j∈[1,n], i,j∈Z, f x (θ i As a Gaussian process, its expression is as shown in equation (3): f x (i i )~GP(μ(θ i ),k(θ i ,i j )) (3) 2.2) In practical applications, in order to define a single Gaussian process, it is necessary to specify the mean function and covariance function terms; here, the Gaussian kernel function is used as the covariance kernel function, and the expressions of the mean function and covariance function used are as shown in equations (4) and (5): μ(θ i )=aθ i +b (4) Where a and b represent the hyperparameters of the Gaussian model, σ f The standard deviation of the Gaussian kernel function is represented by l, and the characteristic length scale of the kernel function is represented by l. 2.3) According to equations (1) and (3), e x (θ i It follows an independent Gaussian process, expressed as in equation (6): e x (i i )~GP(μ(θ i ),k(θ i ,i j )+s 2 d mn ) (6) Where, δ mn Let Kronecker function be defined, and the function condition be given in equation (7): From the properties of the joint Gaussian distribution and equation (6), we can obtain that for the sample set {θ,e} x For (θ)}, e x (θ) also follows a Gaussian distribution, as shown in equation (8): e x (θ)~N(μ(θ),K(θ,θ)+σ 2 I) (8) Where I is the identity matrix, σ 2 Let μ(θ) be the variance term caused by noise, and K(θ,θ) be the mean function term. The expression for the mean function μ(θ) is shown in equation (9): μ(θ)=[μ(θ1),μ(θ2),...,μ(θ n )] (9) The covariance matrix K(θ,θ) of the input joint angle vector sample set is calculated using the formula shown in equation (10): 2.4) Let the hyperparameter set Initialize the hyperparameters; and calculate the log-marginal likelihood function, as shown in equation (11): Wherein, logP(e x (θ) is a relation to P(e x Take the logarithm of (θ) and maximize the log-marginal likelihood function by performing gradient descent on ξ. Use this to iteratively update the hyperparameter ξ value. Determine the next step based on whether the updated hyperparameter value meets the iteration condition. If the iteration condition is not met, return to recalculate the covariance matrix K(θ,θ). If the iteration condition is met, proceed to the next step.
4. The method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression according to claim 1, characterized in that, Step 3) specifically refers to: From step 2.1, we know that e x (θ * ) represents the target position error along the x-axis, calculated as shown in equation (12): e x (i * )=f x (i * )+e (12) Among them, f x (θ * It follows a Gaussian distribution, as shown in equation (13): f x (i * )~N(μ(θ * ),K(θ * ,i * )) (13) Among them, f x (θ * ) represents a function of position error related to joint angles, and the mean function is given by μ(θ). * )=aθ * +b is calculated, where the values of a and b have already been calculated in step 2.4; K(θ) * ,θ * The Gaussian kernel function is still used for calculation.
5. The method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression according to claim 1, characterized in that, Step 4) specifically involves: According to the properties of the Gaussian distribution, [e] x (θ),f x (θ * The joint distribution of ] is still a Gaussian distribution, and the prior expression of the corresponding joint Gaussian distribution is as shown in equation (14): Where K(θ,θ) * The training input joint angle vector θ and the target input joint angle vector θ * The covariance matrix, K(θ) * K(θ,θ) is a function of K(θ,θ) * The transpose of ) matrix; Calculate the covariance matrix K(θ) of the target input. * ,θ), the calculation formula is as shown in equation (15): K(θ * ,θ)=[k(θ * ,θ1),k(θ * ,θ2),…,k(θ * ,i n )] (15) Where, k(θ) * ,θ i All of them are calculated from the hyperparameters derived in equation (5); Calculate the covariance matrix K(θ,θ) of the target input. * The calculation formula is as shown in equation (16): K(θ,θ * )=[k(θ1,θ * ),k(θ2,θ * ),…,k(θ n ,i * )] (16) Where, k(θ) i ,θ * All of them are calculated from the hyperparameters derived in equation (5); Calculate the covariance matrix K(θ) of the target input. * ,θ * The calculation formula is as shown in equation (17): K(θ * ,i * )=k(θ * ,i * ) (17) Where, k(θ) * ,θ * The result is obtained from equation (5) which has already derived the hyperparameters.
6. The method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression according to claim 1, characterized in that, Step 5) specifically involves: Given the joint probability distribution of equation (14), f can be directly calculated based on the properties of the Gaussian joint distribution. x (θ * Conditional posterior distribution P(f) x (θ * )|e x (θ)), the calculation formula is as shown in equation (18): In the formula:
7. The method for predicting the position error and confidence interval of an industrial robot based on Gaussian process regression according to claim 1, characterized in that, Step 6) specifically involves: From equation (12), it can be determined that the target position error e along the x-axis is... x (θ * ) is a function f related to the joint angle. x (θ * Composed of both ) and random noise, e can be derived. x (θ * The conditional probability distribution P(e) x (θ * )e x (θ)), the calculation formula is as shown in equation (19): Among them, the variance σ caused by noise 2 The result has been calculated in step 2.
4. Robot joint angle vector θ at a given target position * The predicted average position error of the target position along the x-axis is estimated based on the constructed GPR-based position error model. and variance Based on the properties of the Gaussian distribution, it can be inferred that It is the 95% confidence interval along the x-axis. It is the 99.7% confidence interval along the x-axis; similarly, the predicted mean of the target position error along the y-axis and z-axis is estimated according to steps 1 to 6. and variance Infer These are the 95% confidence intervals along the y-axis and z-axis, respectively. These are the 99.7% confidence intervals along the y-axis and z-axis, respectively; calculated using the formula shown in equation (20): Finally, the absolute position error of the target position can be calculated.