A method for predicting position error of an industrial robot and its interval and an electronic device

By combining kernel principal component analysis and Bayesian neural networks, the accuracy and applicability of position error prediction for industrial robots are improved, solving the problem of difficulty in predicting position errors and their ranges in existing technologies, and achieving high-precision error prediction and confidence interval provision.

CN119369396BActive Publication Date: 2026-05-19SHANGHAI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI UNIV
Filing Date
2024-10-31
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively predict the positional error and its range for industrial robots, especially when faced with non-geometric parameter errors such as temperature changes and external disturbances, making it impossible to achieve high-precision absolute positioning.

Method used

Kernel principal component analysis is used to enhance the dimensionality of joint angles, and Bayesian neural network is used for error regression. A dataset is constructed and a Bayesian neural network is trained to predict position errors and their confidence intervals.

Benefits of technology

It improves the accuracy and applicability of position error prediction for industrial robots, providing efficient error prediction and confidence intervals in various practical application scenarios, simplifying complexity, and is suitable for situations with limited data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119369396B_ABST
    Figure CN119369396B_ABST
Patent Text Reader

Abstract

The application relates to a kind of industrial robot position error and its interval prediction method and electronic equipment, the method comprises the following steps: constructing data set containing joint angle vector and position error;Using kernel principal component analysis, joint angle vector is projected to high-dimensional space, feature dimension is upgraded;After feature dimension is upgraded, feature and corresponding position error are respectively used as the input and label of bayesian neural network, and bayesian neural network is trained;Test set data is input to trained bayesian neural network after being upgraded according to the same method, and the prediction of position error and its confidence interval is output.Compared with prior art, the application has the advantages of realizing the prediction of robot position error and interval, more accurate prediction value and good applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot positioning technology, and in particular to a method for predicting the position error and its range of an industrial robot. Background Technology

[0002] High-precision positioning is one of the key functions of industrial robot platforms in precision manufacturing. Industrial robots typically have low absolute positioning accuracy, which cannot meet the demands of high-precision operation. Therefore, improving the absolute positioning accuracy of industrial robots is a crucial way to achieve high-precision operation.

[0003] The low accuracy of industrial robots is caused by the inconsistency between the actual kinematic model and the theoretical kinematic model. Influencing factors include: machining and assembly errors of robot parts, gear backlash, load, ambient temperature changes, and external disturbances. To address this issue, domestic scholars have proposed a method for identifying kinematic parameter errors in industrial robots. This method uses optimized algorithms to identify geometric parameter errors, thereby improving the accuracy of robot kinematic modeling and ultimately compensating for absolute positioning accuracy. However, this method cannot compensate for errors caused by non-geometric parameter errors such as temperature changes and external disturbances. Later, scholars proposed using neural networks to compensate for non-geometric parameter errors. They also proposed using spatial interpolation to compensate for the absolute positioning accuracy of industrial robots. These methods primarily predict the absolute positioning error of industrial robots, while research on interval prediction of absolute positioning errors is relatively limited.

[0004] How to develop a method for predicting the positional error and its range of industrial robots has become a technical problem that needs to be solved. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method for predicting the position error and its range of industrial robots.

[0006] The objective of this invention can be achieved through the following technical solutions:

[0007] According to one aspect of the present invention, a method for predicting the position error and its range of an industrial robot is provided, characterized in that the method includes the following steps:

[0008] Step S1: Construct a dataset containing joint angle vectors and position errors;

[0009] Step S2: Use kernel principal component analysis to project the joint angle vectors from step S1 into a high-dimensional space to perform feature dimensionality upscaling.

[0010] Step S3: Use the features after feature dimensionality increase and the corresponding positional errors as the input and label of the Bayesian neural network, respectively, to train the Bayesian neural network.

[0011] Step S4: After performing feature dimensionality upscaling on the test set data according to the method in step S2, input the data into the trained Bayesian neural network and output the predicted position error and its confidence interval.

[0012] Preferably, in step S1, the process of constructing a dataset containing joint angle vectors and position errors includes: randomly selecting 2n sets of joint angle vectors θ = [θ1, θ2, ..., θ] within the working area of ​​the industrial robot. 2n ] T , where θ i It is a p-dimensional vector, where p represents the number of joint angles of the industrial robot;

[0013] Calculate the theoretical position coordinates of the corresponding sampling points, move the robot end effector to the sampling point position, and use a measuring device to measure the n sets of end effector positions to obtain the actual position coordinates. The difference between the actual position and the theoretical position is the required end effector position error e(θ). i Therefore, we obtain the joint angle vector and the corresponding position error err(θ), thus constructing the dataset D, i.e.

[0014] err(θ)=[e(θ1),e(θ2),...,e(θ 2n )] T ,

[0015] Where 2n is the number of joint angle vectors.

[0016] More preferably, the position error comprises a vector consisting of errors in the three coordinate axes x, y and z, and the deviation prediction method is the same for each dataset in these three directions.

[0017] Preferably, step S4 includes performing feature upscaling on the joint angle vectors of the x-axis, y-axis, and z-axis respectively, inputting them into a trained Bayesian neural network, and predicting the confidence intervals of the position errors along the x-axis, y-axis, and z-axis respectively.

[0018] Preferably, in step S2, the feature vectors corresponding to the first k largest eigenvalues ​​are taken, i.e., the projected features are:

[0019] x n×k =K center V n×k

[0020] Where k is the number of principal components, V n×k For matrix V n×nV is the matrix of eigenvectors corresponding to the k largest eigenvalues. n×n This is the matrix obtained by arranging the eigenvectors of the normalized kernel matrix in descending order of their eigenvalues.

[0021] Preferably, the Bayesian neural network includes two hidden layers with multiple units.

[0022] Preferably, the Bayesian neural network incorporates probability distribution and variational inference methods.

[0023] The loss function of the Bayesian neural network is:

[0024]

[0025] Among them, w (i) q(w) represents the i-th sample collected from the variational distribution; (i) |θ) is a variational distribution, and for the posterior probability distribution p(D|w) (i) The approximation of ); p(w (i) ) for w (i) The prior probability density.

[0026] Preferably, the training process of the Bayesian neural network includes: backpropagating the error based on the loss of the Bayesian neural network, and using the gradient descent optimization method to learn the parameters of the variational distribution, training the Bayesian neural network until a specified number of training steps is reached or the loss converges to a predetermined value, at which point the training is completed.

[0027] More preferably, k is 10, 20, or 30.

[0028] According to another aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] 1) This invention enhances the dimension of joint angles in industrial robots through kernel principal component analysis to handle nonlinear relationships and provide more feature information. At the same time, it introduces a Bayesian neural network for error regression, which can not only predict position errors but also provide confidence intervals, thereby improving the applicability, accuracy and effectiveness of predictions in various practical application scenarios.

[0031] 2) This invention introduces probability distribution and variational inference into Bayesian neural networks, which is suitable for situations with limited data, simplifies the complexity of the network, and can effectively solve the problem of replacing complex models of kinematic position errors of industrial robots. It has the advantages of high universality and good versatility. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of the method for predicting the position error and its range of an industrial robot in this invention.

[0033] Figure 2 This is a schematic diagram of the Bayesian neural network structure in this invention;

[0034] Figure 3 This is a schematic diagram illustrating the results of predicting the position error and its range using a trained Bayesian neural network in this invention. Detailed Implementation

[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0036] This invention proposes a method for predicting the position error and its interval of industrial robots based on kernel principal component analysis (KPCA) and Bayesian neural networks (BNNs). This method can predict the absolute positioning error interval of industrial robots. By increasing the dimensionality of the joint angles of the industrial robot through KPCA to handle nonlinear relationships and provide more feature information, and by introducing a Bayesian neural network for error regression, it can not only predict the position error but also provide the confidence interval, thereby improving its applicability and the effectiveness of the predicted values ​​in various practical application scenarios. This method can effectively solve the problem of replacing complex models of industrial robot kinematic position error models, and has the advantages of high universality and good versatility.

[0037] This embodiment relates to a method for predicting the position error and its range of an industrial robot, such as... Figure 1 This includes the following steps:

[0038] 1) Randomly select joint angle vectors within the workspace of the industrial robot, calculate the theoretical position coordinates, control the end effector to reach these positions, record the actual position coordinates, calculate the position error, and construct a dataset containing joint angle vectors and position errors.

[0039] Create a dataset D containing joint angle input vectors and position errors. Randomly select 2n sets of joint angle vectors θ = [θ1, θ2, ..., θn] within the working area of ​​the industrial robot. 2n ] T , where θ iThis is a p-dimensional vector representing the number of joint angles of the industrial robot. In this embodiment, p = 6. The theoretical position coordinates of the corresponding sampling points are calculated using the robot's forward kinematics formula. Then, the robot's end effector is moved to the sampling point position by the robot control system. The n sets of end effector positions are measured using measuring equipment to obtain the actual position coordinates. The difference between the actual position and the theoretical position is the required end effector position error. Finally, the joint angle vector and the corresponding position error err(θ) = [e(θ1), e(θ2), ..., e(θ3)] are obtained. 2n )] T Thus, dataset D is constructed. In the position error err(θ), err(θ) i )=[e x (θ i ),e y (θ i ),e z (θ i )] T (i = 1, 2, ..., 2n) represents the error along the three coordinate axes; since the end position error is a vector composed of position errors along the x, y, and z directions, the prediction method for the deviation in these three directions is the same for each dataset. The subsequent steps, taking the prediction of the position error confidence interval along the x-axis in the dataset as an example, will use a new dataset err. x (θ)={θ,e x (θ)}, where θ represents the joint angle vector matrix, e x (θ) represents the error along the x-axis.

[0040] 2) such as Figure 2 KPCA is used to enhance the dimensionality of joint angle vectors to handle nonlinear relationships and provide more feature information, thereby improving the accuracy of regression tasks. The specific steps are as follows: select a kernel function and calculate the kernel matrix, center the kernel matrix, perform eigenvalue decomposition to obtain eigenvalues ​​and eigenvectors, select the eigenvectors corresponding to the k largest eigenvalues, and project the original data onto these eigenvectors to obtain new features.

[0041] Kernel Principal Component Analysis (KPCA) is used to map joint angles to a higher-dimensional space to handle nonlinear relationships and improve model fitting ability. At the same time, the higher-dimensional space provides more feature information, which can more accurately capture subtle differences in the data, thereby improving the accuracy of regression tasks. In addition, the higher-dimensional mapping increases the ways of feature combination and enriches the data expression capabilities.

[0042] Kernel principal component analysis (KPCA): Projecting joint angle vectors into a higher-dimensional space, different kernel functions (polynomial kernel, exponential kernel, Gaussian kernel, etc.) and different feature dimensions can be selected to construct different inputs and find the optimal combination. This includes the following steps:

[0043] 2.1) Randomly select n sets of joint angles and their corresponding position errors to form the training set for the position error err(θ), and the remaining n sets form the test set. Assume the position error err(θ) is x. n×p Let represent n sets of joint angles, each set of joint angles being p-dimensional. List the covariance matrix C, and calculate it as shown in equation (1):

[0044]

[0045] Where n represents the number of samples, X is the representation of the joint angle in the high-dimensional feature space, and x i The joint angle is φ(x). i The function denoted by represents a mapping function that maps data to a high-dimensional space, but its specific form is unknown. Therefore, the kernel trick is used to directly calculate the inner product in the low-dimensional space without explicitly defining the mapping, thus solving the above problem.

[0046] 2.2) The kernel matrix K is defined as expression (2):

[0047]

[0048] Wherein, κ(x) i ,x j ) is the kernel function, which normalizes the kernel matrix K and is defined as expression (3):

[0049] K center =K-1 n×n K-K1 n×n +1 n×n K1 n×n (3)

[0050] Among them, 1 n×n Let represent an n-order matrix with elements 1 / n. Assuming the eigenvalues ​​of the kernel matrix are u and the eigenvectors are λ, it is defined by expression (4):

[0051] XX T u=λu (4)

[0052] 2.3) Multiply both sides of formula (4) by X on the left. T Defined as expression (5):

[0053] X T X(X T u)=λ(X T u) (5)

[0054] It can be concluded that X T u is X T The eigenvectors of X are transformed into unit eigenvectors, i.e., the projection direction v in the high-dimensional space, defined as expression (6):

[0055]

[0056] 2.4) Due to X T It is still unknown, but the projection l of any vector φ(x′) onto it can be directly calculated, defined as expression (7):

[0057]

[0058] Formulas (1)-(7) use kernel functions to project features into a high-dimensional space, with the projection direction being the normalized kernel matrix K. center The eigenvectors corresponding to the eigenvalues ​​are such that larger eigenvalues ​​indicate larger variances. Therefore, the normalized kernel matrix K is... center The eigenvectors are arranged in descending order of their eigenvalues ​​to obtain matrix V. n×n .

[0059] 2.5) In practical applications, the number of feature vectors selected directly affects the accuracy of the prediction model, as the model may be affected by noise and redundant data. This invention selects the feature vectors corresponding to the first k (k = 10, 20, 30) largest eigenvalues, i.e., the projected features are:

[0060] x n×k =K center V n×k (8)

[0061] Where k is the number of principal components, V n×k For matrix V n×n The matrix is ​​composed of the eigenvectors corresponding to the k largest eigenvalues.

[0062] 3) such as Figure 2 As shown, a Bayesian neural network is constructed for error prediction. Using the upscaled features as input and the corresponding location errors as labels, the Bayesian neural network contains two hidden layers of 100 units each.

[0063] Increasing the dimension of the joint angles of the industrial robot from p-dimensional to k-dimensional provides more feature information, enabling more accurate capture of subtle differences in the data. Finally, the increased-dimensional features are used for error regression. Compared to artificial neural networks that only provide point predictions, this invention introduces a Bayesian neural network for error prediction. By introducing probability distributions and Bayesian inference, the Bayesian neural network provides better uncertainty quantification, simultaneously predicting the positional error and its range for the industrial robot. Furthermore, it excels in mitigating overfitting problems, making it particularly suitable for situations with limited data. The specific definitions are as follows:

[0064] 3.1) Assume the prior probability distribution of the weights w in the Bayesian neural network is w~p(w), given n sets of joint angle vectors θ=[θ1,θ2,...,θ n ] T (denoted as X) and its corresponding position error err x (θ)=[e x (θ1),e x (θ2),...,e x (θ n )] T (denoted as Y), we can obtain the following Bayes formula, defined as expression (9):

[0065]

[0066] Where p(Y|X,w) is the probability of the neural network outputting Y given parameters w and input X, and P(Y|X) is a constant determined by the training set.

[0067] 3.2) In Bayesian neural networks, the network is relatively complex with many parameters, making it difficult to integrate the denominator in formula (9). Therefore, variational inference is introduced to approximate the posterior probability distribution p(w|D) with a simple distribution q(w|θ), where θ is the parameter of the approximate distribution q. The distance between them is measured using Kullback-Leibler (KL), defined as expression (10):

[0068]

[0069] When the KL divergence is 0, it means that the two distributions are completely consistent. Therefore, the problem is transformed into an optimization problem of finding the minimum value of the KL divergence, defined as expression (11):

[0070]

[0071] 3.3) The loss function of formula (11) is also called the Evidence Lower Bound (ELBO). It is usually approximated by Markov Chain Monte Carlo (MCMC) to obtain the loss function, which is defined as expression (12):

[0072]

[0073] Among them, w (i) q(w) represents the i-th sample collected from the variational distribution; (i) |θ) is a variational distribution, and for the posterior probability distribution p(D|w) (i) The approximation of ); p(w (i) ) for w (i) The prior probability density.

[0074] 4) Backpropagation of error: Train the constructed Bayesian neural network to obtain a trained Bayesian neural network.

[0075] Error backpropagation is performed based on the loss, and gradient descent is used to learn the parameters of the variational distribution. Each weight in the Bayesian neural network can be approximated by a Gaussian distribution, with parameters μ and σ. The specific process is as follows:

[0076]

[0077] ω i ←μ+softplus(σ)·∈ i (14)

[0078]

[0079] Next, calculate the gradient:

[0080]

[0081] Parameter update:

[0082]

[0083] in, Let μ represent the Gaussian distribution, σ be the mean, and softplus(σ) = log(1 + e^(-σ / σ)). σ ), The gradient operator completes training when a specified number of training steps are reached or the loss converges to a predetermined value.

[0084] 5) Reconstruct the centered kernel matrix of the test set, apply the same kernel function and increased dimension to the test set, and feed it into the trained Bayesian neural network to predict the position error and its range.

[0085] After training the Bayesian neural network, the model is evaluated on a test set. First, the centered kernel matrix K for the test set needs to be reconstructed. test Then, it is compared with the normalized kernel matrix K of the training set. center The eigenvectors are arranged in descending order of their eigenvalues ​​to form a matrix V. n×n Multiplication is used, but in practical applications, the number of eigenvectors chosen directly affects the accuracy of the prediction model, as the model may be affected by noise and redundant data. Therefore, this invention selects the eigenvectors corresponding to the first k (k = 10, 20, 30) largest eigenvalues ​​for projection, i.e., takes V... n×k The data of the test set after dimensionality increase is calculated; finally, this data is input into the trained Bayesian neural network to obtain the location error and its confidence interval. Figure 3 As shown in the figure, the prediction error represented by the blue line is very close to the measurement error represented by the red dots, indicating that the predicted values ​​are very accurate. Secondly, the 95% confidence interval, represented by the yellow area, effectively covers most of the predicted points, and the interval range is small, demonstrating the stability and reliability of the prediction results. Therefore, whether considering the location error or the confidence interval results, this method performs excellently in terms of accuracy.

[0086] 6) Based on steps 1) to 5), calculate the intervals and specific values ​​of the measurement errors along the y-axis and z-axis respectively, and compensate for them using offline programming. This method enhances the dimensionality of the joint angles of the industrial robot through kernel principal component analysis to handle nonlinear relationships and provide more feature information. Simultaneously, it introduces a Bayesian neural network for error regression, which can not only predict position errors but also provide confidence intervals, thereby improving its applicability and the effectiveness of the predicted values ​​in various practical application scenarios.

[0087] Example 2

[0088] The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0089] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0090] The processing unit executes the various methods and processes described above, such as methods 1) to 6). For example, in some embodiments, methods 1) to 6) may be implemented as a computer software program tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods 1) to 6) described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods 1) to 6) by any other suitable means (e.g., by means of firmware).

[0091] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0092] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0093] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0094] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for predicting the position error and its range of an industrial robot, characterized in that, The method includes the following steps: Step S1: Construct a dataset containing joint angle vectors and position errors; Step S2: Use kernel principal component analysis to project the joint angle vectors from step S1 into a high-dimensional space to perform feature dimensionality upscaling. Step S3: Use the features after feature dimensionality increase and the corresponding positional errors as the input and label of the Bayesian neural network, respectively, to train the Bayesian neural network. Step S4: After the test set data is upgraded in terms of feature dimensionality according to the method in step S2, it is input into the trained Bayesian neural network, and the predicted position error and its confidence interval are output. Step S2 includes: adjusting the position error Random selection n The training set consists of the joint angles and corresponding positional errors of the group, and the remaining... n The test set is composed of groups; the positional error is assumed. for , indicating that there is n Group joint angles, each group joint angle is p Dimension, list the covariance matrix C The calculation formula is as follows: , in, n Indicates the number of samples. X It is the representation of joint angles in a high-dimensional feature space. Joint angle, This represents a mapping function that maps data to a higher-dimensional space. kernel matrix K Defined as: , in, For the kernel function, the kernel matrix is... Normalization is defined as: , in, Indicates that the element is 1 / n of n An order matrix, assuming the eigenvalues ​​of the kernel matrix are... u The feature vector is Defined as: , , yes The eigenvectors are transformed into unit eigenvectors, i.e., the projection directions in high-dimensional space. Defined as: , Directly find any vector Projection on it l Defined as: , The kernel function is used to project the features into a high-dimensional space, with the projection direction being the normalized kernel matrix. The eigenvectors corresponding to the eigenvalues ​​will be normalized to the kernel matrix. The eigenvectors are arranged in descending order of their eigenvalues ​​to obtain a matrix. ; Before selection k The eigenvectors corresponding to the largest eigenvalues, i.e., the projected features, are: , in k Number of principal components For matrix Take the front k The matrix of eigenvectors corresponding to the largest eigenvalues; Step S3 includes: assuming the weights of the Bayesian neural network w The prior probability distribution is w~p(w) Given Joint angle vector , recorded as X and its corresponding positional error , recorded as Y Using Bayes' theorem, we can obtain the result under given parameters. w and input X In this case, the neural network output Y probability ; Introducing variational inference methods, using a simple distribution Approximate posterior probability distribution ,in For approximate distribution q The parameters, D The dataset constructed for step S1, and KL divergence used. To measure the approximate distribution With posterior probability distribution The distance between them; solve for the minimum KL divergence, defined as: , The minimum KL divergence is found using the Markov chain Monte Carlo approximation, corresponding to the loss function. Loss Defined as: , in, Denotes the number of samples collected from the variational distribution. i One sample; For variational distributions, the posterior probability distribution is... Approximate; for The prior probability density.

2. The method for predicting the position error and its range of an industrial robot according to claim 1, characterized in that, In step S1, the process of constructing a dataset containing joint angle vectors and position errors includes: randomly selecting 2... Group joint angle vector ,in yes dimensional vector, p Indicates the number of joint angles of an industrial robot; Calculate the theoretical position coordinates of the corresponding sampling points, move the robot end effector to the sampling point position, and use measuring equipment to measure n sets of end effector positions to obtain the actual position coordinates. The difference between the actual position and the theoretical position is the required end effector position error. Therefore, the joint angle vector and the corresponding position error are obtained. To build a dataset ,Right now , in, 2n The number of joint angle vectors.

3. The method for predicting the position error and its range of an industrial robot according to claim 2, characterized in that, The position error includes three coordinate axes. x , y and z The vector consists of errors in the three directions, and the method for predicting the deviation in each dataset is the same for all three directions.

4. The method for predicting the position error and its range of an industrial robot according to claim 1, characterized in that, Step S4 includes respectively... x axis, y shaft and z The joint angle vectors of the axes are used for feature upscaling, and then input into a trained Bayesian neural network to predict the joint angles along the axes. x axis, y shaft and z The confidence interval of the axis position error.

5. The method for predicting the position error and its range of an industrial robot according to claim 1, characterized in that, The Bayesian neural network described herein includes two hidden layers with multiple units.

6. The method for predicting the position error and its range of an industrial robot according to claim 1, characterized in that, The training process of the Bayesian neural network includes: backpropagating the error based on the loss of the Bayesian neural network, and using the gradient descent optimization method to learn the parameters of the variational distribution, training the Bayesian neural network until a specified number of training steps are reached or the loss converges to a predetermined value, at which point the training is complete.

7. The method for predicting the position error and its range of an industrial robot according to claim 1, characterized in that, The k It can be 10, 20, or 30.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.