Robotic arm positioning error compensation method based on improved WOA-GA-BP neural network

By improving the WOA-GA-BP neural network, the problem that the positioning accuracy of six-joint industrial robots is affected by systematic errors and random errors is solved, and more efficient error compensation and positioning accuracy are achieved.

CN118990515BActive Publication Date: 2025-03-07SICHUAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411432246.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-03-07
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

The absolute positioning accuracy of six-joint industrial robots is affected by systematic errors and random errors, resulting in unstable processing accuracy. It is difficult for existing compensation models to effectively overcome structural errors and processing impacts.

Method used

The robot arm positioning error compensation method of improved WOA-GA-BP neural network is adopted. By generating the initial whale population, optimizing the weight and threshold of the BP neural network prediction model, calculating new control parameters and update coefficient vectors, updating individual positions according to different behaviors, calculating new individual fitness and tracking the optimal position, and finally outputting the global optimal solution and the actual compensation joint motion amount.

Benefits of technology

It effectively overcomes the structural error and processing impact of six-joint industrial robots, improves absolute positioning accuracy, and achieves stronger robustness and rapid response error compensation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118990515B_ABST
    Figure CN118990515B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for compensating positioning errors of a manipulator based on an improved WOA-GA-BP neural network, wherein the method comprises the following steps: inputting a motion type and selecting a motion compensation model, inputting an ideal end position coordinate, initializing the weight and threshold of a BP neural network prediction model; improving the BP neural network prediction model based on an improved whale optimization algorithm; calculating new control parameters and updating a coefficient vector A, updating individual positions according to the behavior of circling toward prey or according to the behavior of shrinking and surrounding or according to the behavior of hunting prey; calculating new individual fitness, tracking the new individual optimal position and the global optimal position, and outputting a global optimal solution; and outputting the actual compensated joint motion amount. The mutually coupled joint errors during the movement of the manipulator joints are simulated through multiple high-dimensional and high-order mathematical models, thereby avoiding the decomposition and analysis of coupling error factors, and having fewer unknown quantities than parameter compensation, and having stronger universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of robot arm positioning error compensation, and in particular relates to a robot arm positioning error compensation method based on an improved WOA-GA-BP neural network. Background Art

[0002] In the field of mechanical processing, due to the rapid development of industrial robot technology, robot processing has gradually become a new generation of mechanical processing methods to replace machine tool processing. Robot processing is to use industrial robots with different end effectors to replace traditional machine tools to complete machining tasks such as turning, milling, drilling, and grinding. Compared with traditional machine tools, six-joint serial industrial robots have the characteristics of multiple degrees of freedom, high flexibility, high spatial accessibility, and strong versatility. At present, they have been widely used in traditional mechanical processing in complex working conditions such as milling, grinding, and welding. This kind of industrial robot can be used to complete the processing of large or super-large structural parts or complex curved surface structures in space that are difficult to complete with traditional machine tools. However, this processing mode has a "hard defect" problem, that is, the reliability and stability of the robot's positioning accuracy cannot be guaranteed. In robot processing operations, the processing accuracy of the workpiece often depends on the absolute positioning accuracy and repeat positioning accuracy of the robot. The absolute positioning accuracy determines the accuracy of the robot's motion posture, and the repeat positioning accuracy determines the dynamic stability of the robot's motion. However, due to the influence of the robot's body systematic error and random error, the robot's absolute positioning accuracy will have a certain degree of deviation.

[0003] The absolute positioning accuracy of the six-joint industrial robot is mainly affected by systematic errors and random errors. Systematic errors refer to errors caused by factors such as robot design, processing and assembly, such as manufacturing processing errors, component assembly errors, connecting rod and joint flexibility, uneven gear tooth gap, non-orthogonal mechanical axis, etc. This type of error often has a certain regularity. Random errors refer to errors caused by factors such as external environmental influences or wear and aging of the robot itself. Such errors often cannot be reflected by accurate mathematical models and can only be digitized through experimental data and actual data. In the actual production and processing process, it is found through research that more than 90% of the errors come from the joints of the serial robot, including systematic errors caused by joint deflection, gap and uneven friction caused by processing errors and assembly errors, and random errors caused by joint wear and aging due to impact and vibration. In the actual movement of industrial robotic arms, error factors are often coupled, so the data model that separates the individual factors is not very helpful for the establishment of the overall robotic arm error model. Under the coupling of systematic errors and random errors, industrial robots often cannot move according to the set trajectory and cannot accurately reach the specified point. In the prior art, there are currently two compensation models for the above two types of errors, namely, the parametric method based on the kinematic model and the non-parametric method based on the data model.

[0004] Therefore, how to overcome the influence of the structure of the six-joint industrial robot itself, improve the absolute positioning accuracy of the robot and how to ensure the absolute positioning accuracy of the robot under the influence of the impact of the processing process are technical problems that need to be solved urgently. Summary of the invention

[0005] The purpose of the present invention is to provide a robot arm positioning error compensation method based on an improved WOA-GA-BP neural network, so as to overcome the influence of the structure of the six-joint industrial robot itself, improve the absolute positioning accuracy of the robot and ensure the absolute positioning accuracy of the robot under the influence of the impact of the processing process.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0007] The robot positioning error compensation method based on the improved WOA-GA-BP neural network includes the following steps:

[0008] S1: input the motion type and select the motion compensation model, wherein the motion compensation model includes a single-joint motion model, a double-joint linkage model, a three-joint linkage model, and a six-joint linkage model;

[0009] S2: inputting the coordinates of the ideal terminal position, and after verifying that the input terminal coordinates are correct, inputting the coordinates of the ideal terminal position into the BP neural network prediction model, determining the topological structure of the BP neural network prediction model, and initializing the weights and thresholds of the BP neural network prediction model;

[0010] S3: Based on the WOA-GA-BP prediction neural network algorithm, the BP neural network prediction model is improved: the initial whale population is generated, and the initial whale initial value is set, the chaotic sequence is obtained, the convergence factor is adjusted, the inertia weight is adjusted, and it is mapped to the initial whale population search space, the WOA initialization is completed, the whale population fitness is calculated, and the initial individual optimal position and the global optimal position are marked;

[0011] S4: Calculate new control parameters and update coefficient vector A, generate a random number p in the interval [0,1], and when p < 0.5 and |A| ≥ 1, update the individual position according to the behavior of circling the prey; when p > 0.5, update the individual position according to the shrinking and circling behavior or update the individual position according to the prey hunting behavior;

[0012] S5: Calculate the new individual fitness, and track the new individual optimal position and the global optimal position, and determine whether the maximum iteration condition is met. If not, re-execute step S4. If so, output the global optimal solution, that is, output the optimal weight and threshold parameters, and transmit them to the BP neural network prediction model;

[0013] S6: Use the improved BP neural network prediction model for training and simulation prediction, output the actual end position coordinates, use inverse kinematics to solve the joint motion, and output the actual compensated joint motion.

[0014] Preferably, the BP neural network prediction model in step S2 includes an input layer, a hidden layer and an output layer, and the input layer has N parameters, namely x1, x2, x3, ..., x N , represents the N input parameters of the BP neural network prediction model, the output layer has a parameter y, y is the corrected prediction value, the input layer has n nodes, the output layer has 1 node, and the calculation formula for the number of nodes in the hidden layer is:

[0015]

[0016] The formula for the hidden layer result is:

[0017]

[0018] The formula for the output layer result is:

[0019]

[0020] in, represents the i-th activation unit in the l+1th layer, y m represents the mth output of the system, It represents the weight of mapping the lth layer to the l+1th layer, and the function g(x) represents the nonlinear mapping of the calculation results.

[0021] Preferably, the specific process of improving the BP neural network prediction model in the WOA-GA-BP prediction neural network algorithm in step S3 is as follows:

[0022] S31: setting the initial WOA whale population based on the initial parameter values ​​of the BP neural network, and performing GA algorithm optimization on the initial whale population;

[0023] S32: Optimize the BP neural network based on the WOA algorithm.

[0024] Preferably, the specific process of performing GA algorithm optimization on the initial whale population in step S31 is as follows:

[0025] S311: According to the fitness value, use the tournament method to perform a selection operation, setting the selection probability to P i , then p i The expression is:

[0026]

[0027] S312: Generate new individuals through crossover operation, setting the crossover probability to P c , set the new individuals after crossover to be Y1, Y2, Y3, ..., Y N , the intersection points are k1, k2, k3, ..., k m-1 , m is the number of crossover points, calculate the crossover probability:

[0028]

[0029] S313: Calculate the crossover probability of multi-point crossover:

[0030]

[0031] S314: Execute mutation operation: set mutation probability to P m , then the corresponding individual Y i The jth gene position y ij The variation formula is:

[0032]

[0033] Among them, δ is a random disturbance that follows a normal distribution and is used to change y ij The value of

[0034] S315: Iteratively execute steps S311 to S314 to obtain the optimal initial whale optimization population P.

[0035] Preferably, the optimization of the BP neural network based on the WOA algorithm includes the following steps:

[0036] S316: Whale Optimization Algorithm Surrounding Prey:

[0037] Assume that in the d-dimensional space, the current best whale individual X * The location is Whale Individual X j The location is Whale X j Under the influence of the best whale individuals, the next generation of X j+1 Location The calculation formula is,

[0038]

[0039] in Represents the spatial coordinate X j+1 The kth component of , a decreases linearly from 2 to 0 as the number of iterations increases; r1, r2 are random numbers between 0 and 1;

[0040] S317: Spiral position update: The whale individual at the current position spirals towards the best whale individual at the current position:

[0041]

[0042] Where b is the logarithmic spiral shape constant, l is a random number between -1 and 1;

[0043] S318: Whale optimization algorithm searches for prey. Suppose in d-dimensional space, a random whale individual X rand The location is Current whale individual X j The location is:

[0044]

[0045] Its mathematical model is:

[0046]

[0047] Preferably, the specific process of step S6 is as follows:

[0048] S61: Obtain the motion amount of each joint of the industrial robot;

[0049] S62: predict the error of the motion amount of each joint through the WOA-GA-BP prediction neural network algorithm model, and obtain the terminal positioning error of each joint through iteration, and judge whether the terminal positioning error is less than the error tolerance or whether the maximum number of iterations is reached. If one of the two is yes, output the compensation data and the final joint motion amount, otherwise, execute step S63;

[0050] S63: Obtain the actual position of the joint end, and perform error compensation based on the theoretical position of the end and the BP nonlinear fitting model to obtain the compensation amount of each joint and output the joint motion amount.

[0051] Preferably, the specific calculation of the error compensation in step S6 is:

[0052] Build the error distribution of a six-joint industrial robot arm:

[0053] e(X, Y, Z)∈D={D|D(x)=f(K, θ1, θ2, θ3, θ4, θ5, θ6)};

[0054] Wherein, X, Y are the actual posture and target posture of the end of the six-joint industrial robot arm in the end Cartesian space, e(X, Y, Z) represents the robot absolute positioning error that causes the actual posture to not match the target posture, (θ1, θ2, θ3, θ4, θ5, θ6) represents the joint motion of the first joint to the sixth joint, D represents the distribution model obeyed by the absolute positioning error, which is closely related to the joint motion of the robot arm, D(x) = f(θ1, θ2, θ3, θ4, θ5, θ6), which is the mathematical model that the joint error obeys the joint motion of the six joints θ1, θ2, θ3, θ4, θ5, θ6;

[0055] Establish the distribution model of robot joint motion compensation clothing:

[0056] (Δθ1, Δθ2, Δθ3, Δθ4, Δθ5, Δθ6)∈F={F|F(x)=f(X′, Y′, Z′)};

[0057] Among them, Δθ i is the joint compensation of robot joint i, Δθ i =θ′ i -θ i , X′, Y′, Z′ are the actual positions of the robot plus the terminal prediction error. The specific calculation formula is:

[0058] X′=X+E X , Y′=Y+E Y , Z′=Z+E Z ;

[0059] Among them, F represents the distribution model obeyed by the joint compensation amount, F is related to the actual position of the robot end, F(x) = f(X′, Y′, Z′), that is, the joint motion compensation amount obeys a nonlinear function of the actual position of the end in three directions including X, Y, and Z.

[0060] The beneficial effects of the present invention include:

[0061] The method for compensating the positioning error of a manipulator based on an improved WOA-GA-BP neural network provided by the present invention includes inputting the motion type and selecting the motion compensation model, inputting the coordinates of the ideal end position, initializing the weights and thresholds of the BP neural network prediction model; improving the BP neural network prediction model based on the improved whale optimization algorithm; calculating new control parameters and updating the coefficient vector A, updating the individual position according to the behavior of circling toward the prey or updating the individual position according to the shrinking and circling behavior or updating the individual position according to the prey hunting behavior; calculating the new individual fitness, tracking the new individual optimal position and the global optimal position, and outputting the global optimal solution; and outputting the actual compensated joint motion. The mutually coupled joint errors during the movement of the manipulator joints are simulated through multiple high-dimensional and high-order mathematical models, avoiding the decomposition and analysis of the coupling error factors, and compared with the parameter method compensation, it has fewer unknown quantities and has stronger universality.

[0062] Firstly, based on the structural characteristics of the six-joint robot, the movement of the robot is divided into multiple types of movement by decomposing and classifying the joint movement. Then, based on the BP neural network after secondary optimization and the previous experimental data, a prediction model from the ideal position to the compensation position under different movement types is constructed. Then, through inverse kinematics solution, a mapping model from the ideal joint movement to the compensation joint movement under the same set of DH parameters is obtained, thereby realizing the movement of the ideal joint to the compensation joint for the six-joint milling robot. This model uniformly analyzes and centrally compensates error factors such as geometric error, non-geometric error, and random error, avoids parameter identification and compensation of the robot DH parameters, and only uses joint movement to compensate for the absolute positioning accuracy error. Therefore, it has strong robustness and extremely fast response speed.

[0063] Secondly, the joint motion amount is correlated with the absolute positioning accuracy error of the robot arm. It is proposed that during the movement of the robot arm, the change of the joint motion amount not only brings about the movement of the robot arm, but also brings about the systematic periodic change of the robot arm accuracy error at the joint.

[0064] Thirdly, the traditional single six-joint linkage robot arm movement mode is subdivided, and position determination and posture determination movement modes are proposed, which realizes the "reduction" of high-dimensional motion equations. When all joints are not required to participate in the movement, the robot arm trajectory planning is decomposed and reduced, reducing the complexity of the solution and obtaining as many executable solutions as possible. Then, when faced with different shapes of parts to be processed, different robot arm linkage modes can be selected, using a small number of joints to achieve the target movement and reducing the error impact caused by joint movement.

[0065] Finally, through the BP neural network non-parametric compensation model based on quadratic optimization, a nonlinear mapping relationship between the theoretical position and the actual position is established, and a positioning error compensation algorithm that is more in line with production and processing reality, simpler and more reliable is proposed for the milling processing task of the six-shutdown industrial robot arm. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a flow chart of the robot arm positioning error compensation method based on the improved WOA-GA-BP neural network of the present invention.

[0067] Figure 2 It is a schematic diagram of the topological structure of the BP neural network prediction model of the present invention.

[0068] Figure 3 It is a schematic structural diagram of the six-joint robotic arm of the present invention. DETAILED DESCRIPTION

[0069] The following is combined with Figure 1 to Figure 3 The present invention is further described in detail:

[0070] In order to solve the problem that industrial robots are often unable to move according to the set trajectory and cannot accurately reach the specified point due to the coupling of systematic errors and random errors. Researchers have proposed a parametric method based on kinematic models and a non-parametric method based on data models. Among them, the parametric method generally refers to the compensation and optimization of the kinematic parameters of the robot model through parameter identification, parameter calibration and parameter optimization, and the adjustment of the joint angle, connecting rod length and other parameters of the robot to compensate for the impression caused by systematic errors and random errors, thereby improving the absolute positioning accuracy of the robot. Unlike the parametric method, the non-parametric method does not consider the initial parameters of the robot model. It is based on complete data drive to establish a mapping relationship between the actual posture of the end of the robot and the target position under ideal conditions, so as to quantitatively describe and compensate for the error.

[0071] The error distribution of the absolute positioning accuracy of the six-joint manipulator of the present application obeys the trajectory change, that is, different movement modes will bring different positioning errors. Most of the current existing studies are focused on the effect level, that is, the study is conducted on the reachable area of ​​the manipulator's workspace, and the regional division of the manipulator's positioning error is achieved by spatial grid division of the reachable postures in different workspaces of the manipulator, and then the accuracy compensation is performed using a parametric or non-parametric method. Since the similarity relationship of the absolute positioning vector at the end of the manipulator is linearly correlated in the Cartesian space, there is generally no large mutation. Therefore, when the manipulator moves in the workspace, the error change of the manipulator is basically uniform and has a strong regularity. Based on this regular error change, this paper abandons the traditional method of spatial grid division and compensation based on the reachable area of ​​the workspace, takes the source of error generation at the joint of the manipulator as the entry point for accuracy compensation, and innovatively proposes a method for error modeling and compensation analysis through joint motion. The study found that the change in joint error caused by the change in posture during the movement of the manipulator, that is, different joint motions will not only bring about changes in the position of the manipulator, but also increase or decrease joint errors.

[0072] Based on the above theory, this application proposes a motion decomposition method based on the characteristics of the six-joint robot body and a nonlinear function mapping method based on the back propagation neural network improved by quadratic optimization, thereby obtaining a convenient and efficient non-parametric error compensation method for the six-joint robot. The algorithm is first based on the structural characteristics of the six-joint robot. By decomposing and classifying the joint motion, the robot's motion is divided into 14 types of motion, and the traditional single six-joint linkage robot motion mode is subdivided. Position determination and posture determination motion modes are proposed, and the "reduction" of high-dimensional motion equations is realized. Then, based on the BP neural network after quadratic optimization and the pre-experimental data, a prediction model from the ideal position to the compensation position under different motion types is constructed, and then through inverse kinematics solution, a mapping model of the ideal joint motion amount to the compensation joint motion amount under the same set of DH parameters is obtained, thereby realizing the motion amount of the ideal joint to the compensation joint for the six-joint milling robot. This model uniformly analyzes and centrally compensates error factors such as geometric error, non-geometric error, and random error, avoiding parameter identification and compensation of the robot arm DH parameters, and only uses joint motion to compensate for the absolute positioning accuracy error. Therefore, it has strong robustness and extremely fast response speed.

[0073] Example 1

[0074] See attached Figure 1 As shown, the robot positioning error compensation method based on the improved WOA-GA-BP neural network includes the following steps:

[0075] S1: Input the motion type and select the motion compensation model, which includes a single-joint motion model, a double-joint linkage model, a three-joint linkage model, and a six-joint linkage model, and subdivides into 14 types of joint motion, realizing the subdivision of the traditional single six-joint linkage robot arm motion mode, and proposes position determination and posture determination motion modes, realizing the "reduction" of high-dimensional motion equations. When all joints are not required to participate in the motion, the robot arm trajectory planning is decomposed and reduced, the solution complexity is reduced, and as many executable solutions as possible are obtained. Then, when facing different shapes of parts to be processed, different robot arm linkage modes can be selected, and a small number of joints can be used to achieve the target motion, reducing the error caused by joint motion.

[0076] S2: Input the coordinates of the ideal terminal position, and after verifying that the input terminal coordinates are correct, input the coordinates of the ideal terminal position into the BP neural network prediction model, determine the topological structure of the BP neural network prediction model, and initialize the weights and thresholds of the BP neural network prediction model. The BP neural network prediction model learns and trains the local optimal solution, and adjusts the input parameters and weights of each layer in a backward propagation manner, ultimately achieving the goal of minimizing the error. For the specific structure, see Figure 2 shown.

[0077] S3: Improve the BP neural network prediction model based on the improved WOA-GA-BP neural network algorithm model: generate the initial whale population, set the initial whale initial value, obtain the chaotic sequence, adjust the convergence factor, adjust the inertia weight, and map it to the initial whale population search space, complete the initialization of WOA, calculate the fitness of the whale population, and mark the initial individual optimal position and the global optimal position. Since the prediction accuracy and iteration efficiency of the BP neural network prediction model depend greatly on the selection of the initial parameters of the model, and in complex data samples, the BP neural network prediction model is prone to fall into the local optimal trap due to improper selection of initial parameters. Therefore, this application combines the improved WOA-GA-BP neural network to improve the BP neural network prediction model to optimize the prediction accuracy and prediction speed of the BP neural network.

[0078] S4: Calculate new control parameters and update coefficient vector A, generate a random number p in the interval [0, 1], when p < 0.5 and |A| ≥ 1, update the individual position according to the behavior of circling the prey; when p > 0.5, update the individual position according to the shrinking and circling behavior or update the individual position according to the prey hunting behavior.

[0079] S5: Calculate the new individual fitness, and track the new individual optimal position and the global optimal position to determine whether the maximum iteration condition is met. If not, re-execute step S4. If so, output the global optimal solution, that is, output the optimal weight and threshold parameters, and transmit them to the BP neural network prediction model to complete the improvement of the BP neural network prediction model.

[0080] S6: Use the BP neural network prediction model for training and simulation prediction, output the actual end position coordinates, use inverse kinematics to solve the joint motion, and output the actual compensated joint motion.

[0081] The six joints of the six-joint industrial robot are marked as 1, 2, 3, 4, 5, and 6. The 14 types of joint motions are used to subdivide the traditional single six-joint linkage robotic arm motion mode, specifically six single-joint motions (1, 2, 3, 4, 5, and 6), six double-joint motions (12, 13, 23, 45, 46, and 56), and two three-joint motions (123, 456).

[0082] In this embodiment, the BP neural network prediction model in step S2 includes an input layer, a hidden layer and an output layer. The input layer has N parameters, namely x1, x2, x3, ..., x N , represents the N input parameters of the BP neural network prediction model, the output layer has a parameter y, y is the corrected prediction value, the input layer has n nodes, the output layer has 1 node, and the calculation formula for the number of nodes in the hidden layer is:

[0083]

[0084] The formula for the hidden layer result is:

[0085]

[0086] The formula for the output layer result is:

[0087]

[0088] in, represents the i-th activation unit in the l+1th layer, y m represents the mth output of the system, It represents the weight of mapping the lth layer to the l+1th layer, and the function g(x) represents the nonlinear mapping of the calculation results.

[0089] In this embodiment, the specific process of improving the BP neural network prediction model in the WOA-GA-BP prediction neural network algorithm in step S3 is as follows:

[0090] S31: setting the initial WOA whale population based on the initial parameter values ​​of the BP neural network, and performing GA algorithm optimization on the initial whale population;

[0091] S32: Optimize the BP neural network based on the WOA algorithm.

[0092] Example 2

[0093] Based on Example 1, the specific process of performing GA algorithm optimization on the initial whale population in step S31 is as follows:

[0094] S311: According to the fitness value, use the tournament method to perform a selection operation, setting the selection probability to P i , then p i The expression is:

[0095]

[0096] S312: Generate new individuals through crossover operation, setting the crossover probability to P c , set the new individuals after crossover to be Y1, Y2, Y3, ..., Y N , the intersection points are k1, k2, k3, ..., k m-1 , m is the number of crossover points, calculate the crossover probability:

[0097]

[0098] S313: Calculate the crossover probability of multi-point crossover:

[0099]

[0100] S314: Execute mutation operation: set mutation probability to P m , then the corresponding individual Y i The jth gene position y ij The variation formula is:

[0101]

[0102] Among them, δ is a random disturbance that follows a normal distribution and is used to change y ij The value of

[0103] S315: Iterate step S311 to step S314 to obtain the optimal initial whale optimization population P. In step S31, the specific process of optimizing the BP neural network based on the WOA algorithm is as follows:

[0104] S316: Optimizing the BP neural network based on the WOA algorithm includes the following steps:

[0105] S316: Whale Optimization Algorithm Surrounding Prey:

[0106] Assume that in the d-dimensional space, the current best whale individual X * The location is Whale Individual X j The location is Whale X j Under the influence of the best whale individuals, the next generation of X j+1 Location The calculation formula is,

[0107]

[0108] in Represents the spatial coordinate X j+1 The kth component of , a decreases linearly from 2 to 0 as the number of iterations increases; r1, r2 are random numbers between 0 and 1;

[0109] S317: Spiral position update: The whale individual at the current position spirals towards the best whale individual at the current position:

[0110]

[0111] Where b is the logarithmic spiral shape constant, l is a random number between -1 and 1;

[0112] S318: Whale optimization algorithm searches for prey. Suppose in d-dimensional space, a random whale individual X rand The location is Current whale individual X j The location is:

[0113]

[0114] Its mathematical model is:

[0115]

[0116] According to the WOA cycle, after satisfying the iteration conditions, the optimal individual X of the population after optimization by the WOA-GA algorithm is obtained. * , and then the initial parameters of the BP neural network are updated, and finally the training and prediction of the BP neural network based on the optimized parameters are realized.

[0117] The algorithm logic of the whale optimization algorithm in this embodiment is divided into three stages, namely, surrounding prey, foaming net attack and searching for prey. Bringing practical problems into the whale optimization algorithm, that is, a single solution can be regarded as a whale individual, and multiple solutions are multiple individuals. The overall optimization process is to continuously update the position of a single whale or multiple whales in the initial whale space, and reflect the best solution to the problem through the optimal position of the whale. However, the optimization efficiency and optimization accuracy of this method depend to a great extent on the design of the initial whale space. The randomly generated optimal space often cannot guarantee the global optimal, but expanding the search range will cause the algorithm convergence speed to decrease. Therefore, the initial whale space is optimized by an adaptive clustering method to improve the optimization ability of the WOA algorithm. On the basis of expanding the search range, it is not only guaranteed that the accuracy is improved, but also that the convergence speed is not reduced.

[0118] Example 3

[0119] Based on Example 1 or Example 2, the specific process of error compensation in step S6 is:

[0120] S61: Obtain the motion amount of each joint of the industrial robot;

[0121] S62: predict the error of the motion amount of each joint through the WOA-GA-BP prediction neural network algorithm model, and obtain the terminal positioning error of each joint through iteration, and judge whether the terminal positioning error is less than the error tolerance or whether the maximum number of iterations is reached. If one of the two is yes, output the compensation data and the final joint motion amount, otherwise, execute step S63;

[0122] S63: Obtain the actual position of the joint end, and perform error compensation based on the theoretical position of the end and the BP nonlinear fitting model to obtain the compensation amount of each joint and output the joint motion amount.

[0123] The specific calculation of the error compensation in step S6 is:

[0124] Build the error distribution of a six-joint industrial robot arm:

[0125] e(X, Y, Z)∈D={D|D(x)=f(K, θ1, θ2, θ3, θ4, θ5, θ6)};

[0126] Wherein, X, Y are the actual posture and target posture of the end of the six-joint industrial robot arm in the end Cartesian space, e(X, Y, Z) represents the robot absolute positioning error that causes the actual posture to not match the target posture, (θ1, θ2, θ3, θ4, θ5, θ6) represents the joint motion of the first joint to the sixth joint, D represents the distribution model obeyed by the absolute positioning error, which is closely related to the joint motion of the robot arm, D(x) = f(θ1, θ2, θ3, θ4, θ5, θ6), which is the mathematical model that the joint error obeys the joint motion of the six joints θ1, θ2, θ3, θ4, θ5, θ6;

[0127] Establish the distribution model of robot joint motion compensation clothing:

[0128] (Δθ1, Δθ2, Δθ3, Δθ4, Δθ5, Δθ6)∈F={F|F(x)=f(X′, Y′, Z′)};

[0129] Among them, Δθ i is the joint compensation of robot joint i, Δθ i =θ′ i -θ i , X′, Y′, Z′ are the actual positions of the robot plus the terminal prediction error. The specific calculation formula is:

[0130] X′=X+E X , Y′=Y+E Y , Z′=Z+E Z ;

[0131] Among them, F represents the distribution model obeyed by the joint compensation amount, F is related to the actual position of the robot end, F(x) = f(X′, Y′, Z′), that is, the joint motion compensation amount obeys a nonlinear function of the actual position of the end in three directions including X, Y, and Z.

[0132] In this embodiment, assuming that the DH parameters of the six-joint industrial robot remain unchanged, the variation model of the absolute positioning error of the robot end with the change of the joint motion amount remains unchanged, that is, the error change of all positions can be analyzed and modeled in a regular manner. Therefore, from the perspective of the source of the error, based on the above-mentioned WOA-GA-BP neural network, a nonlinear mapping model that can realize the prediction of the absolute positioning error at different positions in the motion space is proposed, and a prediction network of the joint motion amount and the absolute error is established. Through sufficient data samples of the pre-experiment, the correlation data set between the robot joint motion amount and the absolute positioning error of the end is obtained. Using MATLAB based on the "6 input-3 output" improved WOA-GA-BP prediction neural network between the joint motion amount of joints 1 to joints 6 and the absolute positioning error of the three directions of X, Y, and Z of the end, the WOA-GA algorithm is used to improve the initial threshold and deviation of the BP neural network, and combined with data filtering, the training effect and generalization ability of the prediction network are improved. The prediction model realizes the accurate prediction of the joint motion amount to the end error, and then combined with the robot forward kinematics analysis, the actual position of the end under different joint motion amounts and the absolute positioning error contained in the actual position can be obtained.

[0133] Based on the prediction algorithm model, the absolute positioning error of the terminal corresponding to different spatial positions (joint motion) can be obtained, and then combined with the forward kinematics analysis of the robot, the mapping relationship between the theoretical joint motion and the actual terminal position can be established. And through the inverse kinematics analysis of the actual position of the robot, the theoretical joint motion at the actual position can be obtained. Therefore, by calculating the difference between the theoretical joint motion at the actual position and the actual joint motion (theoretical joint motion at the theoretical position), the compensation amount of the theoretical joint motion at the actual position to the actual joint motion can be obtained. Then, by establishing a nonlinear relationship between the actual position of the terminal and the joint motion compensation amount, a quantitative nonlinear compensation model between the theoretical joint motion at the actual position and the actual joint motion can be obtained, and then the joint motion vector compensation for the terminal target position can be realized.

[0134] Based on the prediction method model and the compensation method model, the joint motion compensation of the end positioning error of the robot arm can be realized. The joint motion corresponds to the end position and the end absolute positioning error. Therefore, after the joint motion compensation, the theoretical joint motion of the robot changes to the actual joint motion. However, the actual end position corresponding to the actual joint motion is not necessarily the target position of the robot, because the actual joint motion will not only bring about changes in the end position, but also changes in the end positioning error. Although the positioning error of the theoretical end position can be compensated by a one-time prediction and compensation, the actual end position after compensation and the end error corresponding to the actual end position may be different from the theoretical position, and thus cannot meet the error requirements.

[0135] Therefore, in order to achieve the approximation of the actual position of the robot end, a non-parametric iterative compensation method based on prediction method and compensation method is proposed. An iterative loop is set, and by approximating the end target position in the loop, the optimal joint motion compensation amount for each target position is obtained, thereby improving the positioning accuracy of all target positions in the robot workspace.

[0136] First, the terminal positioning error is obtained based on the prediction of the joint motion, and then the actual position of the terminal is obtained based on the terminal positioning error and the theoretical position of the terminal. Then, the joint motion compensation is obtained by compensating the actual position of the terminal. The average deviation of the terminal X, Y, and Z positioning errors is set as the exit condition of the iterative loop. The loop is exited when the error is less than the error tolerance or the maximum number of cycles is reached. Otherwise, the joint motion compensation is increased to the original joint motion to obtain the compensated joint motion. The error prediction and error compensation are continued until the loop is completed.

[0137] In order to verify the rationality and accuracy of the proposed error compensation algorithm, a verification experiment was set up to verify the prediction model and the compensation algorithm. The experimental process is divided into three stages: experimental setting, prediction model verification experiment and compensation algorithm experiment. The experimental setting includes four stages: experimental test system construction, standard DH parameter table establishment, sample data collection and robot inverse kinematics solution. The verification experiment takes the SYB1506A six-joint robot as the experimental object. Based on the robot teaching programming system, the Leica AT403 laser tracker is matched with the matching target to form a six-joint industrial robot end position measurement system. The verification experiment is designed to collect sample data of the robot compensation position and target position error, verify the reliability of the experiment and error compensation model, and verify the feasibility of the compensation algorithm.

[0138] Based on the standard DH parameter table, the DH parameter modeling of the SYB1506A six-joint robot arm is established. The parameter values ​​of the parameter table meet the functional relationship between the theoretical joint motion of the robot arm and the theoretical position of the end, and the DH parameter values ​​are guaranteed to be constant during the entire experiment. Through the robot arm teaching control system, the calibrated DH parameters of the SYB1506A six-joint robot arm are output, as shown in Table 1 below.

[0139] Table 1 Calibrated SYB1506A Six joints DH Robotic Arm Parameters

[0140] joint θ d a α 1 0 410 200 pi / 2 2 0 0 585 0 3 0 0 135 pi / 2 4 0 758 0 -pi / 2 5 0 0 0 pi / 2 6 0 95 0 0

[0141] The experiment sets the joint motion as the input variable, and in order to reduce the impact of random errors, a repetitive experiment is used to set the same joint motion value, and three repetitive experiments are carried out, and all experimental data are recorded. Due to the limitations of the SYB1506A workspace and the laser tracker measurement space, the joint motion value cannot reach all reachable ranges. Therefore, the experiment sets the joint motion value in the calibration space calibrated by the laser tracker, that is, the joint motion parameter value range and the number of experiments under each motion mode are shown in Table 2 below. The joint parameter value movement adopts the random method, and the random number method is used to collect the terminal theoretical position and terminal compensation position data output by the teaching pendant and the laser tracker under various types of joint motion states to generate a data sample set.

[0142] Table 3 The range of values ​​of joint motion in different types of exercise and the number of experimental groups

[0143]

[0144] The homogeneous link transformation matrix of each joint of the SYB1506A six-joint manipulator is established to obtain the position and posture of the end of the manipulator relative to the base coordinate system.

[0145]

[0146] Use robot.ikine() of MATLAB robotics-toolbox to solve the inverse matrix equation of the robot arm, perform inverse operation on the data obtained from Table 2, and obtain the joint motion corresponding to the compensation position.

[0147] Based on the above algorithm model and sample data, this paper uses MATLAB software to build the WOA-GA-BP prediction model. The model parameter settings are shown in Table 5.

[0148] Table 3 Parameter setting values ​​of WOA-GA-BP prediction model

[0149]

[0150] Through the analysis and calculation of the data of each type of motion, the mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), mean absolute deviation (MAPE) and accuracy (ACC) data under the error tolerance of 0.1mm in the motion process of single-joint motion, double-joint linkage and three-joint linkage manipulators are obtained respectively. In addition, since there are too many types of motion involved and each type of motion has error data in the three directions of X, Y and Z, a comprehensive error analysis index R- for each type of error in the three directions of X, Y and Z under each type of motion is set for the convenience of analysis and calculation. The comprehensive error analysis index R- refers to the use of the root mean square value to comprehensively solve the errors in the three directions of X, Y and Z under each type of motion, and obtain the geometric center of the three-way error data in the ideal space. This root mean square solution can more comprehensively evaluate the error situation in the data set and more accurately reflect the distribution characteristics of the data compared to the simple average solution, and has a better effect on comparing and analyzing the differences in data sets.

[0151] The comparison tables of the comprehensive error analysis values ​​R-MAE, R-MSE, R-RMSE, R-MAPE, and R-ACC of each motion type are shown in Tables 4 to 6.

[0152] Table 4 Comparison of mean absolute errors between WOA-GA-BP prediction model and BP prediction model

[0153]

[0154] Table 5 Comparison of mean square error between WOA-GA-BP prediction model and BP prediction

[0155]

[0156] Table 6 Comparison of root mean square error between WOA-GA-BP prediction model and BP prediction model

[0157]

[0158] Table 7 Comparison of prediction accuracy between WOA-GA-BP prediction model and BP prediction model

[0159]

[0160] Verification experiments have proved that the use of neural networks can achieve the mapping from the theoretical position of the end to the compensation position, that is, the prediction from the theoretical joint motion to the compensation joint motion. Compared with the prediction effect of the BP neural network, the prediction network optimized by the WOA-GA algorithm has better prediction effect. For the WOA-GA-BP prediction network of 14 different types of motion, the average absolute errors of the X, Y, and Z coordinates of all models are 0.059mm, 0.054mm, and 0.038mm respectively; the average mean square errors are 0.019, 0.019, and 0.003 respectively; the average mean square error root is 0.078, 0.073, and 0.046; the average prediction accuracy is 88.59%, 86.42%, and 92.76%, which is a huge improvement compared to the BP prediction network.

[0161] The non-parametric compensation method based on motion decomposition and improved WOA-GA-BP prediction neural network proposed in this application is indeed effective for the positioning accuracy of the six-joint robotic arm. This accuracy compensation method shows a relatively excellent compensation effect at all trajectory points of the test trajectory. After using this compensation method, in the motion planning of the robotic arm, the absolute positioning accuracy error in the X direction is reduced to 0.11mm, a decrease of 88.99%; the absolute positioning accuracy error in the Y direction is reduced to 0.12mm, a decrease of 88.12%; the absolute positioning accuracy error in the Z direction is reduced to 0.09mm, a decrease of 91.50%, and the comprehensive trajectory error is reduced to 0.11mm, a decrease of 89.47%. Experiments have proved that this absolute positioning accuracy compensation method not only has a reliable compensation effect, but also has strong robustness and versatility.

[0162] By establishing a positioning error compensation mechanism for multiple motion types, the motion mode of the six-joint linkage is decomposed into 14 motion modes, which is widely used in applications such as milling and grinding. The positioning error is linked to the joint motion amount, and the error is analyzed from the source of the error. A positioning error compensation algorithm for a manipulator with different motion types is proposed. With the motion decomposition planning, high-quality and high-precision milling of the six-joint manipulator can be achieved. The mapping of the ideal position of the six-joint manipulator to the compensation position is realized, and the mapping of the ideal joint motion amount to the compensation joint motion amount is established in combination with the inverse motion solution algorithm of the manipulator. This prediction algorithm effectively overcomes the problems of local optimization or poor convergence in the traditional BP algorithm, and has the advantages of global optimization and fast convergence speed.

[0163] In summary, the robot positioning error compensation method based on the improved WOA-GA-BP neural network provided by the present invention inputs the motion type and selects the motion compensation model, inputs the ideal end position coordinates, initializes the weights and thresholds of the BP neural network prediction model; improves the BP neural network prediction model based on the improved whale optimization algorithm; calculates new control parameters and updates the coefficient vector A, updates the individual position according to the behavior of circling the prey or updates the individual position according to the shrinking and circling behavior or updates the individual position according to the prey hunting behavior; calculates the new individual fitness, and tracks the new individual optimal position and the global optimal position, and outputs the global optimal solution; outputs the actual compensated joint motion. The mutually coupled joint errors during the movement of the robot joints are simulated through multiple high-dimensional and high-order mathematical models, avoiding the decomposition and analysis of the coupling error factors, and compared with the parameter method compensation, it has fewer unknown quantities and has stronger universality.

[0164] Based on the structural characteristics of the six-joint manipulator, the movement of the manipulator is divided into multiple types of movement by decomposing and classifying the joint motion. Then, based on the BP neural network after secondary optimization and the previous experimental data, a prediction model from the ideal position to the compensation position under different motion types is constructed. Then, through inverse kinematics solution, a mapping model from the ideal joint motion to the compensation joint motion under the same set of DH parameters is obtained, thereby realizing the motion of the ideal joint to the compensation joint for the six-joint milling manipulator. This model uniformly analyzes and centrally compensates error factors such as geometric error, non-geometric error, and random error, avoids parameter identification and compensation of the manipulator DH parameters, and only uses joint motion to compensate for the absolute positioning accuracy error. Therefore, it has strong robustness and extremely fast response speed. The joint motion is associated with the absolute positioning accuracy error of the manipulator, and it is proposed that during the movement of the manipulator, the change of joint motion not only brings about the movement of the manipulator, but also brings about systematic periodic changes in the manipulator accuracy error at the joint. The traditional single six-joint linkage robot arm motion mode is subdivided, and the position determination and posture determination motion modes are proposed, which realizes the "reduction" of high-dimensional motion equations. When all joints are not required to participate in the motion, the robot arm trajectory planning is decomposed and reduced, the solution complexity is reduced, and as many executable solutions as possible are obtained. Then, when facing different shapes of parts to be processed, different robot arm linkage modes can be selected, and a small number of joints can be used to achieve the target motion, reducing the error impact caused by joint motion. Through the BP neural network non-parametric compensation model based on secondary optimization, a nonlinear mapping relationship between the theoretical position and the actual position is established, and a positioning error compensation algorithm that is more in line with the actual production and processing, simpler and more reliable is proposed for the milling task of the six-joint industrial robot arm.

Claims

1. A robot arm positioning error compensation method based on an improved WOA-GA-BP neural network is characterized in that: The following steps are involved: S1: input the motion type and select the motion compensation model, wherein the motion compensation model includes a single-joint motion model, a double-joint linkage model, a three-joint linkage model, and a six-joint linkage model; S2: inputting the coordinates of the ideal terminal position, and after verifying that the input terminal coordinates are correct, inputting the coordinates of the ideal terminal position into the BP neural network prediction model, determining the topological structure of the BP neural network prediction model, and initializing the weights and thresholds of the BP neural network prediction model; S3: Based on the WOA-GA-BP prediction neural network algorithm, the BP neural network prediction model is improved: the initial whale population is generated, and the initial whale initial value is set, the chaotic sequence is obtained, the convergence factor is adjusted, the inertia weight is adjusted, and it is mapped to the initial whale population search space, the WOA initialization is completed, the whale population fitness is calculated, and the initial individual optimal position and the global optimal position are marked; S4: Calculate new control parameters and update coefficient vector A, generate a random number p in the interval [0,1], and when p < 0.5 and |A| ≥ 1, update the individual position according to the behavior of circling the prey; when p > 0.5, update the individual position according to the shrinking and circling behavior or update the individual position according to the prey hunting behavior; S5: Calculate the new individual fitness, and track the new individual optimal position and the global optimal position, and determine whether the maximum iteration condition is met. If not, re-execute step S4. If so, output the global optimal solution, that is, output the optimal weight and threshold parameters, and transmit them to the BP neural network prediction model; S6: Use the improved BP neural network prediction model for training and simulation prediction, output the actual end position coordinates, use inverse kinematics to solve the joint motion, and output the actual compensated joint motion; The BP neural network prediction model in step S2 includes an input layer, a hidden layer and an output layer. The input layer has N parameters, namely , represents the N input parameters of the BP neural network prediction model, the output layer has a parameter y, y is the corrected prediction value, the input layer has n nodes, the output layer has 1 node, and the calculation formula for the number of nodes in the hidden layer is: ; The formula for the hidden layer result is: ; The formula for the output layer result is: ; in, represents the first i activation units, represents the mth output of the system, Represents the weight of the lth layer mapped to the l+1th layer, and the function g(x) represents the nonlinear mapping of the calculation results; The specific process of improving the BP neural network prediction model in the WOA-GA-BP prediction neural network algorithm in step S3 is as follows: S31: setting the initial WOA whale population based on the initial parameter values ​​of the BP neural network, and performing GA algorithm optimization on the initial whale population; S32: Optimize BP neural network based on WOA algorithm; The specific process of performing GA algorithm optimization on the initial whale population in step S31 is as follows: S311: According to the fitness value, the tournament method is used to perform the selection operation, and the selection probability is set to P i , then the expression is: ; S312: Generate new individuals through crossover operation, and set the crossover probability to P c , set the new individual after crossover to The intersection point is , m For the number of crossover points, calculate the crossover probability: ; S313: Calculate the crossover probability of multi-point crossover: ; S314: Execute mutation operation: set the mutation probability to P m , then the corresponding individual Y i The gene position y ij The variation formula is: ; in, is a random disturbance that follows a normal distribution and is used to change y ij The value of S315: iteratively executing steps S311 to S314 to obtain the optimal initial whale optimization population P; The optimization of BP neural network based on WOA algorithm includes the following steps: S316: Whale Optimization Algorithm Surrounding Prey: Assume that in the d-dimensional space, the current best whale individual The location is , individual whales X j The location is , then the whale X j Under the influence of the best whale individuals, the next generation Location The calculation formula is, ; ; in Represents spatial coordinates The kth component of a As the number of iterations increases, it decreases linearly from 2 to 0; r 1, r 2 is a random number between 0 and 1; S317: Spiral position update: The whale individual at the current position spirals towards the best whale individual at the current position: ; in, b is the logarithmic spiral shape constant, l A random number between -1 and 1; S318: Whale optimization algorithm searches for prey. Suppose that in the d-dimensional space, a random whale individual The location is , the current whale individual X j The location is: ; Its mathematical model is: 。 2. The method for compensating positioning error of a robotic arm based on an improved WOA-GA-BP neural network according to claim 1, characterized in that: The specific process of step S6 is as follows: S61: Obtain the motion amount of each joint of the industrial robot; S62: predict the error of the motion amount of each joint through the WOA-GA-BP prediction neural network algorithm model, and obtain the terminal positioning error of each joint through iteration, and judge whether the terminal positioning error is less than the error tolerance or whether the maximum number of iterations is reached. If one of the two is yes, output the compensation data and the final joint motion amount, otherwise, execute step S63; S63: Obtain the actual position of the joint end, and perform error compensation based on the theoretical position of the end and the BP nonlinear fitting model to obtain the compensation amount of each joint and output the joint motion amount.

3. The method for compensating positioning error of a robotic arm based on an improved WOA-GA-BP neural network according to claim 2, characterized in that: The specific calculation of the error compensation in step S6 is: Build the error distribution of a six-joint industrial robot arm: ; Among them, X, Y are the actual posture and target posture of the six-joint industrial robot end in the Cartesian space of the end. Indicates the absolute positioning error of the robot that causes the actual posture to not match the target posture. represents the joint motion from the first joint to the sixth joint, and D represents the distribution model obeyed by the absolute positioning error, which is closely related to the joint motion of the robot arm. , is the joint error subject to the joint motion of the six joints Mathematical model of Establish the distribution model of robot joint motion compensation clothing: ; in, For robots i The amount of joint compensation for the joint, , is the actual position of the robot plus the terminal prediction error. The specific calculation formula is: ; Among them, F represents the distribution model obeyed by the joint compensation amount, and F is related to the actual position of the robot end. , that is, the joint motion compensation amount obeys a nonlinear function including the actual position of the end in the three directions of X, Y, and Z.

Citation Information

Patent Citations

  • Position error compensation method of robot

    CN111203890A

  • Motion path planning method of tea picking mechanical arm

    CN118181305A