Joint trajectory optimization method and device for collaborative robot
By optimizing the joint trajectories of collaborative robots using an improved non-dominated sorting genetic algorithm and B-spline curve functions, the problems of local optima and slow convergence speed were solved, resulting in better trajectory planning and improved stability and energy efficiency of robot motion.
Patent Information
- Application Number
- CN202411310981.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-09-19
AI Technical Summary
Existing non-dominated sorting genetic algorithms are prone to getting stuck in local optima in multi-objective trajectory optimization of collaborative robots, making it difficult to allocate weights reasonably, resulting in insufficient solution diversity and slow convergence speed.
An improved non-dominated sorting genetic algorithm is adopted, which combines a seventh-order B-spline curve function and a Logistic chaotic mapping to optimize the joint trajectory of a collaborative robot. By adjusting the crossover probability and mutation probability, a Pareto optimal solution set is generated, taking into account multiple objective functions such as time, energy and impact.
The optimized robot joint trajectory has a shorter running time, lower energy consumption, and less motion impact, which improves motion stability and the reliability of trajectory planning.
Smart Images

Figure CN118990501B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of collaborative robot motion trajectory planning, and more particularly, to a joint trajectory optimization method and device for a collaborative robot. BACKGROUND
[0002] A collaborative robot refers to a robot that can work with humans on a production line. Compared with traditional industrial robots, a collaborative robot has higher flexibility and safety, and can work with humans in the same workspace without additional safety facilities. This feature makes the collaborative robot have obvious advantages in some scenarios that require flexible production and human-robot collaborative work. Trajectory planning, as the core of robot grasping control, fundamentally determines the performance of the robot. Excellent trajectory planning can improve the work efficiency of the robot, reduce energy consumption, and reduce joint wear caused by vibration and impact, thereby improving the service life of the industrial robot, on the basis of ensuring the completion of the work task. SUMMARY
[0003] To solve the above problems, the present disclosure provides a joint trajectory optimization method and device for a collaborative robot, a computing system and a computer readable storage medium, which can solve the problem that the non-dominated sorting genetic (NSGA-II) algorithm converges slowly and easily falls into a local optimal solution in the target optimization process.
[0004] According to an aspect of the present disclosure, a joint trajectory optimization method for a collaborative robot is provided, which includes: interpolating spatial path points of an end effector of a mechanical arm of the collaborative robot by using a seventh-degree B-spline curve function to obtain B-spline trajectory curves of each joint; taking numerical values of control vertices of the B-spline trajectory curves of each joint as optimization variables, and determining a Pareto optimal solution set of the numerical values of the control vertices of the B-spline trajectory curves of each joint by using a non-dominated sorting genetic algorithm; and determining a planning scheme of joint trajectories of the collaborative robot based on the Pareto optimal solution set, wherein the non-dominated sorting genetic algorithm includes: determining an adjusted crossover probability based on an initial crossover probability, a predetermined gain factor, a standard deviation of fitness of a child population, and an average fitness of the child population; determining an adjusted mutation probability based on an initial mutation probability, the predetermined gain factor, the standard deviation of fitness of the child population, and the average fitness of the child population; and performing crossover and mutation operations on the child population based on the adjusted crossover probability and the adjusted mutation probability to generate a new child population.
[0005] Optionally, the non-dominated sorting genetic algorithm further comprises: setting initialization related parameters of the non-dominated sorting genetic algorithm, and generating initial seeds of a population to determine an initial population, wherein the initialization related parameters comprise a population size, a mutation probability, a crossover probability, a maximum iteration number, motion constraints of joint trajectories, and motion characteristic constraints of the robot arm itself; determining a dominant population in the initial population based on a fitness function that is an objective function of joint trajectory optimization of the collaborative robot; determining a crowding degree of each individual in the dominant population; and selecting a number of individuals equal to the population size from a set of individuals in a dominant position as a child population based on the crowding degree of each individual.
[0006] Optionally, the non-dominated sorting genetic algorithm further comprises: after generating a new child population, increasing the iteration number by 1; merging the child population and the new child population to determine a crowding degree of each individual in the merged population; selecting a number of individuals equal to the population size from a set of individuals in a dominant position as a new population based on the crowding degree of each individual in the merged population; determining an adjusted mutation probability and a mutation probability for the new population and performing crossover and mutation operations thereon to generate a child population of the new population, and increasing the iteration number by 1; repeating the steps of population merging, new population determination, and child population generation of the new population until the iteration number reaches the maximum iteration number to obtain a Pareto optimal solution set corresponding to the objective function.
[0007] Optionally, the crowding degree of each individual is determined based on a number of objective functions and a value of each individual on the objective functions.
[0008] Optionally, the step of generating initial seeds of a population comprises: generating initial seeds of a population using a Logistic chaotic mapping.
[0009] Optionally, the objective function comprises a function representing a time for an end effector of the robot arm to move from an initial pose to a termination pose, a function representing an average acceleration of a joint, a function representing an energy consumed by a joint, and a function representing a joint pulsation.
[0010] Optionally, the motion constraints of the joint trajectories comprise maximum values of control vertices of B-spline velocity, acceleration, and jerk trajectory curves of corresponding joints, and the motion characteristic constraints of the robot arm itself comprise maximum values of joint torque, joint velocity, joint acceleration, joint jerk, and joint displacement.
[0011] According to another aspect of the present disclosure, a joint trajectory optimization device of a collaborative robot is provided, which includes: an interpolation unit configured to interpolate spatial path points of an end effector of a mechanical arm of the collaborative robot by using a seven-degree B-spline curve function to obtain a B-spline trajectory curve of each joint; a solving unit configured to determine a Pareto optimal solution set of a value of a control vertex of the B-spline trajectory curve of each joint by using a non-dominated sorting genetic algorithm with the value of the control vertex of the B-spline trajectory curve of each joint as an optimization variable; and a planning unit configured to determine a planning scheme of a joint trajectory of the collaborative robot based on the Pareto optimal solution set, wherein the non-dominated sorting genetic algorithm includes: determining an adjusted crossover probability based on an initial crossover probability, a predetermined gain factor, a standard deviation of fitness of a child population, and an average fitness of the child population; determining an adjusted mutation probability based on an initial mutation probability, the predetermined gain factor, the standard deviation of fitness of the child population, and the average fitness of the child population; and performing a crossover and mutation operation on the child population based on the adjusted crossover probability and the adjusted mutation probability to generate a new child population.
[0012] Optionally, the non-dominated sorting genetic algorithm further includes: setting initialization related parameters of the non-dominated sorting genetic algorithm, and generating initial seeds of a population to determine an initial population, wherein the initialization related parameters include a population size, a mutation probability, a crossover probability, a maximum number of iterations, a motion constraint of the joint trajectory, and a motion characteristic constraint of the mechanical arm itself; determining a dominant population in the initial population based on a fitness function serving as an objective function of the joint trajectory optimization of the collaborative robot; determining a crowding degree of each individual in the dominant population; and selecting a number of individuals equal to the population size from a set of individuals in a dominant position as a child population based on the crowding degree of each individual.
[0013] Optionally, the non-dominated sorting genetic algorithm further includes: after generating the new child population, adding 1 to the number of iterations; merging the child population and the new child population to determine a crowding degree of each individual in the merged population; selecting a number of individuals equal to the population size from a set of individuals in a dominant position as a new population based on the crowding degree of each individual in the merged population; determining the adjusted mutation probability and the mutation probability for the new population and performing a crossover and mutation operation thereon to generate a child population of the new population, and adding 1 to the number of iterations; repeating the steps of population merging, new population determination, and child population generation of the new population until the number of iterations reaches the maximum number of iterations to obtain a Pareto optimal solution set corresponding to the objective function.
[0014] Optionally, the crowding degree of each individual is determined based on a number of objective functions and a value of each individual on the objective functions.
[0015] Optionally, the step of generating initial seeds of the population comprises generating initial seeds of the population by using a Logistic chaotic mapping.
[0016] Optionally, the objective function comprises a function representing a time for the end effector of the robot arm to move from an initial pose to a final pose, a function representing an average acceleration of the joint, a function representing an energy consumed by the joint, and a function representing a joint jerk.
[0017] Optionally, the motion constraints of the joint trajectory comprise maximum values of control points of B-spline velocity, acceleration, jerk trajectory curves of the corresponding joint, and the self-motion characteristics constraints of the robot arm comprise maximum values of joint torque, joint velocity, joint acceleration, joint jerk and joint displacement.
[0018] According to another aspect of the present disclosure, there is provided a computing system comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, cause the at least one computing device to perform the joint trajectory optimization method of the collaborative robot as described above.
[0019] According to still another aspect of the present disclosure, there is provided a computer-readable storage medium storing instructions, wherein the instructions, when executed by at least one computing device, cause the at least one computing device to perform the joint trajectory optimization method of the collaborative robot as described above.
[0020] By employing the present disclosure, the problem of premature falling into a local optimal solution of the non-dominated sorting genetic algorithm in the solving process of the multi-objective trajectory optimization model of the collaborative robot can be avoided, the optimized joint trajectory of the robot has a shorter running time, lower energy consumption, smaller motion impact and better smoothness, thereby ensuring the motion stability of the robot. BRIEF DESCRIPTION OF DRAWINGS
[0021] The above and / or other aspects and advantages of the present disclosure will become apparent and more readily appreciated from the following description, taken in conjunction with the accompanying drawings, in which:
[0022] Figure 1 is a flowchart illustrating a joint trajectory optimization method of a collaborative robot according to an exemplary embodiment of the present disclosure;
[0023] Figure 2 is a diagram illustrating a joint trajectory planning process of a robot;
[0024] Figure 3 is a flowchart illustrating a non-dominated sorting genetic algorithm (NSGA-II) algorithm according to an exemplary embodiment of the present disclosure;
[0025] Figure 4is a block diagram illustrating a joint trajectory optimization apparatus of a collaborative robot according to an example embodiment of the present disclosure;
[0026] Figures 5A to 5F is a curve diagram of velocity, acceleration, and jerk of six joints according to an example of the present disclosure;
[0027] Figure 6 is a block diagram illustrating a computing system including at least one computing device and at least one storage device storing instructions according to an example embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] A description of a specific embodiment follows, with reference to the accompanying drawings, to assist in providing a thorough understanding of methods, apparatuses, and / or systems described herein. Various changes, modifications, and equivalents can be used based on the disclosure of this application. For example, the order of the operations described herein is merely an example and is not limited to those set forth herein, but can be changed as will be apparent after an understanding of the disclosure of this application, except for operations that must occur in a particular order. Furthermore, descriptions of features known to those of ordinary skill in the art can be omitted for the sake of clarity and conciseness.
[0029] Generally, in the practical application of collaborative robots, it is necessary to first plan a spatial path for the end-effector of the robot arm from a specified starting point to an end point, at which time the planned path is purely physical spatial information. After trajectory planning, a specific plan is obtained for passing through a number of waypoints between the above-mentioned paths (for example, passing through a certain point at what time, at what speed, and with what acceleration). Collaborative robots are often used in unstructured environments that require frequent task changes or adjustment of working modes. In different working environments, different optimizations of the motion trajectory of the robot are required. For example, some tasks may focus more on fast completion (i.e., shortest time), while other tasks may focus more on energy saving (i.e., energy optimal), and some tasks may require smooth motion to reduce impact on precision equipment (i.e., minimum impact). Therefore, single-objective trajectory optimization is difficult to meet the application requirements of complex situations, and more and more attention has been paid to multi-objective trajectory optimization, considering selecting the most suitable trajectory for each environment under different working scenarios. The traditional method is to convert the multi-objective problem into a single-objective problem, and then use a single-objective optimization method for optimization, but the problem with this method is that it is difficult to reasonably allocate weights, the diversity of solutions is insufficient, and it may fall into a local optimal solution.
[0030] Due to the advantages of non-dominated sorting genetic algorithm (NSGA-II) such as parallelism, robustness, and strong adaptability, it is suitable for solving the multi-objective trajectory optimization task of collaborative robots. However, since the non-dominated sorting genetic algorithm is a group-based algorithm, its results are easily affected by the initial population. If the initial population is not good enough, it may fall into a local optimal solution. At the same time, the non-dominated sorting genetic algorithm has limited processing capacity for non-convex, multi-peak and other problems, which may result in low search efficiency and slow convergence speed. In summary, in the practical application of collaborative robots, in order to obtain a better trajectory planning scheme, factors such as work efficiency, energy consumption, and smoothness need to be considered. However, traditional multi-objective optimization research is difficult to reasonably allocate weights, and the diversity of solutions is insufficient, and it may fall into a local optimal solution. Moreover, using traditional genetic algorithms to solve the multi-objective trajectory optimization of collaborative robots may easily fall into premature convergence.
[0031] The present disclosure employs an intelligent multi-objective optimization algorithm to achieve multi-objective optimization of the joint trajectory of a collaborative robot. Specifically, it relates to a multi-objective trajectory optimization method for collaborative robots based on an improved non-dominated sorting genetic algorithm. The method takes as objective functions the shortening of the working time of the robot, the reduction of energy consumption, and the reduction of motion impact, and uses the non-dominated sorting genetic algorithm to optimize the joint trajectory of the robot. Ultimately, a trajectory planning scheme with better comprehensive performance can be obtained. Various limiting factors are considered to perform multi-objective trajectory optimization. At the same time, the algorithm is improved to improve the premature convergence problem that may occur in the non-dominated sorting genetic algorithm.
[0032] Figure 1 is a flowchart showing a joint trajectory optimization method for a collaborative robot according to an example embodiment of the present disclosure. Figure 2 is a diagram showing the joint trajectory planning process of a robot. Referring to Figure 2 Before the robot performs a task, the joint trajectory of each joint needs to be planned according to the task requirements. The path nodes of the joints are generated according to the task requirements. Each joint on the robot must pass through each path node in turn to complete the task under the kinematic constraint condition.
[0033] As shown in Figure 1 , in step S101, a seven-degree B-spline curve function is used to interpolate the spatial path points of the end effector of the collaborative robot's mechanical arm to obtain the B-spline trajectory curve of each joint.
[0034] In the example, the joint position nodes that the robot must pass through to complete the task are:
[0035] m Θ=[ m θ0 m θ1 …m θ n ] T .
[0036] In the above formula, m θ i is the i-th position of the m-th joint of the robot, i = 0, 1, 2, …, n; m = 1, 2, …, M, where M is the number of joints of the robot (for example, M = 6); n + 1 is the number of joint path points.
[0037] The time node corresponding to the joint position node can be represented as:
[0038] T = [t0 t1 … t n ].
[0039] Based on the standard B-spline basis function, the seven B-spline curve function is used to interpolate the spatial path points of the terminal mechanism of the robot from the starting point to the ending point. The expression of the i-th 7 B-spline curve interpolation trajectory of the m-th joint of the robot is:
[0040]
[0041] Wherein, m = 1, 2, …, M (M is the number of joints of the robot); m p i (x) is the i-th 7 B-spline curve interpolation trajectory of the m-th joint of the robot; x is the node of the 7 B-spline curve, is the normalized time vector; B j,7 (x) is the 7 B-spline basis function; m a j is the j-th B-spline curve control point of the n-th joint of the robot; n + 1 is the number of joint path points. The segment connection points of the curve are one-to-one corresponding to the nodes in the B-spline definition domain, and the first and last endpoints are consistent with the first and last data points. The B-spline interpolation curve is composed of n + 7 control vertices a j (i = 0, 1, …, n + 7-1) and node vector X = [x0, x1, …, x n+14 ]; The repetition degree of the two end nodes is 8, that is, x0 = x1 = … = x7 = 0, x n+7 = x n+7+1 = … = x n+14 = 1, the time node T is standardized to obtain the node sequence X of the B-spline interpolation curve of the joint. The exact value of the unknown node; this will provide a basis for subsequent solving of joint position, velocity and acceleration trajectory.
[0042] The value of the unknown node of the B-spline interpolation curve can be represented as:
[0043]
[0044] In the above formula, Δt k = T i-k -t i-k-1 (k = 0, 1,..., n-1) is the chord length, T = t m -t0is the total running time of the robot to complete the task.
[0045] The node values in the spline curve domain [x7, x n+7 ] are substituted into the above formula in turn, and then n+1 equations satisfying the interpolation conditions are obtained:
[0046]
[0047] In the above formula, x i+7 ∈ [x7, x m+7 ], i = 0, 1,..., m. Therefore, 7-1 additional equations need to be added to solve them simultaneously. Generally, the tangent boundary condition is taken, for example, a 7-order B-spline curve is taken, and the start and stop speeds v s , v e , the start and stop accelerations a s , a e and the start and stop jerks j s , j e are specified. The additional 6 equations are as follows:
[0048]
[0049] In the above formula, p'(x), p''(x), p'''(x) are the 1st, 2nd and 3rd derivatives of the B-spline curve respectively, representing the velocity, acceleration and jerk of each joint.
[0050] Each order of derivative can be obtained according to the De Boor recurrence formula:
[0051]
[0052] Wherein:
[0053]
[0054] Thus, n+7 linear equations are obtained. By solving the equation set, the control vertex vector of the B-spline trajectory curve of each joint can be obtained. According to the normalized time node vector X, the position p i of each joint at time t i can be obtained. Further, the joint position trajectory of the robot can be obtained using the control point values, and the velocity, acceleration and jerk trajectory curves can be obtained by taking the derivative.
[0055] Since the B-spline has the convex hull property, the kinematic constraints of joint trajectory are converted into the constraints of the control vertex of B-spline:
[0056]
[0057] In the above formula, m = 1, 2, …, M, where M is the number of joints of the manipulator, and n + 1 is the number of key points; m a j 1 、 m a j 2 and m a j 3 are the jth control vertex of the B-spline velocity, acceleration and pulsation trajectory curve of the mth joint, respectively; mmax , a mmax , j mmax are the position, velocity, acceleration and jerk of the mth joint of the robot, respectively; v , k a , k j are amplification coefficients, which are appropriately amplified for kinematic constraints considering the strong convex hull property of B-spline curve.
[0058] According to the optimization objectives of time shortest, energy optimal and impact smallest, the robot optimization objective function is determined as:
[0059]
[0060] In the above formula, T is the time of the manipulator moving from the initial pose to the terminal pose along a certain trajectory; Δt i is the running time interval of the robot, t i is the running time of the robot to the i th joint path point; a i , j i are the joint acceleration and jerk, respectively; q i represents the joint angle value of the joint at the key point i; τ i represents the control torque of the manipulator; F1 is the motion time, which measures the motion efficiency of the manipulator; F2 is the average acceleration of the joint, which is an index to measure the energy consumption of the manipulator joint; F3 is the joint pulsation, which measures the smoothness of the trajectory; F4 is the energy consumed by the joint.
[0061] In step S102, the non-dominated sorting genetic algorithm is used to determine a Pareto optimal solution set of the numerical values of the control points of the B-spline trajectory curve of each joint, taking the numerical values of the control points of the B-spline trajectory curve of each joint as optimization variables. In an example, according to the 7th order B-spline curve interpolation trajectory of the robot, the optimization objective function and the kinematics constraint condition, the immune genetic multi-objective optimization algorithm of the non-dominated neighborhood is used to obtain the corresponding Pareto optimal solution set after optimization. In step S103, based on the Pareto optimal solution set, a planning scheme of the joint trajectory of the collaborative robot is determined, wherein the non-dominated sorting genetic algorithm comprises: determining an adjusted crossover probability based on an initial crossover probability, a predetermined gain factor, a standard deviation of the fitness of the child population and an average fitness of the child population; determining an adjusted mutation probability based on an initial mutation probability, a predetermined gain factor, a standard deviation of the fitness of the child population and an average fitness of the child population; performing crossover and mutation operations on the child population based on the adjusted crossover probability and the adjusted mutation probability to generate a new child population.
[0062] In an example, the step of generating the child population comprises: setting initialization related parameters of the non-dominated sorting genetic algorithm, and generating initial seeds of the population to determine an initial population (for example, generating initial seeds of the population by using a Logistic chaotic mapping), wherein the initialization related parameters comprise a population size, a mutation probability, a crossover probability, a maximum number of iterations, motion constraints of the joint trajectory and motion characteristic constraints of the robot itself; determining a dominant population in the initial population based on a fitness function which is an objective function of the optimization of the joint trajectory of the collaborative robot; determining a crowding degree of each individual in the dominant population; selecting a number of individuals equal to the population size from a set of individuals in a dominant position as the child population based on the crowding degree of each individual. For example, the crowding degree of each individual is determined based on the number of objective functions and the value of each individual on the objective function. For example, the objective function comprises a function representing the time of the end effector of the robot from the initial pose to the termination pose, a function representing the average acceleration of the joint, a function representing the energy consumed by the joint, and a function representing the pulsation of the joint (for example, the objective functions F1 to F4 described above). For example, the motion constraints of the joint trajectory comprise the maximum values of the control points of the B-spline velocity, acceleration and jerk trajectory curves of the corresponding joint, and the motion characteristic constraints of the robot itself comprise the maximum values of the joint torque, joint velocity, joint acceleration, joint jerk and joint displacement.
[0063] For example,
[0064] Joint torque: |τ mi (t)|≤τ mmax , i = 1, 2, …, m;
[0065] Joint jerk: |jmi (t)|≤j mmax , i = 1, 2, …, m;
[0066] Joint acceleration: |a mi (t)|≤a mmax , i = 1, 2, …, m;
[0067] Joint velocity: |v mi (t)|≤v mmax , i = 1, 2, …, m;
[0068] Joint displacement: |q mi (t)|≤q mmax , i = 1, 2, …, m.
[0069] where q mmax is the maximum value of joint motion range; v mmax is the maximum value of joint angular velocity; a mmax is the maximum value of joint angular acceleration; j mmax is the maximum value of joint angular jerk; τ mmax is the maximum value of joint torque.
[0070] For example, the related parameters of the non-dominated sorting genetic algorithm initialization are set (including population size NIND, mutation probability Pm, crossover probability Pc, maximum iteration number Gen, and upper and lower limits of problem values in the problem domain, etc.); the initial seed Spop of the population, i.e. the initial spatial position of each individual in the population, is generated by using Logistic chaotic mapping.
[0071] For example, the iteration formula of Logistic chaotic mapping is:
[0072] x n+1 = r·x n ·(1-x n ).
[0073] where x n is the value of the nth iteration, x n+1 is the value of the next iteration, and r is the parameter of chaotic mapping, usually taking a value between [3.57, 4].
[0074] Initializing the population by one-dimensional Logistic chaotic mapping can give the individuals in the population a certain randomness, which helps to increase the diversity of the population and improve the global search ability of the algorithm.
[0075] Subsequently, according to the Pareto optimal solution criterion, the dominant population in the initial population is determined by calculating the fitness function, and the crowding distance of each individual in the dominant population is further calculated. The crowding degree calculation method based on entropy can be represented as:
[0076]
[0077] where CrowdingDistance i is the crowding distance value of individual i, N is the number of objective functions, f i (j) is the value of individual i on the jth objective function. The entropy-based crowding distance calculation method can be used to measure the distribution density of individuals in the objective space, and the diversity of individuals is evaluated by calculating the distribution entropy of individuals in the objective space, thereby helping the algorithm to maintain the diversity of the population.
[0078] Next, selection is performed according to the non-dominated set in which the selected individual is located and the crowding distance, the individuals in the set that are in a dominant position are preferentially selected, and then the individual with a larger crowding distance is selected from these individuals, and the process is repeated until NIND individuals are selected. Subsequently, according to the crossover probability and the mutation probability in the algorithm, the initial population is subjected to crossover and mutation operations to generate a new offspring population. The crossover probability and the mutation probability can be adaptively adjusted. When the trend of the fitness of the population is large, the dynamically adjusted crossover probability is reduced to slow down the evolution speed of the population, so as to better explore the search space and avoid premature convergence to a local optimal solution. When the trend of the fitness of the population is small, the dynamically adjusted crossover probability is increased to speed up the evolution speed of the population, so as to better explore the search space and avoid falling into a local optimal solution.
[0079] Specifically, the calculation formula of the dynamically adjusted crossover probability is as follows:
[0080]
[0081] where P c is the dynamically adjusted crossover probability, P c0 is the initial crossover probability, k is a gain factor, σ f is the standard deviation of the fitness of the population, and f avg is the average fitness of the population. The gain factor k adjusts the influence degree of the change of the fitness of the population on the mutation probability and the crossover probability.
[0082] The calculation formula of the dynamically adjusted mutation probability is as follows:
[0083]
[0084] where P m is the dynamically adjusted mutation probability, P m0 is the initial mutation probability, k is a gain factor, σ f is the standard deviation of the fitness of the population, and f avg is the average fitness of the population.
[0085] Subsequently, the size of the dominant population is determined according to the Pareto optimal solution criterion, and the crowding distance of individuals in the dominant population is calculated. If the size of the dominant population exceeds the expected value, the antibody with a larger crowding distance is retained. Until the algorithm meets the end condition, the Pareto optimal solution set corresponding to the objective function is output, and the final trajectory planning scheme is selected from the Pareto optimal solution set.
[0086] In an example, after generating a new sub-population, the iteration number is incremented by 1; the sub-population and the new sub-population are merged, and the crowding degree of each individual in the merged population is determined; based on the crowding degree of each individual in the merged population, a number of individuals equal to the population size are selected from the set of individuals in a dominant position as a new population; the adjusted mutation probability and the mutation probability are determined for the new population and the crossover and mutation operations are performed thereon to generate a sub-population of the new population, and the iteration number is incremented by 1; the population merging, new population determination, and sub-population generation of the new population are repeated until the iteration number reaches the maximum iteration number, to obtain the Pareto optimal solution set corresponding to the objective function (for details, refer to the description of Figure 3 ).
[0087] The joint trajectory optimization method of the collaborative robot according to the example embodiments of the present disclosure comprehensively considers the kinematic constraint conditions of each joint of the robot, effectively improves the motion performance of the joints of the robot according to the proposed objective functions of the shortest time, the optimal energy, and the minimum impact, and at the same time, the non-dominated sorting genetic algorithm is improved to make it possible to obtain a more reliable multi-objective trajectory planning solution set of the collaborative robot, aiming at the premature convergence problem easily occurring in the algorithm.
[0088] Figure 3 is a flowchart showing the non-dominated sorting genetic algorithm (NSGA-II) algorithm according to the example embodiments of the present disclosure. In an example, first, 7 B-spline curves are used for interpolation planning; second, based on the consideration of the joint trajectory and the kinematic constraint of the robot, the working efficiency, energy consumption, and motion stability requirements of the robot are comprehensively considered, and three optimization objectives (the shortest time, the optimal energy, and the minimum impact) are proposed; finally, based on the meaning of the Pareto optimal set, the improved NSGA-II algorithm is finally obtained.
[0089] As Figure 3As shown, in step S301, initialization related parameters of the non-dominated sorting genetic algorithm are set, and initial seeds of a population are generated to determine an initial population (for example, initial seeds of a population are generated by using a Logistic chaotic mapping), wherein the initialization related parameters include a population size, a mutation probability, a crossover probability, a maximum number of iterations, motion constraints of joint trajectories, and mechanical arm self-motion characteristic constraints. In step S302, it is determined whether a first generation of offspring population is generated. If it is determined in step S302 that the first generation of offspring population is not generated, a dominant population in the initial population is determined based on a fitness function of an objective function of joint trajectory optimization of the collaborative robot; a crowding degree of each individual in the dominant population is determined; a number of individuals equal to the population size are selected from a set of individuals in a dominant position as an offspring population based on the crowding degree of each individual; an adjusted crossover probability is determined based on an initial crossover probability, a predetermined gain factor, a standard deviation of fitness of the offspring population, and an average fitness of the offspring population; an adjusted mutation probability is determined based on an initial mutation probability, a predetermined gain factor, a standard deviation of fitness of the offspring population, and an average fitness of the offspring population; and a crossover and mutation operation is performed on the offspring population based on the adjusted crossover probability and the adjusted mutation probability to generate a new offspring population (steps S303, S304, S305, and S306). If it is determined in step S302 that the first generation of offspring population is generated, the number of iterations is incremented by one in step S307 (i.e., gen = 2). Next, in step S308, the parent population and the offspring population are combined (the parent population refers to population individuals that are retained by a selection operation in the current iteration, which are optimal solutions of the last generation; the offspring population refers to a new individual set generated from the parent population by a crossover and mutation operation), and the combination manner includes, for example, directly placing the parent and offspring individuals together to form a mixed population, and then selecting according to non-dominated sorting and crowding distance to determine the population of the next generation.
[0090] Next, it is determined in step S309 whether a new parent population is generated. If it is determined in step S309 that no new parent population is generated, then in steps S310, S311 and S312, the size of the dominant population is determined according to the Pareto optimal solution criterion, and the crowding distance of the individuals in the dominant population is calculated, and if the size of the dominant population exceeds the expected value, the antibody with a larger crowding distance is retained. If it is determined in step S309 that a new parent population is generated, then in step S313, the parent individuals of the new generation are selected according to the non-dominated sorting and crowding degree (for example, the individuals that perform well in terms of non-dominated sorting and crowding distance are selected as the parent individuals of the new generation). In step S314, the selected parent individuals are subjected to adaptive crossover and mutation operations as described above to generate a new child population. Next, it is determined in step S315 whether the number of iterations reaches the maximum number of iterations. If it is determined in step S315 that the number of iterations does not reach the maximum number of iterations, then the number of iterations is incremented by one and the process returns to step S308. If it is determined in step S315 that the number of iterations has reached the maximum number of iterations, then in step S316, the Pareto optimal solution is output.
[0091] By adopting the non-dominated sorting genetic algorithm according to the present disclosure, the problem of premature falling into a local optimal solution in the solving process of the cooperative robot multi-objective trajectory optimization model is avoided, the optimized robot joint trajectory has a shorter running time, lower energy consumption, smaller motion impact and better smoothness, thereby providing a strong guarantee for the motion stability of the robot.
[0092] Figure 4 is a block diagram illustrating a joint trajectory optimization device of a cooperative robot according to an example embodiment of the present disclosure.
[0093] As Figure 4As shown, the joint trajectory optimization device 400 of the collaborative robot according to the example embodiment of the present disclosure comprises: an interpolation unit 401 configured to interpolate the spatial path points of the end effector of the mechanical arm of the collaborative robot by using a seven-order B-spline curve function to obtain the B-spline trajectory curve of each joint; a solving unit 402 configured to take the numerical values of the control vertices of the B-spline trajectory curve of each joint as optimization variables, and determine a Pareto optimal solution set of the numerical values of the control vertices of the B-spline trajectory curve of each joint by using a non-dominated sorting genetic algorithm; a planning unit 403 configured to determine a planning scheme of the joint trajectory of the collaborative robot based on the Pareto optimal solution set, wherein the non-dominated sorting genetic algorithm comprises: determining an adjusted crossover probability based on an initial crossover probability, a predetermined gain factor, a standard deviation of the fitness of the offspring population, and an average fitness of the offspring population; determining an adjusted mutation probability based on an initial mutation probability, a predetermined gain factor, a standard deviation of the fitness of the offspring population, and an average fitness of the offspring population; and performing crossover and mutation operations on the offspring population based on the adjusted crossover probability and the adjusted mutation probability to generate a new offspring population.
[0094] In an example, initialization-related parameters of the non-dominated sorting genetic algorithm are set, and initial seeds of a population are generated to determine an initial population, wherein the initialization-related parameters include a population size, a mutation probability, a crossover probability, a maximum number of iterations, motion constraints of the joint trajectory, and motion characteristic constraints of the mechanical arm; a dominant population in the initial population is determined based on a fitness function that is a target function of the joint trajectory optimization of the collaborative robot; a crowding degree of each individual in the dominant population is determined; and a number of individuals equal to the population size are selected from a set of individuals in a dominant position as an offspring population based on the crowding degree of each individual.
[0095] In an example, after a new offspring population is generated, the number of iterations is incremented by 1; the offspring population and the new offspring population are merged to determine a crowding degree of each individual in the merged population; a number of individuals equal to the population size are selected from a set of individuals in a dominant position as a new population based on the crowding degree of each individual in the merged population; the adjusted mutation probability and the mutation probability are determined for the new population and crossover and mutation operations are performed thereon to generate an offspring population of the new population, and the number of iterations is incremented by 1; the population merging, the new population determination, and the offspring population generation of the new population are repeated until the number of iterations reaches the maximum number of iterations, to obtain a Pareto optimal solution set corresponding to the target function.
[0096] In an example, the crowding degree of each individual is determined based on the number of target functions and the value of each individual on the target function.
[0097] In the example, the steps to generate the initial seed of the population include: generating the initial seed of the population using a Logistic chaotic map.
[0098] In the example, the objective function includes a function characterizing the time from the initial pose to the final pose of the robotic arm end mechanism, a function characterizing the average acceleration of the joint, a function characterizing the energy consumed by the joint, and a function characterizing the joint pulsation.
[0099] In the example, the motion constraints of the joint trajectory include the maximum values of the control vertices of the B-spline velocity, acceleration, and jerk trajectory curve of the corresponding joint, and the motion characteristic constraints of the robotic arm itself include the maximum values of joint torque, joint velocity, joint acceleration, joint jerk, and joint displacement.
[0100] The above combination Figures 1 to 3 The specific operations shown are respectively by Figure 4 The corresponding unit in the joint trajectory optimization device 400 of the collaborative robot shown is used to perform the operation. Here, the specific operational details will not be elaborated.
[0101] Figures 5A to 5F It is a schematic diagram of the velocity, acceleration, and jerk curves of six joints according to an example of this disclosure.
[0102] In the example, trajectory planning is performed on a Sawyer robot with seven joints, and optimization is performed according to the objective function; the kinematic constraints of each joint during Sawyer robot trajectory planning are shown in Table 1 below.
[0103] Table 1
[0104]
[0105] The data in Table 1 represent the constraints on the velocity, acceleration, and jerk of each joint of the Sawyer robot.
[0106] The joint position nodes of the given six joints of the Sawyer robot are shown in Table 2 below.
[0107] Table 2
[0108]
[0109] The data in Table 2 shows the path points that the Sawyer robot must traverse from start to stop when it completes a task.
[0110] Under given constraints and joint path conditions, a simulation study was conducted using Matlab software according to the method of this disclosure. The initial parameters in the algorithm are shown in Table 3 below.
[0111] Table 3
[0112]
[0113] The data in Table 3 represent the initial relevant parameters of the non-dominated sorting genetic algorithm (NSGA-II).
[0114] As Figures 5A to 5F shown, the six joints pass through the prescribed joint path nodes to reach the final position, the velocity, acceleration curves are continuous, and all kinematic constraints are within the constraint range, and the reliability of the trajectory planning scheme is high.
[0115] Figure 6 is a block diagram illustrating a computing system including at least one computing device and at least one storage device storing instructions according to an example embodiment of the present disclosure.
[0116] As Figure 6 shown, the computing system 600 provided according to an example embodiment of the present disclosure includes a computing device 601 and a storage device 602, and the storage device 602 stores computer executable instructions, when the computer executable instructions are executed by the computing device 601, the joint trajectory optimization method of the collaborative robot described in any of the preceding embodiments is performed.
[0117] The computing device 601 is deployed in a server or a client, and can also be deployed on a node device in a distributed network environment. In addition, the computing device 601 can be a PC computer, a tablet device, a personal digital assistant, a smart phone, a web application or other devices capable of executing the above-mentioned instruction set. Here, the computing device is not necessarily a single computing device, but can also be a collection of any device or circuit capable of executing the above-mentioned instructions (or instruction set) alone or jointly. The computing device can also be part of an integrated control system or a system manager, or can be configured to interface with a local or remote (e.g., via wireless transmission) portable electronic device. In the computing device, the processor includes a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a special-purpose processor system, a microcontroller, or a microprocessor. As an example but not limitation, the processor also includes an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0118] According to another aspect of the present disclosure, there is provided a computer-readable storage medium storing instructions that, when executed by at least one computing device, cause the at least one computing device to perform the joint trajectory optimization method of the collaborative robot according to any one of the preceding embodiments. The computer-readable storage medium includes magnetic media such as a floppy disk and a magnetic tape, optical media (including a compact disc (CD) ROM and a DVD ROM), magneto-optical media such as a floptical disk, hardware devices designed to store and execute program commands such as ROM, RAM, and a flash memory, which are designed to store and execute program commands. The instructions can include language code executable by a computer using an interpreter and machine language code generated by a compiler.
[0119] By employing the present disclosure, the problem that the non-dominated sorting genetic algorithm prematurely falls into a local optimal solution in the solving process of the multi-objective trajectory optimization model of the collaborative robot can be avoided, the optimized joint trajectory of the robot has a shorter running time, lower energy consumption, smaller motion impact, and better smoothness, thereby ensuring the motion stability of the robot.
[0120] The processes, methods, or algorithms disclosed herein can be embodied in a processing device, controller, or computer, which can include any existing programmable electronic control unit or a specially designed electronic control unit. Similarly, the processes, methods, or algorithms can be stored as data and instructions executable by a controller or computer in various forms, including but not limited to information being permanently stored on non-writable storage media (such as ROM devices) and information being variably stored on writable storage media (such as floppy disks, magnetic tapes, CDs, RAM devices, and other magnetic and optical media). The processes, methods, or algorithms can also be implemented in software executable objects. Alternatively, the processes, methods, or algorithms can be wholly or partially implemented using suitable hardware components (such as ASIC, FPGA, state machine, controller, or other hardware components or devices) or a combination of hardware components, software components, and firmware components.
[0121] While the present disclosure includes specific examples, it will be apparent to one of ordinary skill in the art, having the benefit of this disclosure, that various changes in form and detail can be made without departing from the spirit and scope of the claims and their equivalents. The examples described herein are to be considered in a descriptive sense only and not for purposes of limitation. Descriptions of features or aspects in each example are to be considered as being applicable to similar features or aspects in other examples. Suitable results can be achieved if the described techniques are performed in a different order, and / or if the described systems, architectures, devices, or circuits are combined in a different manner, and / or if the described components are replaced or supplemented by other components or their equivalents. Therefore, the scope of the present disclosure is not limited to the specific examples described herein, but only by the claims and their equivalents, and all variations within the scope of the claims and their equivalents are to be construed as being included in the present disclosure.
Claims
1. A joint trajectory optimization method of a collaborative robot, characterized by, The joint trajectory optimization method of the collaborative robot comprises: a seven B-spline curve function is used to interpolate the space path points of the end effector of the mechanical arm of the collaborative robot to obtain the B-spline trajectory curve of each joint; the numerical values of the control vertices of the B-spline trajectory curve of each joint are used as optimization variables, and a non-dominated sorting genetic algorithm is used to determine the Pareto optimal solution set of the numerical values of the control vertices of the B-spline trajectory curve of each joint; based on the Pareto optimal solution set, a planning scheme of the joint trajectory of the collaborative robot is determined, wherein the non-dominated sorting genetic algorithm comprises: setting initialization related parameters of the non-dominated sorting genetic algorithm, and generating initial seeds of a population to determine an initial population, wherein the initialization related parameters comprise a population size, a mutation probability, a crossover probability, a maximum iteration number, motion constraints of the joint trajectory, and motion characteristic constraints of the mechanical arm itself, wherein the motion constraints of the joint trajectory comprise maximum values of the control vertices of the B-spline velocity, acceleration, and jerk trajectory curves of the corresponding joint, and the motion characteristic constraints of the mechanical arm itself comprise maximum values of the joint torque, joint velocity, joint acceleration, joint jerk, and joint displacement; based on a fitness function serving as an objective function of the joint trajectory optimization of the collaborative robot, a dominant population in the initial population is determined, wherein the objective function comprises a function representing a time for the end effector of the mechanical arm to move from an initial pose to a terminal pose, a function representing an average acceleration of the joint, a function representing energy consumed by the joint, and a function representing a joint pulsation; a crowding degree of each individual in the dominant population is determined; based on the crowding degree of each individual, a number of individuals equal to the population size are selected from a set of individuals in a dominant position as a child population; based on the initial crossover probability, a predetermined gain factor, a standard deviation of the fitness of the child population, and an average fitness of the child population, an adjusted crossover probability is determined; based on the initial mutation probability, the predetermined gain factor, the standard deviation of the fitness of the child population, and the average fitness of the child population, an adjusted mutation probability is determined; based on the adjusted crossover probability and the mutation probability, a crossover and mutation operation is performed on the child population to generate a new child population, wherein a calculation formula for determining the adjusted crossover probability is , and a calculation formula for determining the adjusted mutation probability is , is the adjusted crossover probability, is the initial crossover probability, is the adjusted mutation probability, is the initial mutation probability, is a predetermined gain factor, is a standard deviation of the fitness of the offspring population, is an average fitness of the offspring population.
2. The joint trajectory optimization method of a collaborative robot according to claim 1, characterized by, the non-dominated sorting genetic algorithm further comprises: after the new child population is generated, the iteration number is increased by 1; the child population and the new child population are merged to determine a crowding degree of each individual in the merged population; based on the crowding degree of each individual in the merged population, a number of individuals equal to the population size are selected from a set of individuals in a dominant position as a new population; for the new population, the adjusted mutation probability and the mutation probability are determined and a crossover and mutation operation is performed thereon to generate a child population of the new population, and the iteration number is increased by 1; the population merging, new population determining, and child population generating of the new population are repeated until the iteration number reaches the maximum iteration number, so as to obtain a Pareto optimal solution set corresponding to the objective function.
3. The joint trajectory optimization method of a collaborative robot according to claim 1, wherein, The crowding degree of each individual is determined based on the number of objective functions and the value of each individual on the objective function.
4. The joint trajectory optimization method of a collaborative robot according to claim 1, wherein, The step of generating initial seeds of the population comprises: generating initial seeds of the population by using a Logistic chaotic mapping.
5. A joint trajectory optimization device of a collaborative robot, characterized by, The joint trajectory optimization device of the collaborative robot comprises: an interpolation unit configured to interpolate the spatial path points of the end effector of the mechanical arm of the collaborative robot by using a seven-order B-spline curve function to obtain a B-spline trajectory curve of each joint; a solving unit configured to determine a Pareto optimal solution set of the numerical values of the control vertices of the B-spline trajectory curve of each joint by using a non-dominated sorting genetic algorithm with the numerical values of the control vertices of the B-spline trajectory curve of each joint as optimization variables; a planning unit configured to determine a planning scheme of the joint trajectory of the collaborative robot based on the Pareto optimal solution set, wherein the non-dominated sorting genetic algorithm comprises: setting initialization-related parameters of the non-dominated sorting genetic algorithm, and generating initial seeds of a population to determine an initial population, wherein the initialization-related parameters comprise a population size, a mutation probability, a crossover probability, a maximum number of iterations, motion constraints of the joint trajectory, and motion characteristic constraints of the mechanical arm itself, wherein the motion constraints of the joint trajectory comprise maximum values of the control vertices of the B-spline velocity, acceleration, and jerk trajectory curves of the corresponding joint, and the motion characteristic constraints of the mechanical arm itself comprise maximum values of the joint torque, joint velocity, joint acceleration, joint jerk, and joint displacement; determining a dominant population in the initial population based on a fitness function that is a target function of the joint trajectory optimization of the collaborative robot, wherein the target function comprises a function representing a time for the end effector of the mechanical arm to move from an initial pose to a terminal pose, a function representing an average acceleration of the joint, a function representing energy consumed by the joint, and a function representing a joint pulsation; determining a crowding degree of each individual in the dominant population; selecting a number of individuals equal to the population size from a set of individuals in a dominant position as a child population based on the crowding degree of each individual; determining an adjusted crossover probability based on the initial crossover probability, a predetermined gain factor, a standard deviation of the fitness of the child population, and an average fitness of the child population; determining an adjusted mutation probability based on the initial mutation probability, the predetermined gain factor, the standard deviation of the fitness of the child population, and the average fitness of the child population; performing a crossover and mutation operation on the child population based on the adjusted crossover probability and the adjusted mutation probability to generate a new child population, wherein the calculation formula for determining the adjusted crossover probability is , and the calculation formula for determining the adjusted mutation probability is , is the adjusted crossover probability, is the initial crossover probability, is the adjusted mutation probability, is the initial mutation probability, is a predetermined gain factor, is the standard deviation of the fitness of the offspring population, is the average fitness of the offspring population.
6. A computing system comprising at least one computing device and at least one storage device storing instructions, wherein the computing system is configured to perform operations comprising: The instructions, when executed by the at least one computing device, cause the at least one computing device to perform the joint trajectory optimization method of the collaborative robot according to any one of claims 1-4.
7. A computer-readable storage medium storing instructions, wherein, The instructions, when executed by the at least one computing device, cause the at least one computing device to perform the joint trajectory optimization method of the collaborative robot according to any one of claims 1-4.
Citation Information
Patent Citations
Non-dominated neighbor immune genetic multi-target optimizing method of joint track of electrohydraulic robot
CN110216673A
Multi-machine cooperative trajectory optimization method based on quintic non-uniform rational B-spline
CN113296407A