Robot position error and interval prediction method and device and medium
Through the quality-driven neural network method, the problem of insufficient capture of dynamic changes in position error of industrial robots is solved, the error range is predicted, the robustness and reliability of positioning accuracy are improved, and it is suitable for a variety of practical application scenarios.
Patent Information
- Application Number
- CN202410980347.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-22
AI Technical Summary
The existing technology cannot fully capture the dynamic changes in the position error of industrial robots, especially when performing complex tasks. It ignores error changes caused by multiple factors such as mechanical wear and temperature changes, resulting in insufficient positioning accuracy.
Adopting a quality-driven neural network method, by obtaining the industrial robot joint angle vector, constructing a data set, inputting the neural network model, calculating the prediction interval coverage probability and average prediction interval width, defining learnable parameters to generate the prediction interval boundary, and using the mean square error The loss is regressed, the width and coverage of the prediction interval are optimized, and a diversity model set is constructed to predict the position error and its interval.
It improves the robustness and reliability of position error prediction, provides prediction of error range, enhances the compensation effect, is suitable for a variety of practical application scenarios, and improves the effectiveness of prediction values.
Smart Images

Figure CN118664601A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot control technology, and in particular to a method for predicting the position error and interval of an industrial robot based on a quality-driven neural network. Background Art
[0002] Industrial robot platforms have been widely used in industrial manufacturing fields such as aviation hole making, spraying, grinding, and welding. Generally, industrial robots have high repeatability, but low absolute positioning accuracy. With the growing demand for high-precision positioning in the industrial manufacturing field, the absolute positioning accuracy of robots can no longer meet actual needs. The geometric parameter error caused by factors such as the processing and assembly errors of industrial robots is the main source of the robot's absolute position error. Regarding the robot position error caused by geometric parameter errors, domestic and foreign research mainly uses parameter identification methods to estimate the geometric parameter error to improve the robot's kinematic modeling accuracy and further improve the robot's positioning accuracy. However, the parameter identification method ignores the influence of non-geometric parameter errors such as load, thermal effect, deformation, joint gear backlash, and disturbance. Scholars use neural networks, machine learning and other methods to predict and compensate for non-geometric parameter errors. Although the above methods compensate for the robot position error caused by non-geometric parameter errors, the above methods currently all assume that the robot's position error is a certain value, but in fact, due to the influence of random errors, the robot's position error is a random variable. Currently, there are few studies on the prediction of the distribution interval of random variables. Therefore, the prediction of the position error and its interval of industrial robots is of great significance to improving the robot positioning error.
[0003] Existing industrial robot position compensation methods mainly focus on the prediction of position error, but pay less attention to the confidence and possible range of the prediction results. This method may not fully capture the dynamic error changes caused by various factors (such as mechanical wear, temperature changes, etc.) when the robot performs complex tasks. Summary of the invention
[0004] The purpose of the present invention is to overcome the defect of the above-mentioned prior art that it cannot fully capture the dynamic error changes and to provide a robot position error and interval prediction method, device and medium.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A robot position error and interval prediction method thereof, the steps comprising:
[0007] Obtain the joint angle vector of the industrial robot, calculate the difference between the theoretical position and the actual position, and construct a data set containing the joint angle vector and position error;
[0008] The dataset containing joint angle vectors and position errors is fed into a neural network-based prediction model;
[0009] By calculating the prediction interval coverage probability and the average prediction interval width, the position error interval prediction is performed while ensuring that the prediction interval coverage probability meets the standard and minimizing the average prediction interval width;
[0010] Position error prediction is performed by defining learnable parameters to generate relative weights of prediction interval boundaries and regressing the predicted values using mean squared error loss.
[0011] The prediction model outputs the position error value and its interval prediction result.
[0012] As a preferred technical solution, the prediction interval coverage probability (PICP) is expressed as:
[0013]
[0014] Where c is the total number of data points in the estimated prediction interval; n is the number of joint angle vector groups;
[0015] The mean prediction interval width (MPIW) is expressed as:
[0016]
[0017] in, are the upper and lower bounds of the prediction for the i-th sample respectively.
[0018] As a preferred technical solution, the method adopts a possibility-based method to find the neural network parameters that maximize PICP; adjusts the width of the prediction interval by minimizing the loss function; and uses Lagrange multipliers to balance the interval width and coverage to optimize the prediction model.
[0019] As a preferred technical solution, the method minimizes the average prediction interval width under the premise that the prediction interval coverage probability meets the standard according to the HQ (High-Quality) criterion;
[0020] Points outside the interval are not calculated, and the average prediction interval width loss function expression is:
[0021]
[0022] Where c represents the total number of data points within the estimated prediction interval; Respectively represent the upper and lower bounds of the prediction interval, k i Indicates whether sample i is within the estimated prediction interval.
[0023] As a preferred technical solution, the method adopts a possibility-based method to find the neural network parameter ω that maximizes the coverage probability of the prediction interval:
[0024]
[0025] Among them, the vector k indicates whether each sample is within the estimated prediction interval, where each element k i is considered as a binary variable and takes the value 1 with probability (1-α).
[0026] As a preferred technical solution, when the sample size is large enough, k i The binomial distribution of is approximately a normal distribution with mean n(1-α) and variance nα(1-α):
[0027]
[0028] Use the minimization of the negative log-likelihood function to solve the problem of maximizing the likelihood function, and set k i The normal distribution simplifies to:
[0029]
[0030] The penalty is only imposed when the prediction interval coverage probability is less than (1-α). The prediction interval coverage probability loss function expression is:
[0031]
[0032] As a preferred technical solution, the position error e x (θ i )By defining a learnable parameter v, the boundary relative weight of the position error is generated. The formula for position error prediction is as follows:
[0033]
[0034] Among them, v∈(0,1), the mean square error loss is used to regress the predicted value, and the mean square error loss function expression of the position error prediction is:
[0035]
[0036] As a preferred technical solution, the loss function of the neural network model adjusts the influence of interval width and coverage by introducing the Lagrange multiplier λ, and the expression is:
[0037]
[0038] in, Represents the average prediction interval width loss function; Loss PICP Represents the prediction interval coverage probability loss function; Loss MSE Represents the mean squared error loss function for position error prediction.
[0039] As a preferred technical solution, the neural network model includes:
[0040] The input layer accepts the multi-dimensional vector of the joint angles of the industrial robot;
[0041] Hidden layers, including fully connected layers with q hidden units and ReLU activation functions;
[0042] The output layer includes three nodes, which represent the upper and lower bounds of the predicted interval and the relative weight of the boundary of the position error prediction.
[0043] As a preferred technical solution, the method subsamples the training set and performs neural network fitting on each subset to train multiple neural network models and form a diverse model set;
[0044] The prediction results of each neural network model are aggregated to predict the interval and specific value of the sample.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] The present invention proposes a neural network method based on quality drive, which can not only predict the position error, but also predict the possible range of the error, and does not make any prior assumptions about the distribution of data within the prediction interval, thereby improving its applicability and the effectiveness of the predicted value in a variety of practical application scenarios. This interval prediction method can provide an error range, thereby improving the robustness and reliability of compensation to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flow chart of a method for predicting the position error and interval of an industrial robot based on a quality-driven neural network of the present invention;
[0048] Figure 2 It is a schematic diagram of the definition of the concepts of prediction interval coverage probability PICP and mean prediction interval width MPIW;
[0049] Figure 3 It is a schematic diagram of the neural network structure based on quality drive of the present invention. DETAILED DESCRIPTION
[0050] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0051] Example 1
[0052] In order to solve the problem that the existing technical solutions may not be able to fully capture the dynamic error changes caused by various factors when the robot performs complex tasks, the present invention proposes a method for predicting the position error and its interval of an industrial robot based on a quality-driven neural network. Figure 1 As shown in the figure, joint angle vectors are randomly selected in the workspace of the industrial robot, the theoretical position coordinates are calculated, the end effector is controlled to reach these positions, the actual position coordinates are recorded, the position error is calculated, and a data set containing joint angle vectors and position errors is constructed; the target variable (such as x-axis position error) and prediction confidence (such as 95% or 99%) are set, a vector is constructed to indicate whether the sample is within the prediction interval, and the prediction interval coverage probability (Prediction Interval Coverage Probability, PICP) and the mean prediction interval width (MeanPrediction Interval Width) are calculated. Width, MPIW), and apply the HQ (High-Quality) criterion to minimize MPIW while ensuring that PICP meets the standard; use a possibility-based method to optimize neural network parameters, adjust the prediction interval width by minimizing the loss function, and use Lagrange multipliers to balance the interval width and coverage; define learnable parameters to generate prediction interval boundaries, and use mean square error MSE loss for predicted value regression; the input layer receives the multidimensional vector of joint angles, which is passed to the output layer through the fully connected layer and ReLU activation function. The output layer has 3 nodes representing the upper and lower bounds of the prediction interval and the boundary weights; construct a diverse model set by subsampling the training set and fitting multiple neural network models, and aggregate the prediction results of each model to improve accuracy and robustness. It includes the following steps:
[0053] 1) Construct the input joint angle vector and position error sample set D. Randomly select n groups of joint angle vectors θ = [θ1, θ2, ..., θ n ] T , where θ i(i=1,2,…,n) is a p-dimensional vector, which indicates the number of joint angles of the industrial robot. In the present embodiment, the number of joint angles of the robot is p=6. The theoretical position coordinates of the corresponding sampling position are calculated by using the robot forward kinematics formula. Then, the robot end is controlled to reach the sampling position by the robot control system. The measuring device measures the n groups of end positions to obtain the actual position coordinates. The difference between the actual position and the theoretical position is the required end position error. Finally, the joint angle vector and the corresponding position error err(θ)=[e(θ1),e(θ2),…,e(θ n )] T , constructing a data set D. In the position error err(θ), err(θ i )=[e x (θ i ),e y (θ i ),e z (θ i )] T (i=1,2,…,n) are the errors in the three coordinate axis directions. Since the end position error is a vector composed of position errors along the x, y, and z directions, the prediction method of the confidence intervals along the three directions in each data set is the same. The subsequent steps take the prediction of the position error confidence interval along the x-axis in the data set as an example. The new data set err x (θ)={θ,e x (θ)}, where θ represents the input joint angle vector matrix, e x (θ) represents the error along the x-axis.
[0054] 2) If Figure 2 The following table shows the definitions of variables such as prediction interval coverage probability PICP and average prediction interval width MPIW. The specific definitions are as follows:
[0055] 2.1) Given a set of joint angle inputs θ i =[θ1,θ2,...,θ p ] T , for sample i, predict the position error e of the target variable in the x-axis direction x (θ i ) has a probability of γ∈[0,1] falling within the prediction interval (PI), PI is defined as The value of γ is usually set to 0.95 or 0.99 to express confidence in the accuracy of the prediction. This confidence level is also represented by α, where γ = 1-α. In this embodiment, α = 0.05, indicating a 95% confidence interval, is calculated as shown in formula (1):
[0056]
[0057] 2.2) Given n sets of joint angle vectors, construct a vector k to indicate whether each sample is within the estimated prediction interval, where each element k i ∈{0,1}, defined as expression (2):
[0058]
[0059] The quality of the generated prediction intervals is evaluated by measuring the prediction interval coverage probability PICP, which is defined as expression (3):
[0060]
[0061] The total number of data points within the estimated prediction interval is defined as c, which is defined as expression (4):
[0062]
[0063] At the same time, the average prediction interval width MPIW is defined as expression (5):
[0064]
[0065] According to the HQ (High-Quality) criterion, MPIW should be minimized under the premise that PICP meets the standard, that is, α≤0.05. In order to minimize MPIW, formula (5) is included in the loss function, but the points outside the interval are not calculated. Therefore, the concept of capturing MPIW is proposed, and the final loss function of the MPIW part is defined as expression (6):
[0066]
[0067] 2.3) For PICP, a possibility-based method is used to find the neural network parameter ω that maximizes it. The formula is shown in (7):
[0068]
[0069] Among them, each element k i is regarded as a binary variable that takes the value 1 with probability (1-α), that is, these elements can be represented as Bernoulli random variables k i ~Bernoulli(1-α), and every k iare all independent and identically distributed. This assumption is valid for a randomly selected subset of all data points, such as the mini-batch used in stochastic gradient descent (SGD). Based on this, the total number of captured points can be described using a binomial distribution, i.e., c~Bernoulli(n,1-α). The probability mass function (PMF) is then used for further analysis, as shown in equation (8):
[0070]
[0071] Since the factorial operation in the binomial coefficient is relatively complicated in actual calculation, by applying the central limit theorem, when the sample size is large enough, the binomial distribution can be approximated as a normal distribution with a mean of n(1-α) and a variance of nα(1-α). For a larger n (n=512 in this embodiment), we have:
[0072]
[0073] Usually, the problem of maximizing the likelihood function is solved by minimizing the negative log-likelihood function, so formula (9) can be simplified to:
[0074]
[0075] Among them, the penalty is only applied when PICP is less than (1-α), so the loss function of the PICP part is defined as expression (11):
[0076]
[0077] 2.4) For input θ i , position error e x (θ i ) is not generated directly through the network, but a learnable parameter v is defined to generate the boundary relative weight of the position error. The formula for position error prediction is as follows:
[0078]
[0079] Where v∈(0,1), the mean squared error (MSE) loss is used to regress the predicted value. The loss function of this part is defined as expression (13):
[0080]
[0081] In summary, in order to balance the importance of interval width and coverage, the Lagrange multiplier λ is introduced to adjust the influence of the two, and the new loss function is finally obtained:
[0082]
[0083] 3) If Figure 3 As shown, build a neural network model.
[0084] 3.1) First, the input layer accepts a p-dimensional input vector, which represents the joint angle of the industrial robot. Next, it is input to a fully connected hidden layer with q hidden units. In this embodiment, q=100 is taken, and the output is obtained by applying the ReLU activation function, which can effectively reduce the gradient disappearance and accelerate the convergence speed of network training. After that, the output of the hidden layer is passed to the output layer. The output layer contains 3 nodes, which represent the upper and lower bounds of the interval predicted by the sample and the boundary relative weight v about the position error prediction. Then, the loss function of formula (14) is used to perform error back propagation and update the weight.
[0085] 3.2) Train m models. By subsampling the training set and fitting the neural network for each subset, a total of m models are trained, thereby generating a model set containing diversity. This diversity comes from the differences between each subset, which in turn affects the fitted neural network model. To make predictions in this model set, interval predictions and specific value predictions can be made for each sample by following the steps below:
[0086]
[0087]
[0088]
[0089] in, represents the upper bound of the prediction of the i-th sample in the j-th model, It represents the mean of the upper bound of the i-th sample predicted by m models, is the variance of the m prediction results, 1.96 is a constant in statistics, used to calculate the 95% confidence interval, indicating the uncertainty of the model, and finally used As the upper bound of the final estimate, similarly, the lower bound of the interval is
[0090] Similarly, according to steps 1 to 3, the interval and specific value of the measurement error along the y-axis and z-axis are calculated, and compensated using offline programming. This method does not make any a priori assumptions about the distribution of the data within the prediction interval, thereby improving its applicability and the effectiveness of the predicted value in a variety of practical application scenarios.
[0091] The present invention predicts the position error and its interval of an industrial robot based on a quality-driven neural network, including the following steps: (1) Dataset construction: randomly select multiple joint angle vectors in the workspace of the industrial robot, calculate the theoretical position coordinates using the forward kinematics formula; control the robot end effector to reach these positions, and record the actual position coordinates using a high-precision measuring device; calculate the difference between the actual and theoretical positions to obtain the end position error, and construct a data set containing the joint angle vector and the position error. (2) Prediction interval setting: set the target variable for each sample, such as the position error in the x-axis direction, and determine the prediction confidence, such as 95% or 99%, to reflect the confidence in the accuracy of the prediction. (3) Prediction interval quality assessment: construct a vector to indicate whether the sample falls within the estimated prediction interval, calculate the prediction interval coverage probability PICP and the average prediction interval width MPIW, and apply the HQ criterion to minimize MPIW while ensuring that PICP meets the standard. (4) Optimize the prediction model: use a possibility-based method to find the neural network parameters that maximize PICP, and adjust the width of the prediction interval by minimizing the loss function, while using Lagrange multipliers to balance the interval width and coverage. (5) Position error generation: Instead of predicting the position error directly through the network, a learnable parameter is defined to represent the boundary weight, and regression is performed using the mean square error (MSE) loss. (6) Neural network construction and training: The input layer receives the multidimensional vector of joint angles, which is passed to the output layer through a fully connected layer with q hidden units and a ReLU activation function. The output layer has 3 nodes representing the upper and lower bounds and boundary weights of the prediction interval, and is trained using a specific loss function. (7) Model set construction and prediction: A diverse model set is constructed by subsampling the training set and fitting multiple neural network models, aggregating the prediction results of each model to improve the accuracy and robustness of the prediction.
[0092] Example 2
[0093] As a second aspect of the present invention, the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the robot position error and interval prediction method as described above. In addition to the above-mentioned processor, memory and interface, any device with data processing capability in which the device in the embodiment is located may also include other hardware according to the actual function of the device with data processing capability, which will not be described in detail.
[0094] Example 3
[0095] As a third aspect of the present invention, the present application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the robot position error and interval prediction method as described above. The computer-readable storage medium may be an internal storage unit of any device with data processing capability as described in any of the foregoing embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capability. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.
[0096] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A robot position error and interval prediction method, characterized in that the steps include: Obtain the joint angle vector of the industrial robot, calculate the difference between the theoretical position and the actual position, and construct a data set containing the joint angle vector and position error; The dataset containing joint angle vectors and position errors is fed into a neural network-based prediction model; By calculating the prediction interval coverage probability and the average prediction interval width, the position error interval prediction is performed while ensuring that the prediction interval coverage probability meets the standard and minimizing the average prediction interval width; Position error prediction is performed by defining learnable parameters to generate relative weights of prediction interval boundaries and regressing the predicted values using mean squared error loss. The prediction model outputs the position error value and its interval prediction result.
2. A robot position error and interval prediction method according to claim 1, characterized in that: The prediction interval coverage probability is expressed as: Where c is the total number of data points in the estimated prediction interval; n is the number of joint angle vector groups; The average prediction interval width is expressed as: in, are the upper and lower bounds of the prediction for the i-th sample respectively.
3. A robot position error and interval prediction method according to claim 1, characterized in that: The method adopts a possibility-based approach to find the neural network parameters that maximize PICP; adjusts the width of the prediction interval by minimizing the loss function; and uses Lagrange multipliers to balance the interval width and coverage to optimize the prediction model.
4. A robot position error and interval prediction method according to claim 3, characterized in that: The method described minimizes the average prediction interval width under the premise that the prediction interval coverage probability meets the standard according to the HQ criterion; Points outside the interval are not calculated, and the average prediction interval width loss function expression is: Where c represents the total number of data points within the estimated prediction interval; Respectively represent the upper and lower bounds of the prediction interval, k i Indicates whether sample i is within the estimated prediction interval.
5. A robot position error and interval prediction method according to claim 4, characterized in that: The method adopts a likelihood-based approach to find the neural network parameters ω that maximize the probability of coverage of the prediction interval: Among them, the vector k indicates whether each sample is within the estimated prediction interval, where each element k i is considered as a binary variable and takes the value 1 with probability (1-α).
6. A robot position error and interval prediction method according to claim 5, characterized in that: When the sample size is large enough, k i The binomial distribution of is approximately a normal distribution with mean n(1-α) and variance nα(1-α): Use the minimization of the negative log-likelihood function to solve the problem of maximizing the likelihood function, and set k i The normal distribution simplifies to: The penalty is only imposed when the prediction interval coverage probability is less than (1-α). The prediction interval coverage probability loss function expression is:
7. A robot position error and interval prediction method according to claim 6, characterized in that: The position error e x (θ i )By defining a learnable parameter v, the boundary relative weight of the position error is generated. The formula for position error prediction is as follows: Among them, v∈(0,1), the mean square error loss is used to regress the predicted value, and the mean square error loss function expression of the position error prediction is:
8. A robot position error and interval prediction method according to claim 7, characterized in that: The loss function of the neural network model introduces the Lagrange multiplier λ to adjust the influence of interval width and coverage, and the expression is: in, Represents the average prediction interval width loss function; Loss PICP Represents the prediction interval coverage probability loss function; Loss MSE Represents the mean squared error loss function for position error prediction.
9. A robot position error and interval prediction method according to claim 1, characterized in that: The neural network model includes: The input layer accepts the multi-dimensional vector of the joint angles of the industrial robot; Hidden layers, including fully connected layers with n hidden units and ReLU activation functions; The output layer includes three nodes, which represent the upper and lower bounds of the predicted interval and the relative weight of the boundary of the position error prediction.
10. A robot position error and interval prediction method according to claim 9, characterized in that: The method subsamples the training set and performs neural network fitting on each subset to train multiple neural network models and form a diverse model set. The prediction results of each neural network model are aggregated to predict the interval and specific value of the sample.
Citation Information
Patent Citations
Fuzzy neural network data mining method based on particle swarm optimization
CN108255854A
Cutter error compensation method and device and computer equipment
CN111077845A
Photovoltaic power interval prediction method based on BP neural network estimation method and improved proportionality coefficient method
CN112396203A
Electric water heater cluster power short-term interval prediction method considering climbing characteristics and prediction interval optimization
CN112396204A
Microgrid load short-term interval prediction method based on GWO-LSSVM
CN115222137A
