A method for optimizing the spatial trajectory of robot arm joints for assembly operations
Through the 5-7-5 hybrid polynomial interpolation and the Heron optimization algorithm, the joint space trajectory of the robotic arm is optimized, which solves the problem of joint impact during assembly operations and improves assembly accuracy and operating efficiency.
Patent Information
- Application Number
- CN202411124587.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-16
AI Technical Summary
During the assembly operation of the robotic arm, the end effector accuracy is reduced due to joint impact. Especially in the assembly movement of medium and heavy-duty robotic arms, it affects the positioning accuracy and assembly accuracy, and it is difficult to optimize the running time of the robotic arm.
The 5-7-5 mixed polynomial interpolation method is combined with the improved D-H parameters and the Heron optimization algorithm to optimize the joint space trajectory of the manipulator. Through inverse kinematics inverse solution and mutation strategy, the joint posture and shortest movement time are determined to reduce joint impact. and improve exercise efficiency.
Effectively reduce joint impact, improve assembly accuracy and service life, reduce robotic arm operating time, and improve operating efficiency.
Smart Images

Figure CN118636162B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent assembly, and in particular relates to a method for optimizing the space trajectory of a robot arm joint for assembly operations. Background Art
[0002] With the rapid development of China's intelligent manufacturing technology, the application of robotic arms has become more and more extensive. However, in the working process of the robotic arm, key impacts will inevitably occur, resulting in reduced accuracy of the robotic arm's end effector. Especially in the field of assembly manufacturing, the position accuracy of the robotic arm directly affects the assembly accuracy, especially in the assembly movement of medium and heavy robotic arms, the phenomenon of joint impact affecting positioning accuracy is particularly obvious; on the other hand, the assembly operation time of the robotic arm is often determined based on experience, and it is also difficult to determine the optimal operating time of the robotic arm. How to reduce joint impacts during the assembly process and maximize the reduction of the robotic arm's operating time within the operating range has become the focus of research for major scholars.
[0003] The optimization of the joint space trajectory of the robot arm can reduce the joint impact of the robot arm assembly process and improve the positioning accuracy and assembly accuracy of the actuator end. The principle is to first design the physical space motion trajectory of the end effector of the robot arm according to the assembly operation path, assembly accuracy, weight and size of the assembly parts; determine the working point of the end effector of the robot arm, solve the angle, angular velocity and angular acceleration of each joint of the robot arm with time through the inverse kinematics principle of the robot, and use the smooth function to interpolate the posture of each joint, so that the change range of the motion parameters between each point of the robot arm is small, and accurate positioning such as grasping, handling and placing can be achieved. At present, the main methods of robot arm joint space trajectory planning are polynomial interpolation trajectory planning and B-spline trajectory planning. B-spline trajectory planning is more demanding on the selection of application environment and more complex in calculation. It is not applicable to assembly operations of periodic grasping, handling and placing; polynomial interpolation trajectory planning is simpler in application form and can strictly control the joint angular velocity and angular acceleration, but high-order polynomial interpolation is prone to Runge phenomenon. Therefore, most of them use mixed polynomials to plan the trajectory of the robot arm joint space. Common polynomial mixing methods include mixing cubic polynomials with quartic polynomials, mixing cubic polynomials with quintic polynomials, etc. However, since the degree is too low, it will cause sudden changes in acceleration change control. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for optimizing the spatial trajectory of a robot arm joint for assembly operations, which solves the problem that in the assembly operations of periodic grasping, carrying and placing of the robot arm, due to the action of inertia force, the joints are impacted when starting and stopping at the working point, affecting the positioning accuracy and assembly accuracy of the end effector.
[0005] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a method for optimizing the space trajectory of a robot arm joint for assembly operations, comprising the following steps:
[0006] S1, determine the improved DH parameters of the robot arm;
[0007] S2, setting the key path points of the robot arm in the motion path and their corresponding joint pose constraints;
[0008] S3. Combined with the improved DH parameters, the inverse kinematics of the robot arm is inversely solved to determine the position and posture information of each joint of the robot arm at the key path points;
[0009] S4. Based on the posture information of each joint, a 5-7-5 mixed polynomial interpolation method is used to calculate the posture change parameters of each joint of the robotic arm, and the spatial posture curve of each joint of the robotic arm in the entire motion path is obtained;
[0010] The constraint conditions of the 5-7-5 mixed polynomial interpolation are determined according to the joint pose constraints corresponding to each key path point in each segmented path;
[0011] S5. Determine the shortest motion time of each joint of the robot arm in the motion path using the Heron Eagle optimization algorithm improved based on the mutation strategy;
[0012] S6. Taking the shortest movement time as the constraint condition, calculate the spatial posture curves of each joint of the robot arm again, and then extract the posture change parameters of each joint as the parameter setting conditions for controlling the movement of the robot arm to complete the joint space trajectory optimization.
[0013] Furthermore, in step S1, the improved DH parameters are the correspondence between each link, link torsion angle, link length, link offset, link angle and link angle variable range on the basis of establishing the first link coordinate system starting from the first active joint of the robotic arm.
[0014] Furthermore, in step S2, the joint posture includes the angle, angular velocity, angular acceleration, joint impact, and movement time of the manipulator joint in each segment path in the motion path;
[0015] The joint posture constraint is: when each joint of the robotic arm moves to each key path point, its corresponding angular velocity, angular acceleration and joint impact are all 0.
[0016] Furthermore, in step S3, the equation for the inverse solution of the inverse kinematics of the robot arm is:
[0017] ;
[0018] in:
[0019] ;
[0020] In the formula, Represents the kinematic model matrix of the six-degree-of-freedom robotic arm, Represents the DH matrix, which uses four improved DH parameters to represent the posture relationship or transformation relationship between two adjacent links. Represents the coordinate system { i -1} around Axis rotation , Represents the coordinate system { i -1} around Axis movement , Represents the coordinate system { i -1} around Axis rotation , Represents the coordinate system { i -1} around move , represents the X-axis direction in the connecting rod coordinate system, Indicates the Z-axis direction in the connecting rod coordinate system, Indicates i- The torsion angle of a connecting rod, Indicates i- 1 connecting rod length, Indicates i The connecting rod is relative to the i- 1 connecting rod offset position, Indicates connecting rod i With connecting rod i -1 angle, subscript i Indicates the number of degrees of freedom of the robot arm, and its maximum value is 6. Represents the dot product between matrices;
[0021] The DH matrix The pose information of each joint is contained in it, and the pose information of each joint of the robot at the key path point is obtained by inverting the DH matrix.
[0022] Furthermore, the step S4 is specifically as follows:
[0023] Based on the pose information of each joint at the key path points, the fifth-order polynomial and seventh-order polynomial are used alternately in each segmented path to calculate the change parameters of the angle, angular velocity and angular acceleration of each joint of the robot arm, and then the spatial pose curve of each joint of the robot arm in the entire motion path is obtained;
[0024] The general formulas of the fifth-order polynomial and seventh-order polynomial for the angles of each joint of the robot arm are:
[0025] ;
[0026] ;
[0027] The control functions of the fifth-order polynomial for the angular velocity and angular acceleration of the robot joint are:
[0028] ;
[0029] The control functions of the seventh-order polynomial for the angular velocity and angular acceleration of the robot joint are:
[0030] ;
[0031] In the formula, Represents the robot arm joint angle change function, represents the joint velocity control equation, is the joint angular velocity control equation, is the joint impact control equation, represents the polynomial coefficients, Indicates the robot arm movement time.
[0032] Furthermore, in the process of planning using 5-7-5 mixed polynomial interpolation:
[0033] For each segmented path, the polynomial coefficients are determined as the constraint conditions according to the corresponding joint posture constraints, and then the complete angular velocity and angular acceleration control functions are obtained. The change parameters of the angle, angular velocity and angular acceleration of each joint of the robot arm are calculated in combination with the set time step.
[0034] Among them, for the quintic polynomial:
[0035] The polynomial coefficients of the quintic polynomial are determined by substituting the joint angle, angular velocity and angular acceleration set at two time points in the same segmented path into the general formula of the quintic polynomial for the joint angle and the control function of the quintic polynomial for the angular velocity and angular acceleration of the robot joint. ;
[0036] For a seventh degree polynomial:
[0037] The polynomial coefficients of the seventh-order polynomial are determined by substituting the joint angle, angular velocity, angular acceleration and joint impact set at two time points in the same segmented path into the general formula of the seventh-order polynomial for the joint angle and the control function of the seventh-order polynomial for the angular velocity and angular acceleration of the robot joint. .
[0038] Furthermore, the step S5 is specifically as follows:
[0039] S51, construct the objective function with the shortest joint movement time as the optimization target of the Heron Eagle optimization algorithm, and randomly generate The population matrix X ;
[0040] in, ;
[0041] Among them, the population matrix X Each column in corresponds to a segmented path, indicating the required motion time of the robot arm joint in the segmented path. Each row represents an eagle, and each column represents the element of the solution carried by the eagle. N represents the number of preset solutions, Dim represents the number of segmented paths, that is, the dimension of the solution space in the objective function, Dim =3;
[0042] The objective function is:
[0043] ;
[0044] In the formula, Respectively represent j The movement time of each joint in three segmented paths is: represents the angular velocity during joint movement, Indicates the maximum angular velocity during joint movement;
[0045] S52, calculate the angle according to the polynomial coefficients of the 5-7-5 mixed polynomial interpolation ;
[0046] judge Is it established? is the maximum angular velocity during joint movement;
[0047] If yes, proceed to step S54;
[0048] If not, proceed to step S53;
[0049] S53, assigning the fitness value of the objective function corresponding to the current egret to infinity and performing angular velocity screening, and returning to step S52;
[0050] S54, according to the current number of iterations, updating the position of the egret eagle according to the corresponding exploration strategy;
[0051] S55, according to the updated position of the egret eagle, updating the position of the egret eagle again according to the escape strategy;
[0052] S56, performing population variation according to the current position of the egret;
[0053] S57, determining whether the maximum number of iterations has been reached;
[0054] If yes, then the result of the Heron Eagle optimization algorithm is output to obtain the shortest motion time of each joint of the robot arm in each segmented path;
[0055] If not, return to step S52.
[0056] Further, in the step S54, the exploration strategy includes a prey search phase, a prey consumption phase, and a prey attack phase;
[0057] Among them, when When searching for prey, the position update rule of the egret eagle is:
[0058] ;
[0059] In the formula, a Indicates the current iteration number, represents the maximum number of iterations, Indicates b The new state of the egret eagle in the stage of searching for prey, Represents the population matrix X The number of banks is b , the number of columns is j The population elements, and represents the random candidate solution of the iterative prey search phase, Indicates that the dimension of the random generation in the interval [0,1] is 1× Dim Array of Indicates the objective function value of calculating the position of the egret eagle with row number b in the population in the first stage exploration strategy. It means that the objective function value is calculated by taking the bth column as the solution element and substituting it into the objective function. represents the element in the bth row of the population matrix;
[0060] when When , in the stage of consuming prey, the egret eagle's position update rule is:
[0061] ;
[0062] In the formula, represents the current optimal value, RB = randn ( 1,Dim ), indicating that it is used to produce 1× Dim The matrix of randn () represents the function of generating random matrices in MATLAB. represents the element with b rows and j columns in the population matrix;
[0063] when When , in the attack prey phase, the heron eagle's position update rule is:
[0064] .
[0065] Further, in step S55, in the escape strategy, the egret eagle position update rule is:
[0066] ;
[0067] In the formula, In the stage escape strategy, the objective function value is calculated for the position of the egret eagle with row number b in the population. Indicates the escape strategy, Represents the camouflage strategy, represents the dynamic disturbance factor, Represents the function of generating random numbers in MATLAB, It means randomly generating an array of dimension (1×Dim) from a normal distribution. represents the random candidate solution of the current iteration, represents a random selection of the integer 1 or 2, , In the second stage of the escape strategy, the objective function value is calculated for the position of the egret eagle with row number b in the population. It means that the objective function value is calculated by taking the bth column as the solution element and substituting it into the objective function.
[0068] Furthermore, in step S56, the population variation formula is:
[0069] ;
[0070] In the formula, represents the element in the bth row of the population at the k+1th iteration, , and They represent the number of , , The elements of the row, represents the variation factor, , , Indicates 1~ N A random integer between .
[0071] The beneficial effects of the present invention are:
[0072] 1) The present invention performs trajectory planning on the joint space of the robot arm through 5-7-5 mixed polynomial interpolation, which can effectively reduce joint impact, improve the assembly accuracy of the robot arm, and at the same time increase the service life of the robot arm.
[0073] 2) The present invention adopts the Heron Eagle optimization algorithm based on the mutation strategy to minimize the running time of the robotic arm. On the premise of improving the convergence speed and convergence accuracy, it can greatly reduce the running time of each joint of the robotic arm within the allowable range and improve the operating efficiency of the robotic arm. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 The flowchart is a method for optimizing the space trajectory of a robot arm joint for assembly operations in an embodiment of the present invention.
[0075] Figure 2 The figure is a schematic diagram of a method for establishing a DH parameter through an improved method in an embodiment of the present invention.
[0076] Figure 3 It is the PUMA560 robot arm link coordinate system established by the improved DH parameter method in the embodiment of the present invention.
[0077] Figure 4 This is a virtual prototype model of the robotic arm in the MATLAB platform in an embodiment of the present invention.
[0078] Figure 5 Schematic diagram of the three-stage path operation sequence in an embodiment of the present invention.
[0079] Figure 6 It is a simulation trajectory based on MATLAB experiment in the embodiment of the present invention; wherein, Figure 6 (a) indicates that the end of the robot arm is at point A; Figure 6 (b) indicates that the end of the robot arm is at point B.
[0080] Figure 7 Schematic diagram of constraints on the robot arm at key path points in an embodiment of the present invention.
[0081] Figure 8 It is a schematic diagram of the sudden change of spatial acceleration of the joint of the robot arm of the present invention.
[0082] Fig. 9 Schematic diagram of the change of the fitness value of the first joint of the robot arm of the present invention.
[0083] Fig.10 Schematic diagram of the change of the fitness value of the second joint of the robot arm of the present invention.
[0084] Fig.11 Schematic diagram of the change in the fitness value of the third joint of the robotic arm of the present invention. DETAILED DESCRIPTION
[0085] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0086] The embodiment of the present invention provides a method for optimizing the space trajectory of a robot arm joint for assembly operations, such as Figure 1 As shown, the following steps are included:
[0087] S1, determine the improved DH parameters of the robot arm;
[0088] S2, setting the key path points of the robot arm in the motion path and their corresponding joint pose constraints;
[0089] S3. Combined with the improved DH parameters, the inverse kinematics of the robot arm is inversely solved to determine the position and posture information of each joint of the robot arm at the key path points;
[0090] S4. Based on the posture information of each joint, a 5-7-5 mixed polynomial interpolation method is used to calculate the posture change parameters of each joint of the robotic arm, and the spatial posture curve of each joint of the robotic arm in the entire motion path is obtained;
[0091] The constraint conditions of the 5-7-5 mixed polynomial interpolation are determined according to the joint pose constraints corresponding to each key path point in each segmented path;
[0092] S5. Determine the shortest motion time of each joint of the robot arm in the motion path using the Heron Eagle optimization algorithm improved based on the mutation strategy;
[0093] S6. Taking the shortest movement time as the constraint condition, calculate the spatial posture curves of each joint of the robot arm again, and then extract the posture change parameters of each joint as the parameter setting conditions for controlling the movement of the robot arm to complete the joint space trajectory optimization.
[0094] In an embodiment of the present invention, before performing spatial trajectory optimization, the physical spatial motion trajectory of the robot end effector is designed according to the assembly operation path, assembly accuracy, weight and size of assembly parts, and subsequent trajectory optimization is performed on this basis.
[0095] In step S1 of the embodiment of the present invention, the improved DH parameters are the correspondence between each link, link torsion angle, link length, link offset, link angle and link angle variable range on the basis of establishing the first link coordinate system starting from the first active joint of the robotic arm.
[0096] In this embodiment, in order to use the MATLAB platform to accurately solve the various posture parameters of the robot during the movement process, it is necessary to determine its accurate DH parameters; currently, the standard DH parameter method is mostly used for modeling the robot. In order to solve the singularity problem between adjacent parallel rods in the standard DH parameter method, the improved DH parameter method is used to establish the robot model in this embodiment. In this embodiment, Figure 2 As shown, the improved DH parameter method is to establish the first link coordinate system on the second joint. For the movement of the serial robot arm, the improved DH parameter method is based on the establishment of the coordinate system starting from the first active joint. The established robot arm model is more accurate, and it has clear provisions for each parameter involved in establishing the robot arm model, which is not easy to confuse, making the model establishment of different robots more accurate.
[0097] In an example of this embodiment, taking the PUMA560 robot arm as an example, the improved DH parameter table obtained according to the above method is shown in Table 1, and the connecting rod coordinate system of the PUMA560 robot arm established based on the improved DH parameters is shown in Table 1. Figure 3 As shown, in Figure 3 In this paper, based on the improved DH parameter method, ~ The connecting rod coordinate system and the connecting rod torsion angle are indicated. , connecting rod length , connecting rod offset , connecting rod angle The improved DH parameter method is more accurate for the kinematic modeling of the robot arm. Therefore, in this embodiment, the robot arm is modeled and analyzed on the MATLAB platform according to the improved DH parameters. The virtual prototype model of the robot arm on the MATLAB platform is as follows: Figure 4 shown.
[0098] Table 1 DH parameter table of PUMA560 robot improvement
[0099]
[0100] In step S2 of the embodiment of the present invention, the joint posture includes the angle, angular velocity, angular acceleration, joint impact, and the movement time of the robot joint in each segment path in the movement path;
[0101] The joint posture constraint is: when each joint of the robotic arm moves to each key path point, its corresponding angular velocity, angular acceleration and joint impact are all 0.
[0102] In one example of this embodiment, for an assembly robot, it is often necessary to stop moving after reaching a certain work point. At this time, the angular velocity, angular acceleration, and angular jerk (joint impact) of the joint movement are all 0. The specific corresponding joint posture constraints are shown in Table 2. In this embodiment, the assembly robot is controlled and a cyclic assembly path of the robot is set. Since 5-7-5 mixed polynomial interpolation is used later, a three-segment path is used as an example for experimental analysis in this example, and a total of four key path points are set. Among them, the schematic diagram of the three-segment path operation sequence is shown in FIG. Figure 5 As shown, in Figure 5 In the example, the order of key path points that the end of the robot passes through in Cartesian space is Based on this, the simulation trajectory on the MATLAB platform is as follows Figure 6 As shown (where A1 and B1 represent the first time passing through points A and B, and A2 and B2 represent the second time passing through points A and B, for a total of three paths; the Cartesian space coordinates in Table 2 are determined according to the actual robot arm handling position).
[0103] Table 2. Setting of joint poses of path points
[0104]
[0105] For example, since the present embodiment is to control the robot arm for the assembly operation scenario, each motion parameter is 0 when the robot arm reaches the target point. If the speed of the robot arm in other application scenarios is not 0 after reaching the working point, the angular velocity and angular acceleration constraints of the end of the robot arm at this working point can be set according to the actual situation. The specific constraints are shown as follows: Figure 7 As shown, Figure 7 The figure shows the principle of three-segment path constraint, which respectively represents four key path points A, B, C, and D. The change law of the angle, angular velocity, and angular acceleration between every two path points is controlled by a polynomial. That is, in the present invention, the first path segment uses a quintic polynomial to solve the change law of the angle, angular velocity, and angular acceleration in the path segment, the second path segment uses a septic polynomial to solve the change law of the angle, angular velocity, and angular acceleration in the path segment, and the third path segment uses a quintic polynomial to solve the change law of the angle, angular velocity, and angular acceleration in the path segment.
[0106] In step S3 of the embodiment of the present invention, after determining the key path points that the robot arm is to pass, in order to control the robot to achieve the predetermined trajectory, its kinematic inverse solution is also required, that is, to complete the transformation of the robot arm from Cartesian space to joint space, so as to obtain the posture changes of all joints of the robot arm at different workstations so that the end effector can work normally according to the predetermined work requirements. In this embodiment, the equation for the inverse solution of the six-degree-of-freedom inverse kinematics of the robot arm is:
[0107] ;
[0108] in:
[0109] ;
[0110] In the formula, Represents the kinematic model matrix of the six-degree-of-freedom robotic arm, Represents the DH matrix, which uses four improved DH parameters to represent the posture relationship or transformation relationship between two adjacent links. Represents the coordinate system { i -1} around Axis rotation , Represents the coordinate system { i -1} around Axis movement , Represents the coordinate system { i -1} around Axis rotation , Represents the coordinate system { i -1} around move , represents the X-axis direction in the connecting rod coordinate system, Indicates the Z-axis direction in the connecting rod coordinate system, Indicates i- The torsion angle of a connecting rod, Indicates i- 1 connecting rod length, Indicates i The connecting rod is relative to the i- 1 connecting rod offset position, Indicates connecting rod i With connecting rod i -1 angle, subscript i Indicates the number of degrees of freedom of the robot arm, and its maximum value is 6. Represents the dot product between matrices;
[0111] The DH matrix The pose information of each joint is contained in it, and the pose information of each joint of the robot at the key path point is obtained by inverting the DH matrix.
[0112] In step S4 of the embodiment of the present invention, the movement time of the initial segmented path set in Table 2 and the time step t=0.1s of the required motion simulation are set. According to the above steps, by knowing the change of the working point position of the end of the robot arm, the 5-7 mixed polynomial interpolation is used in combination with the inverse kinematics of the robot to smooth the posture curves of each joint of the robot arm, so as to obtain the angle, angular velocity, and angular acceleration change parameters of each joint of the robot arm in the entire motion path to control the movement of the robot arm.
[0113] Exemplarily, the polynomial hybrid interpolation trajectory planning is to plan the joint posture of the robot arm by using different insertion methods in the working path at one end, divide the path at one end into multiple continuous sub-paths, and alternately use quintic polynomials and septic polynomials to plan the joint space for each sub-path. In this embodiment, for the control of the cyclic handling robot arm, since 5-7-5 hybrid polynomial interpolation is used, a three-segment path is used for the experiment, and every three-segment path is a cycle in the entire cyclic assembly process.
[0114] In an example of this embodiment, the fifth-order and seventh-order polynomials are still polynomials of no less than third degree under the acceleration constraint, that is, after taking the second-order derivative with respect to time, and therefore, no sudden change will occur to the acceleration change curve.
[0115] Based on this, step S4 of the embodiment of the present invention is specifically as follows:
[0116] Based on the pose information of each joint at the key path points, the fifth-order polynomial and seventh-order polynomial are used alternately in each segmented path to calculate the change parameters of the angle, angular velocity and angular acceleration of each joint of the robot arm, and then the spatial pose curve of each joint of the robot arm in the entire motion path is obtained;
[0117] The general formulas of the fifth-order polynomial and seventh-order polynomial for the angles of each joint of the robot arm are:
[0118] ;
[0119] ;
[0120] Since the motion process requires the control of the joint angular velocity and angular acceleration, it is necessary to calculate the first-order and second-order derivatives of the quintic and septic polynomials with respect to time, that is, the desired angular velocity and angular acceleration control; specifically, the control functions of the quintic polynomial for the angular velocity and angular acceleration of the manipulator joint are:
[0121] ;
[0122] The control functions of the seventh-order polynomial for the angular velocity and angular acceleration of the robot joint are:
[0123] ;
[0124] In the formula, Represents the robot arm joint angle change function, represents the joint velocity control equation, is the joint angular velocity control equation, is the joint impact control equation, represents the polynomial coefficients, Indicates the robot arm movement time.
[0125] In this embodiment, during the planning process using 5-7-5 mixed polynomial interpolation:
[0126] For each segmented path, the polynomial coefficients are determined as the constraint conditions according to the corresponding joint posture constraints, and then the complete angular velocity and angular acceleration control functions are obtained. The change parameters of the angle, angular velocity and angular acceleration of each joint of the robot arm are calculated in combination with the set time step.
[0127] For example, since the constraints of different segmented paths are inconsistent, the polynomial degree corresponding to each segment of the path is different, and the polynomial coefficients need to be solved according to the constraints of the single segment of the path. In this embodiment, the polynomial coefficients are solved by taking the first segment of the path in Table 2 as an example, that is, within the time period t1~t2.
[0128] In this embodiment, for the quintic polynomial:
[0129] The polynomial coefficients of the quintic polynomial are determined by substituting the joint angle, angular velocity and angular acceleration set at two time points in the same segmented path into the general formula of the quintic polynomial for the joint angle and the control function of the quintic polynomial for the angular velocity and angular acceleration of the robot joint. ;
[0130] For example, a quintic polynomial requires 6 constraints to find the polynomial coefficients: , taking the constraint parameters set in Table 2 as an example, since it is a segmented path, for the first segment of the path, the angle, angular velocity, and angular acceleration parameters set at the two time points need to be substituted into the above formula, and the polynomial coefficients are calculated using the six known conditions to obtain a complete angular velocity and angular acceleration control formula, so that the angles, angular velocities, and angular accelerations of the robot's key positions can be calculated using the angular velocity and angular acceleration control function formulas based on a short time period of t=0.1s. It can also be seen from the above control function formula that the second-order derivative of the quintic polynomial with respect to time, that is, the formula for the change of joint angular acceleration, is a cubic polynomial. Therefore, fitting the angular acceleration with this formula will not result in the situation where the connection is not smooth at the key points like the first-order or second-order polynomials. The acceleration mutation situation is as follows Figure 8As shown, the acceleration planning is done with a cubic polynomial in the middle section. At t=4s and t=6s, the acceleration undergoes a significant mutation, which can cause joint impact.
[0131] In this embodiment, for a seventh-degree polynomial:
[0132] The polynomial coefficients of the seventh-order polynomial are determined by substituting the joint angle, angular velocity, angular acceleration and joint impact set at two time points in the same segmented path into the general formula of the seventh-order polynomial for the joint angle and the control function of the seventh-order polynomial for the angular velocity and angular acceleration of the robot joint. .
[0133] For example, a seventh-degree polynomial requires eight constraints to find eight unknowns. ~ , taking the constraint parameters set in Table 2 as an example, since it is a segmented path, for the first segment of the path, the angle, angular velocity, angular acceleration and joint impact parameters set at the two time points need to be substituted into the above formula, and the polynomial coefficients are calculated using the eight known conditions to obtain the complete angular velocity and angular acceleration control formula. Similarly, the angle, angular velocity and angular acceleration change parameters of each joint of the robot arm during the entire motion process can be calculated through the angular velocity and angular acceleration control formula according to the time step t=0.1s.
[0134] In this embodiment, the processing of the robot arm at two adjacent key points by the above-mentioned polynomial mixed interpolation can ensure that the angle, angular velocity, and angular acceleration curves of the robot arm have a smooth transition and no impact, and can ensure that the robot arm has high arrival accuracy.
[0135] In the embodiment of the present invention, the running time of the robot arm in each path in step S4 is determined based on experience, not the optimal movement time, and the shortest running time of the robot arm within the speed allowable range needs to be further determined by the optimization algorithm. In this embodiment, by introducing the mutation strategy of the differential evolution algorithm into the Heron Eagle optimization algorithm, the algorithm population diversity can be greatly improved, and its convergence speed and convergence accuracy can be increased.
[0136] In the embodiment of the present invention, the SBOA is a population-based method, and the optimization starts with setting a population of candidate solutions; specifically, step S5 is specifically as follows:
[0137] S51, construct the objective function with the shortest joint movement time as the optimization target of the Heron Eagle optimization algorithm, and randomly generate The population matrix X ;
[0138] in, ;
[0139] Among them, the population matrix XEach column in corresponds to a segmented path, indicating the required motion time of the robot arm joint in the segmented path. Each row represents an eagle, and each column represents the element of the solution carried by the eagle. N represents the number of preset solutions, Dim represents the number of segmented paths, that is, the dimension of the solution space in the objective function, Dim =3;
[0140] The objective function is:
[0141] ;
[0142] In the formula, Respectively represent j The movement time of each joint in three segmented paths is: represents the angular velocity during joint movement, Indicates the maximum angular velocity during joint movement;
[0143] S52, calculate the angle according to the polynomial coefficients of the 5-7-5 mixed polynomial interpolation ;
[0144] judge Is it established? is the maximum angular velocity during joint movement;
[0145] If yes, proceed to step S54;
[0146] If not, proceed to step S53;
[0147] S53, assigning the fitness value of the objective function corresponding to the current egret to infinity and performing angular velocity screening, and returning to step S52;
[0148] Specifically, this step refers to the speed judgment condition in the above objective function. The population is used as the set of initial time solutions. The angular velocity calculated by the 5-7-5 polynomial needs to be calculated through this time set. If the calculated angular velocity is greater than the maximum angular velocity of the robot joint operation, this solution will not be adopted and needs to be proposed, that is, screened out;
[0149] S54, according to the current number of iterations, updating the position of the egret eagle according to the corresponding exploration strategy;
[0150] S55, according to the updated position of the egret eagle, updating the position of the egret eagle again according to the escape strategy;
[0151] S56, performing population variation according to the current position of the egret;
[0152] S57, determining whether the maximum number of iterations has been reached;
[0153] If yes, then the result of the Heron Eagle optimization algorithm is output to obtain the shortest motion time of each joint of the robot arm in each segmented path;
[0154] If not, return to step S52.
[0155] In step S54 of this embodiment, the exploration strategy includes a prey search phase, a prey consumption phase, and a prey attack phase;
[0156] Among them, when When searching for prey, the hunting process of the egret eagle usually starts with searching for potential prey, especially snakes. The egret eagle has incredibly sharp eyesight, which enables them to quickly find snakes hidden in the tall grass of the prairie. Based on this, the egret eagle's position update rule is:
[0157] ;
[0158] In the formula, a Indicates the current iteration number, represents the maximum number of iterations, Indicates b The new state of the egret eagle in the stage of searching for prey, Represents the population matrix X The number of banks is b , the number of columns is j The population elements, and represents the random candidate solution of the iterative prey search phase, Indicates that the dimension of the random generation in the interval [0,1] is 1× Dim Array of Indicates the objective function value of calculating the position of the egret eagle with row number b in the population in the first stage exploration strategy. It means that the objective function value is calculated by taking the bth column as the solution element and substituting it into the objective function. represents the element in the bth row of the population matrix;
[0159] when When consuming prey, the egret eagle adopts a unique hunting method after discovering the snake. Unlike other birds of prey that would immediately jump in to fight, the egret eagle uses its agile footwork and maneuvers around the snake. Based on this, the egret eagle's position update rule is:
[0160] ;
[0161] In the formula, represents the current optimal value, RB = randn ( 1,Dim ), indicating that it is used to produce 1× DimThe matrix of randn () represents the function of generating random matrices in MATLAB. represents the element with b rows and j columns in the population matrix;
[0162] when When the snake is exhausted during the attack phase, the egret eagle senses the right moment and quickly takes action, using its powerful leg muscles to attack. Based on this, the egret eagle's position update rule is:
[0163] .
[0164] In step S55 of this embodiment, in the escape strategy, the natural enemies of egrets are large carnivores. When encountering these threats, egrets usually adopt various escape strategies to protect themselves or their food. These strategies can be roughly divided into two categories. The first strategy is to escape or run fast, and the second strategy is camouflage.
[0165] When egrets detect the vicinity of a predator, they first look for a suitable camouflage environment. If there is no suitable and safe camouflage environment nearby, they will choose to fly or run quickly to escape. In this case, a dynamic disturbance factor is introduced, denoted as This dynamic disturbance factor helps the algorithm strike a balance between exploration (finding new solutions) and exploitation (using known solutions). Based on this, in the escape strategy, the position update rule of the egret eagle is:
[0166] ;
[0167] In the formula, In the stage escape strategy, the objective function value is calculated for the position of the egret eagle with row number b in the population. Indicates the escape strategy, Represents the camouflage strategy, represents the dynamic disturbance factor, Represents the function of generating random numbers in MATLAB, It means randomly generating an array of dimension (1×Dim) from a normal distribution. represents the random candidate solution of the current iteration, represents a random selection of the integer 1 or 2, , In the second stage of the escape strategy, the objective function value is calculated for the position of the egret eagle with row number b in the population. It means that the objective function value is calculated by taking the bth column as the solution element and substituting it into the objective function.
[0168] In step S56 of the present embodiment, in order to improve the convergence speed and convergence accuracy of the Heron Eagle optimization algorithm, after each iteration of the Heron Eagle algorithm, each generation of population is mutated based on the previous generation of population, and the population value is continuously mutated toward the optimal value through iterative screening of the Heron Eagle algorithm. The randomness of the population is improved through the population mutation strategy, so as to improve the diversity of the population and avoid falling into the local optimum.
[0169] The population mutation formula is:
[0170] ;
[0171] In the formula, represents the element in the bth row of the population at the k+1th iteration, , and They represent the number of , , The elements of the row, represents the variation factor, , , Indicates 1~ N A random integer between .
[0172] For example, in this embodiment, 100 groups of three-segment path running times are randomly generated as the basic population, and the shortest running time of each joint of the robot arm in the three-segment path is finally determined through iterative optimization of the Heron Eagle optimization algorithm improved based on the mutation strategy, and the time required by the joint with the longest running time in the path is used as the common running time of all joints in the path, ensuring that each joint in the path can move within the speed allowable range. Finally, the shortest total running time required in the three-segment path is determined.
[0173] The embodiment of the present invention provides a specific experimental example of the above-mentioned joint shortest running time optimization method.
[0174] In this embodiment, taking the PUMA560 robotic arm as an example, the robotic arm cyclic assembly path and corresponding constraints are set, and a simulation experiment is performed based on the MATLAB platform to verify, and the method of the present invention is compared with the particle swarm algorithm and the improved particle swarm algorithm, which reflects the advantages and feasibility of the algorithm of the present invention. Table 3 is the time comparison of the first three joints after optimization by the three algorithms. The set path parameters are shown in Table 2, where the initial time t1=0s, t2=3s, t3=6s, t4=9s, and the total movement time is 9s. On this basis, the shortest movement time of each joint is determined by the improved Heron Eagle optimization algorithm.
[0175] Through the analysis of Table 3, the optimal fitness values of the three joints after optimization of the egret eagle algorithm based on the mutation strategy are 3.7791s, 3.2026s, and 4.4886s, respectively, which are lower than the optimal fitness values of the other two algorithms, and the convergence accuracy is improved; for the determination of the total duration of movement, since the movement time of the six joints is inconsistent in different paths, the segment duration in the three-segment path should be based on the longest movement time in the six joints, otherwise taking a shorter movement time will cause the joints that need longer movement time to break through the maximum joint movement speed limit, so the final total movement duration after the egret eagle algorithm planning based on the mutation strategy is 4.4885s, and the movement time of each joint is as shown in Table 4, which is lower than the 4.5489s after the basic particle algorithm is optimized and the 4.5754s after the improved particle swarm algorithm is optimized. The final total movement duration after the algorithm planning of the present invention is reduced by 50.12% compared to the initial 9s total duration.
[0176] As for the performance of the three algorithms in terms of convergence speed, taking the first joint as an example, the standard particle swarm algorithm tends to converge at the 82nd generation, the improved particle swarm algorithm tends to converge at the 150th generation, and the egret eagle algorithm based on mutation strategy tends to converge at the 35th generation. Compared with the first two algorithms, the convergence speeds are increased by 56% and 76% respectively. The convergence speeds of the remaining joints are significantly improved.
[0177] The iterative process of the three algorithms for the first three joints is as follows: Figure 9-11 As shown, it can be seen that when observing the convergence accuracy of the three algorithms in the figure, the convergence speed and convergence accuracy of the algorithm of the present invention are significantly higher than those of the other two algorithms when the curve area converges, that is, the value is the smallest when tending to converge; when observing the convergence speed of the three algorithms, the number of iterations of the algorithm of the present invention when tending to converge is significantly less than that of the other two algorithms, that is, the algorithm of the present invention has a higher convergence speed and convergence accuracy. The key data of the fitness curve in iterative changes are now sorted out.
[0178] Table 3 Comparison of key data
[0179]
[0180] Table 4 The movement time of each joint after optimization of the method of the present invention
[0181]
[0182] Note: The bold data in Table 4 is the longest time in this segment, that is, the unified movement time of all joints in this segment.
[0183] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
[0184] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A method for optimizing the space trajectory of a robot arm joint for assembly operations, characterized in that: The following steps are involved: S1, determine the improved DH parameters of the robot arm; S2. Set the key path points of the robotic arm in the motion path and its corresponding joint posture constraints; S3. Combined with the improved DH parameters, by finding the inverse kinematic solution of the robot arm, determine the position information of the joints of the robot arm at the critical path point; S4. Based on the posture information of each joint, a 5-7-5 mixed polynomial interpolation method is used to calculate the posture change parameters of each joint of the robotic arm, and the spatial posture curve of each joint of the robotic arm in the entire motion path is obtained; The constraints of the 5-7-5 mixed polynomial interpolation are determined based on the joint pose constraints corresponding to each critical path point in each segmented path; S5. The Hero Eagle Optimization Algorithm improved based on the mutation strategy determines the shortest motion time of each joint of the robotic arm in the motion path; S6. Taking the shortest motion time as a constraint, the spatial posture curves of each joint of the robotic arm are calculated again, and then the posture change parameters of each joint are extracted as parameter setting conditions for controlling the motion of the robotic arm, thereby completing the joint space trajectory optimization; The step S5 is specifically as follows: S51, construct the objective function with the shortest joint movement time as the optimization target of the Heron Eagle optimization algorithm, and randomly generate The population matrix X ; in, ; Among them, the population matrix X Each column in corresponds to a segmented path, indicating the required motion time of the robot arm joint in the segmented path. Each row represents an eagle, and each column represents the element of the solution carried by the eagle. N Indicates the number of preset solutions. Dim represents the number of segmented paths, that is, the dimension of the solution space in the objective function, Dim =3; The objective function is: ; In the formula, Respectively represent j The movement time of each joint in three segmented paths is: represents the angular velocity during joint movement, Indicates the maximum angular velocity during joint movement; S52, calculate the angle according to the polynomial coefficients of the 5-7-5 mixed polynomial interpolation ; judge Is it established? is the maximum angular velocity during joint movement; If yes, proceed to step S54; If not, proceed to step S53; S53. Assign the fitness value of the current target function corresponding to the Heron Eagle to infinite and perform angular velocity filtering, and return to step S52; S54. According to the current number of iterations, the Heron Eagle position is updated according to the corresponding exploration strategy; S55. According to the updated heron position, the escape strategy will be updated again; S56. Conduct population mutation according to the current location of the Heron Eagle; S57, determining whether the maximum number of iterations has been reached; If so, the results of the Heron Eagle optimization algorithm are output to obtain the shortest motion time of each joint of the robotic arm in each segmented path; If not, return to step S52. In step S56, the population variation formula is: ; In the formula, represents the element in row b of the population at the k+1th iteration, , and They represent the number of , , The elements of the row, represents the variation factor, , , Indicates 1~ N A random integer between .
2. The method for optimizing the joint space trajectory of a robot arm for assembly operations according to claim 1, characterized in that: In step S1, the improved DH parameters are the correspondence between each link, link torsion angle, link length, link offset, link angle and link angle variable range on the basis of establishing the first link coordinate system starting from the first active joint of the robot arm.
3. The method for optimizing the joint space trajectory of a robot arm for assembly operations according to claim 1, characterized in that: In the step S2, the joint position includes the angle of the joint, the angular velocity, the angular acceleration, the joint impact, and the movement time of the robotic arm joint in each segmented path in the motion path; The joint position constraint is that when each joint of the robot arm moves to each critical path point, its corresponding angular velocity, angular acceleration and joint impact are all 0.
4. The method for optimizing the joint space trajectory of a robot arm for assembly operations according to claim 1, characterized in that: In the step S3, the equation to find the inverse solution of the inverse kinematics of the robot is: ; in: ; In the formula, Represents the kinematic model matrix of the six-degree-of-freedom robot, Represents the DH matrix, which uses four improved DH parameters to represent the posture relationship or transformation relationship between two adjacent links. Represents the coordinate system { i -1} around Axis rotation , Represents the coordinate system { i -1} Along Axis movement , Represents the coordinate system { i -1} around Axis rotation , Represents the coordinate system { i -1} Along move , represents the X-axis direction in the connecting rod coordinate system, Indicates the Z-axis direction in the connecting rod coordinate system, Indicates i- The torsion angle of a connecting rod, Indicates i- 1 connecting rod length, Indicates i The connecting rod is relative to the i- 1 connecting rod offset position, Indicates connecting rod i With connecting rod i -1 angle, subscript i Indicates the number of degrees of freedom of the robot arm, and its maximum value is 6. Represents the dot product between matrices; The DH matrix The pose information of each joint is contained in it, and the pose information of each joint of the robot at the key path point is obtained by inverting the DH matrix.
5. The method for optimizing the space trajectory of a robot arm joint for assembly operations according to claim 3, characterized in that: The step S4 is specifically as follows: Based on the pose information of each joint at the key path points, the fifth-order polynomial and seventh-order polynomial are used alternately in each segmented path to calculate the change parameters of the angle, angular velocity and angular acceleration of each joint of the robot arm, and then the spatial pose curve of each joint of the robot arm in the entire motion path is obtained; Among them, the general formulas of the five-degree polynomial and the seventh-degree polynomial with respect to the joint angles of the robotic arm are: ; ; The control functions of the five-degree polynomial for the angular velocity and angular acceleration of the robotic arm joint are respectively: ; The control functions of the seventh-degree polynomial for the angular velocity and angular acceleration of the robotic arm joint are respectively: ; In the formula, Represents the robot arm joint angle change function, represents the joint velocity control equation, is the joint angular velocity control equation, is the joint impact control equation, represents the polynomial coefficients, Indicates the robot arm movement time.
6. The method for optimizing the space trajectory of the robot arm joint for assembly operations according to claim 5, characterized in that, In the process of planning using 5-7-5 mixed polynomial interpolation: For each segmented path, the polynomial coefficients are determined as the constraint conditions according to the corresponding joint posture constraints, and then the complete angular velocity and angular acceleration control functions are obtained. The change parameters of the angle, angular velocity and angular acceleration of each joint of the robot arm are calculated in combination with the set time step. Among them, for the quintic polynomial: The polynomial coefficients of the quintic polynomial are determined by substituting the joint angle, angular velocity and angular acceleration set at two time points in the same segmented path into the general formula of the quintic polynomial for the joint angle and the control function of the quintic polynomial for the angular velocity and angular acceleration of the robot joint. ; For a seventh degree polynomial: The polynomial coefficients of the seventh-order polynomial are determined by substituting the joint angle, angular velocity, angular acceleration and joint impact set at two time points in the same segmented path into the general formula of the seventh-order polynomial for the joint angle and the control function of the seventh-order polynomial for the angular velocity and angular acceleration of the robot joint. .
7. The method for optimizing the space trajectory of a robot arm joint for assembly operations according to claim 1, characterized in that: In said step S54, the exploration strategy includes a prey search phase, a prey consumption phase, and a prey attack phase; Among them, when When the prey search phase, the Hermit position update rules are: ; In the formula, a Indicates the current iteration number, represents the maximum number of iterations, Indicates b The new state of the egret eagle in the stage of searching for prey, Represents the population matrix X The number of banks is b , the number of columns is j The population elements, and represents the random candidate solution of the iterative prey search phase, Indicates that the dimension of the random generation in the interval [0,1] is 1× Dim Array of Indicates the objective function value of calculating the position of the egret eagle with row number b in the population in the first stage exploration strategy. It means that the objective function value is calculated by taking the bth column as the solution element and substituting it into the objective function. represents the element in the bth row of the population matrix; when When, during the prey consumption stage, the Hermit position update rule is: ; In the formula, represents the current optimal value, RB = randn ( 1,Dim ), indicating that it is used to produce 1× Dim The matrix of randn () represents the function of generating random matrices in MATLAB. Represents elements in the population matrix with rows b and columns j; when When , in the attack prey phase, the heron eagle's position update rule is: 。 8. The method for optimizing the space trajectory of a robot arm joint for assembly operations according to claim 1, characterized in that: In the step S55, in the escape strategy, the Heron position update rule is: ; In the formula, Indicates that in the stage escape strategy, the objective function value is calculated at the position of the Heron Hawk with row number b in the population. Indicates the escape strategy, Represents the camouflage strategy, represents the dynamic disturbance factor, Represents the function of generating random numbers in MATLAB, Represents an array with randomly generated dimensions of (1×Dim) from a normal distribution. represents the random candidate solution of the current iteration, represents a random selection of the integer 1 or 2, , Indicates that in the second stage escape strategy, the objective function value is calculated at the position of the Heron Hawk with row number b in the population. Represents the objective function value taken by column b as the solution element, brought into the objective function and calculated.
Citation Information
Patent Citations
Mechanical arm trajectory planning method and system based on improved white shark optimization algorithm
CN116423516A
Leg type mobile robot
JP2004195554A
Method and device for determining a time-optimal trajectory
US20240238974A1
Cited By
Industrial robot work trajectory optimization method
CN123149980A
