Mechanical arm trajectory planning method and system based on optimized raccoon algorithm
By applying the optimized prolong-nosed raccoon algorithm in robotic arm trajectory planning, combining Logistic chaotic mapping, quantum behavior strategy and lens reverse learning strategy, the problem of robotic arm trajectory planning is easily trapped in local optimality, and a more efficient and accurate time-optimized trajectory planning is achieved.
Patent Information
- Application Number
- CN202510192300.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-02-21
AI Technical Summary
In the prior art, robotic arm trajectory planning is prone to fall into local optimality, and traditional intelligent optimization algorithms converge at a slow speed, making it difficult to obtain time-optimal solutions.
Using a method based on the optimization of prolong-nosed raccoon algorithm, the population is initialized through Logistic chaotic mapping, and combined quantum behavior strategies and lens reverse learning strategies to balance local development and global search capabilities, and improve convergence speed and accuracy.
It effectively avoids premature maturity convergence, improves the efficiency and accuracy of trajectory planning, and ensures that the robotic arm completes the task in the shortest time.
Smart Images

Figure CN119952706A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robot arm path planning, and more specifically, to a robot arm trajectory planning method and system based on an optimized coati algorithm. Background Art
[0002] With the continuous progress and development of robot technology, robots have been widely used in key fields such as industrial production, energy and medical treatment. As an important actuator of the robot, the motion performance of the robot arm directly affects the working efficiency and stability of the robot. In order to pursue a more efficient and stable robot arm, trajectory planning has become one of the important indicators for evaluating the motion process of the robot arm. In the field of robot arm trajectory planning, time-optimal trajectory planning is a research hotspot. Time optimization refers to optimizing the trajectory with the shortest motion time as the goal under the premise of satisfying the kinematic constraints of the robot arm. The significance of time-optimal trajectory planning lies in: on the one hand, the motion time can directly reflect the working efficiency of the robot arm, which is crucial for occasions such as industrial production that have strict time requirements; on the other hand, the speed and accuracy of trajectory planning are also related to whether the robot arm can complete the task stably and efficiently.
[0003] At present, the commonly used methods for robot trajectory planning include polynomial interpolation, spline interpolation, etc., which can generate smooth trajectories that meet the boundary states of position, velocity and acceleration. However, these methods are difficult to take into account the optimal time of the trajectory. To this end, some intelligent optimization algorithms such as genetic algorithms and particle swarm algorithms have been introduced into time-optimal trajectory planning, in order to obtain the time-optimal solution under different speed constraints. However, traditional intelligent optimization algorithms generally have defects such as weak global optimization ability and easy to fall into local optimality, which makes it difficult for the obtained trajectory to achieve the optimal running time, and the work efficiency of the robot arm cannot be further improved.
[0004] The Chinese patent application, application number CN202410198092.2, published on April 19, 2024, discloses a method for time optimal trajectory planning of a robot arm based on an improved particle swarm algorithm, including: obtaining the mapping relationship between the joints of the robot arm according to the kinematic model of the robot arm; obtaining the interpolation angles of the joints of the robot arm in the joint space based on the path points of the robot arm in Cartesian space and inverting the mapping relationship; generating the continuous trajectory equations of the position, velocity and acceleration of the robot arm according to the interpolation angles of the joints of the robot arm in the joint space using a mixed polynomial interpolation function; obtaining the fitness function based on the optimization target requirements and constraints; optimizing the running time of the robot arm trajectory using an improved particle swarm algorithm. However, in this scheme, although the particle swarm algorithm has a certain global search capability, its convergence speed is relatively slow and it is easy to converge to the local optimum prematurely. This scheme improves the particle swarm algorithm, but its optimization performance for complex time optimal trajectory planning problems still needs to be further improved. Summary of the invention
[0005] 1. Technical issues to be solved
[0006] In view of the fact that the robot arm trajectory planning in the prior art is prone to fall into local optimality, the present application provides a robot arm trajectory planning method and system based on the optimized coati algorithm. First, the population is initialized using Logistic chaotic mapping to improve the diversity of initial solutions and avoid premature convergence; then, the quantum behavior strategy and the lens reverse learning strategy are integrated in the iterative process to balance the local development and global search capabilities of the algorithm, improve the convergence speed and convergence accuracy, and have stronger robustness.
[0007] 2. Technical solution
[0008] The purpose of this application is achieved through the following technical solutions.
[0009] One aspect of the present application provides a robot trajectory planning method based on an optimized coati algorithm, comprising: establishing a robot kinematic model according to a homogeneous transformation matrix between adjacent joints of the robot and a forward kinematic equation of an end effector relative to a base coordinate system; taking the total running time of each joint of the robot as an objective function f(t), and taking the angle, angular velocity and angular acceleration of each joint of the robot as constraints; generating a motion trajectory of the robot according to the constraints using a piecewise polynomial interpolation function, and obtaining the total running time of the motion trajectory; optimizing the motion trajectory using an improved coati algorithm to obtain an optimized motion trajectory, and obtaining the total running time of the optimized motion trajectory; the improved coati algorithm initializes a population of the coati algorithm through a Logistic chaotic map, and updates the positions of individuals in the population using a quantum behavior strategy and a lens reverse learning strategy.
[0010] Furthermore, the total running time of each joint of the robot arm is taken as the objective function f(t), and the angle, angular velocity and angular acceleration of each joint of the robot arm are taken as constraints, including: The calculation formula of the objective function f(t) is: f(t) = min(t j1 +t j2 +t j3 ), where t j1 represents the running time of the first path trajectory of the jth joint of the robot; t j2 represents the running time of the second path trajectory of the jth joint of the robot; t j3 represents the running time of the third path of the jth joint of the robot; t represents the running time of the joint; j represents the number of the joint; 1, 2 and 3 represent the first path, the second path and the third path;
[0011] The constraints are: Among them, θ j(t) and They represent the angle, angular velocity and angular acceleration of the j-th joint of the robot over time, θ jmax , and They represent the maximum angle, maximum angular velocity and maximum angular acceleration allowed during the motion of the jth joint of the robot arm; t represents the joint running time and j represents the joint number;
[0012] Further, according to the constraint conditions, the motion trajectory of the robot is generated using a piecewise polynomial interpolation function, and the initial total running time of the motion trajectory is obtained, including: constructing polynomial interpolation functions Q1, Q2 and Q3 of the first path, the second path and the third path respectively; according to the constraint conditions, taking the angle, angular velocity and angular acceleration of the end point of the first path as the angle, angular velocity and angular acceleration of the starting point of the second path, and taking the angle, angular velocity and angular acceleration of the end point of the second path as the angle, angular velocity and angular acceleration of the starting point of the third path; using polynomial interpolation functions Q1, Q2 and Q3 to generate the first path, the second path and the third path respectively; connecting the first path, the second path and the third path in sequence to obtain the motion trajectory of the robot. The total running time of the motion trajectory of the robot is calculated using the objective function f(t).
[0013] Furthermore, the polynomial interpolation function Q1 of the first path is: Among them, t1 represents the running time of the i-th joint of the robot arm in the first path, q i1 (t) represents the angle of the i-th joint of the robot in the first path, Represents the angular velocity of the i-th joint of the robot in the first path, represents the angular acceleration of the i-th joint of the robot in the first path, a 13 、a 12 、a 11 and a 10 are the coefficients of the polynomial interpolation function of the first path segment.
[0014] Furthermore, the polynomial interpolation function Q2 of the second path is: Among them, t2 represents the running time of the i-th joint of the robot arm in the second path, q i2 (t) represents the angle of the i-th joint of the robot in the second path, represents the angular velocity of the i-th joint of the robot in the second path, represents the angular acceleration of the i-th joint of the robot in the second path, a 25 、a 24 、a 23 、a 22 、a 21 and a20 are the coefficients of the polynomial interpolation function of the second path segment.
[0015] Furthermore, the polynomial interpolation function Q3 of the third path is: Among them, t3 represents the running time of the i-th joint of the robot in the third path, q i3 (t) represents the angle of the i-th joint of the robot in the third path, represents the angular velocity of the i-th joint of the robot in the third path, represents the angular acceleration of the i-th joint of the robot in the third path, a 33 、a 32 、a 31 and a 30 are the coefficients of the polynomial interpolation function of the third path segment.
[0016] Furthermore, the improved coati algorithm is used to optimize the motion trajectory to obtain the optimized motion trajectory, and the total running time of the optimized motion trajectory is obtained, including: initializing the parameters of the coati algorithm, the parameters including the population size N, the maximum number of iterations T, the upper limit ub and the lower limit lb of the search space; initializing the population using the Logistic chaotic map; when the number of iterations is less than or equal to half of the maximum number of iterations T, respectively updating the positions of the first part and the second part of individuals in the population using the quantum behavior strategy, the first part being the first N / 2 individuals, and the second part being the last N / 2 individuals; calculating the position update The objective function value of the new coati individual is used as the individual fitness value; according to the individual fitness value, the greedy selection strategy is used to determine whether the fitness value of the individual after the updated position is greater than the fitness value of the original position. If so, the individual position is updated, if not, the original position remains unchanged; when the number of iterations is greater than half of the maximum number of iterations T, the lens reverse learning strategy is used to update the individual positions of all individuals in the population; the iterative update is repeated until the preset termination condition is met, and the individual with the best individual fitness value is selected as the optimal solution; according to the optimal solution, the optimized motion trajectory is generated, and the total running time of the optimized motion trajectory is calculated.
[0017] Furthermore, the Logistic chaotic mapping uses the following formula to initialize the population: Xi = mod(λ·Pn·(1-Pn),1)·(ub-lb)+lb, where X i represents the initial position of the population individual in the search space, λ represents the control parameter, mod(*) represents the modulus function, and Pn represents the Logistic chaotic sequence;
[0018] Furthermore, when the number of iterations is less than or equal to half of the maximum number of iterations T, the following formula is used to update the individual positions of the first part of individuals in the population: Among them, i represents the individual of the current iteration population, t represents the current iteration number, and T represents the maximum iteration number. Indicates the position of the next iteration of the current population individual, Indicates the position of the current iteration of the current population individual, represents the position of the optimal population individual of the current iteration, I represents a random integer from the integer set {1,2}, S represents the quantum behavior strategy term, α represents the dynamic contraction and expansion coefficient, α max , α min Maximum and minimum values of the dynamic contraction-expansion coefficient;
[0019] Among them, this application introduces the quantum behavior mechanism to enable individuals to search globally in the solution space, improve the algorithm's exploration ability, help to jump out of the local optimum, and search for a better path planning solution. S represents the quantum behavior strategy term, which controls the direction of individual movement by the probability amplitude, so that the individual moves in a direction that is conducive to optimization.
[0020] Furthermore, when the number of iterations is less than or equal to half of the maximum number of iterations T, the positions of the second part of individuals in the population are updated using the following formula:
[0021]
[0022]
[0023] Among them, i represents the individual of the current iteration population, t represents the current iteration number, and T represents the maximum iteration number. Indicates the position of the next iteration of the current population individual, represents the position of the current iteration of the current population individual, μ and r represent random numbers in [0,1], represents the position of the optimal population individual of the current iteration, I represents a random integer from the integer set {1,2}, represents the random position of the prey falling on the ground, ub and lb represent the upper and lower bounds, fit(*) is the calculated fitness, S represents the quantum behavior strategy term, α represents the dynamic contraction and expansion coefficient, α max , α min Maximum and minimum values of the dynamic contraction-expansion coefficient;
[0024] Among them, the quantum behavior strategy term S introduces the interaction and information exchange between related quantum individuals. By controlling the direction of individual movement through probability amplitude, the individual is not only affected by its own state and the global optimal solution, but also can perceive the information of other quantum individuals, thereby updating to a new state that is more conducive to optimization. This enhances the population's ability to utilize and share information. Through random quantum measurement, the individual state can change in a jumpy manner in the continuous solution space, breaking through the limitations of individual updates in traditional optimization algorithms, and can move nonlinearly over a large range in the solution space, increasing the search breadth and randomness. At the same time, by selectively retaining excellent individuals, the population can be guided to converge toward a better solution.
[0025] Furthermore, when the number of iterations is greater than half of the maximum number of iterations T, the lens reverse learning strategy is used to update the positions of all individuals in the population:
[0026]
[0027]
[0028]
[0029] k=(1+(t / T) 12 ) 10
[0030] Among them, ub L lb L Represents the upper and lower bounds that are continuously updated with the number of iterations, ub and lb represent the upper and lower bounds, Indicates the position of the next iteration of the current population individual, represents the current iteration position of the current population individual, r represents a random number in [0,1], The reverse solution of the position of the next iteration of the current population individual, a and b represent the boundaries of the lens reverse learning solution, and k represents the coefficient that changes with the number of iterations.
[0031] Among them, the present application uses the lens reverse learning strategy to focus the search. When the number of iterations exceeds half, the algorithm has conducted sufficient global exploration, and the population begins to gather towards the optimal solution area. At this time, the use of lens reverse learning can speed up the population convergence and improve the efficiency of the algorithm's later search.
[0032] On the other hand, lens reverse learning can resample and perturb the solution space based on existing solutions by introducing reverse solutions and dynamically changing search boundaries, generating some new solutions that are related to but different from the current solutions, thereby increasing population diversity and preventing the algorithm from falling into local optimality too early.
[0033] In the robot trajectory planning problem, due to the large number of path points and complex constraints, the solution space is high-dimensional, nonlinear, and multi-peaked, making it difficult to search for the global optimal solution. The lens reverse learning strategy can quickly locate the global optimal area by guiding the population to focus on the optimal solution area in the later stage, improve the accuracy and efficiency of path planning, and obtain a better robot motion trajectory.
[0034] One aspect of the present application provides a robot trajectory planning system based on an optimized coati algorithm, comprising: a modeling module, which establishes a robot kinematic model according to a homogeneous transformation matrix between adjacent joints of the robot and a positive kinematic equation of an end effector relative to a base coordinate system; a trajectory generation module, which uses a piecewise polynomial interpolation function to generate a motion trajectory of the robot using the total running time of each joint of the robot as an objective function and the angles, angular velocities and angular accelerations of each joint of the robot as constraints; and a trajectory optimization module, which uses an improved coati algorithm to optimize the motion trajectory and calculates the total running time of the optimized motion trajectory.
[0035] 3. Beneficial effects
[0036] Compared with the prior art, the advantages of this application are:
[0037] (1) The existing technology requires the inverse solution of the robot kinematics to map the Cartesian space path points to the joint space and obtain the interpolation angles of each joint. This method has the following problems: first, the inverse solution of the robot kinematics is a complex nonlinear problem, the solution process is cumbersome and the amount of calculation is large; second, when the robot has a singular configuration, the inverse solution may not exist or is not unique, resulting in trajectory planning failure; third, the joint angles obtained by the inverse solution may exceed the range of joint motion and require additional processing.
[0038] The present application directly establishes a kinematic optimization model with joint angles, angular velocities, and angular accelerations as constraints in the joint space. This forward modeling method avoids complex inverse solution calculations and simplifies the kinematic modeling process. At the same time, by directly constraining and optimizing the joint parameters, it can ensure that the generated trajectory meets the kinematic limitations of the robot arm, without the need for additional singularity and joint limit judgments, thereby improving the success rate and efficiency of trajectory planning.
[0039] (2) The existing technology uses particle swarm algorithm for trajectory optimization. Although it has certain global search capabilities, the algorithm converges slowly and tends to converge to the local optimum prematurely. This application uses the coati algorithm, which has stronger global development capabilities, faster convergence speed and convergence accuracy than the particle swarm algorithm.
[0040] On this basis, this application further enhances the performance of the algorithm through the following strategies: Logistic chaotic mapping replaces random initialization, improves the diversity of the initial population and the coverage of the search space, and avoids premature convergence; the quantum behavior strategy simulates the foraging behavior of coatis, enhances the global exploration ability of the algorithm, and prevents the algorithm from falling into the local optimum through the quantum superposition characteristic; the lens reverse learning strategy dynamically adjusts the search range to gradually guide the optimization focus to the vicinity of the global optimal solution, thereby accelerating the convergence process of the algorithm.
[0041] (3) The existing technology uses a single polynomial to interpolate the trajectory. Although it can obtain a trajectory equation with continuous position, velocity and acceleration, it has the following shortcomings: single polynomial interpolation is prone to sudden changes in velocity or acceleration at the connection of segments, resulting in an unsmooth trajectory; the selection of the order also lacks a theoretical basis, which affects the smoothness and accuracy of the trajectory.
[0042] This application uses segmented mixed polynomial interpolation, and uses the continuity of mixed polynomials in position, velocity and acceleration to generate a smooth trajectory without mutations. At the same time, by reasonably setting the boundary conditions (starting point and end point states) of each segment of the polynomial, the trajectory can meet the dynamic characteristics of the robot, such as speed and acceleration limits, jerk continuity, etc. The mixed polynomial has better numerical stability and parameter adjustment flexibility, and the generated trajectory is more in line with the actual movement requirements of the robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flow chart of a robot arm trajectory planning method based on an optimized coati algorithm is provided for this application;
[0044] Figure 2 This is a kinematic model diagram of the six-degree-of-freedom mechanical arm of this application;
[0045] Figure 3 It is a comparison curve of the iterative convergence of the fitness of the three algorithms in this application;
[0046] Figure 4 This is a box plot comparing the optimization results of the three algorithms in this application;
[0047] Figure 5 A joint angle curve change diagram simulated by this application;
[0048] Figure 6 A graph showing the change of a joint angular velocity curve simulated in this application;
[0049] Figure 7 This is a graph of the change in joint angular acceleration curve simulated in this application. DETAILED DESCRIPTION
[0050] The present application is described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0051] like Figure 1 As shown, this application includes the following steps:
[0052] This embodiment takes a six-degree-of-freedom robot as the object and establishes its kinematic model. The structural parameters of the robot are as follows: Figure 2 As shown, the equation of the homogeneous transformation matrix between adjacent joints of the robot arm is expressed as follows:
[0053]
[0054] Furthermore, the pose transformation of the end effector coordinate system relative to the base coordinate system can be obtained by multiplying the transformation matrices of each joint, that is, the forward kinematics equation of the manipulator:
[0055]
[0056] The goal of this application is to minimize the total running time of each joint of the robotic arm while satisfying the joint motion constraints of the robotic arm. To this end, we use the total running time of the robotic arm joints as the optimization objective function, and the limits of the joint angle, angular velocity and angular acceleration as optimization constraints to construct the following optimization model:
[0057] f(t)=min(t j1 +t j2 +t j3 )
[0058]
[0059] Among them, t j1 represents the running time of the first path trajectory of the jth joint of the robot; t j2 represents the running time of the first path of the j-th joint of the robot; tj3 represents the running time of the first path of the j-th joint of the robot; θ j (t) and They represent the angle, angular velocity and angular acceleration of the j-th joint of the robot over time, θ jmax , and They represent the maximum angle, maximum angular velocity and maximum angular acceleration allowed during the motion of the jth joint of the robot arm, t represents the joint running time; j represents the joint number; 1, 2 and 3 represent the first path, the second path and the third path;
[0060] Optimize the objective function f(t) = min(t j1 +t j2 +tj3 ) represents the sum of the running time of the six joints of the robot on their respective trajectories, reflecting the total time cost of the robot to complete the task. By optimizing this objective function, the robot can complete the given motion task in the shortest time.
[0061] In order to generate a robot arm motion trajectory that meets the requirements of continuity and smoothness, this application adopts a 3-5-3 mixed polynomial interpolation method. This application divides the motion trajectory of each joint into three segments, with cubic polynomial interpolation used for the front and back segments and quintic polynomial interpolation used for the middle segment. By reasonably setting the position, velocity, and acceleration boundary conditions at the segmentation points, it can be ensured that the generated trajectory is smooth and continuous throughout the entire motion process.
[0062] Specifically, the expression of the three-segment polynomial interpolation function is as follows:
[0063]
[0064] Among them, t1 represents the running time of the i-th joint of the robot arm in the first path, q i1 (t) represents the angle of the i-th joint of the robot in the first path, Represents the angular velocity of the i-th joint of the robot in the first path, represents the angular acceleration of the i-th joint of the robot in the first path, a 13 、a 12 、a 11 and a 10 are the coefficients of the polynomial interpolation function of the first path segment.
[0065] Among them, t2 represents the running time of the i-th joint of the robot arm in the second path, q i2 (t) represents the angle of the i-th joint of the robot in the second path, represents the angular velocity of the i-th joint of the robot in the second path, represents the angular acceleration of the i-th joint of the robot in the second path, a 25 、a 24 、a 23 、a 22 、a 21 and a 20 are the coefficients of the polynomial interpolation function of the second path segment.
[0066]
[0067] Among them, t3 represents the running time of the i-th joint of the robot arm in the third path, q i3 (t) represents the angle of the i-th joint of the robot in the third path, represents the angular velocity of the i-th joint of the robot in the third path, represents the angular acceleration of the i-th joint of the robot in the third path, a 33 、a 32 、a 31 and a 30 are the coefficients of the polynomial interpolation function of the third path segment.
[0068] In order to solve the 14 unknown coefficients in the above expression, during the trajectory planning process, the motion constraints are expressed as angular velocity and angular acceleration of the starting point and the end point are 0, and the velocity and acceleration of the middle point of the motion trajectory are continuous. According to the above equations and constraints, a matrix equation group can be obtained:
[0069] A=M -1 *Q
[0070]
[0071] A=[a i13 a i12 a i11 a i10 a i25 a i24 a i23 a i22 a i21 a i20 a i33 a i32 a i31 a i30 ] T
[0072] Q=[000000q3 00q0 00q2 q1] T
[0073] Through the above matrix equations, the coefficients of the corresponding 3-5-3 polynomial interpolation function can be solved. The trajectory generated in this way meets the continuity requirements of position, velocity and acceleration throughout the entire motion cycle, the trajectory is smooth and stable, and the calculation is efficient. In the subsequent trajectory optimization, the optimization variable is the time of each segment of the trajectory, and the polynomial form of each segment of the trajectory is fixed.
[0074] Based on the standard coati algorithm, this application introduces a variety of strategies to improve the algorithm in order to improve the efficiency and quality of trajectory optimization.
[0075] First, the search space of coatis is initialized, where the population size is N, the maximum number of iterations is T, the lower limit ub and the upper limit lb of the search space are set, and the population is initialized using Logistic chaotic mapping, which is expressed as: Where λ is a control parameter whose value is not 0, mod() is a modulus function used to take the modulus and return the remainder, ub and lb are the upper and lower bounds of the search space, and P n The traditional coati algorithm uses a randomly initialized population, while this application introduces a Logistic chaotic map to generate an initial solution, which enhances the diversity of the population and the coverage of the search space, and helps the algorithm to escape from the local optimum.
[0076] At the beginning of the iteration, in the exploration phase of the algorithm, the first half of the individuals in the population use the following formula and quantum behavior strategy to update their individual positions, and the second half of the individuals in the population use the following formula and quantum behavior strategy to update their individual positions.
[0077] The update expression of the first half of the population is as follows:
[0078]
[0079]
[0080] The update expression of the second half of the population is as follows:
[0081]
[0082]
[0083]
[0084]
[0085] Where i represents the individual in the current iteration population, t represents the current iteration number, and T represents the maximum iteration number. Indicates the position of the next iteration of the current population individual, represents the position of the current iteration of the current population individual, μ and r represent random numbers in [0,1], represents the position of the optimal population individual of the current iteration, I represents a random integer from the integer set {1,2}, represents the random position of the prey falling on the ground, ub and lb represent the upper and lower bounds, fit(*) is the calculated fitness, S represents the quantum behavior strategy term, α represents the dynamic contraction and expansion coefficient, α max , α min The maximum and minimum values of the dynamic contraction and expansion coefficients. The quantum behavior strategy is an optimization method based on the principles of quantum mechanics. By introducing the characteristics of quantum states and quantum bits and taking advantage of the uncertainty of quantum particles in the search space, the global search capability and efficient convergence speed of the algorithm are improved.
[0086] In the exploration phase, this application divides the population into two parts, and uses different update formulas and quantum behavior strategies to update the position. This staged optimization idea not only enhances the global search capability of the algorithm, but also takes into account the refinement of local search, balancing the exploration and development capabilities of the algorithm.
[0087] Calculate the fitness value of the raccoon individual after the updated position. If the fitness of the new position calculated by each raccoon in the population is less than the optimal fitness, it means that the current position of the individual is better, and the position of the raccoon individual is updated; otherwise, the raccoon individual remains in the original position. This is equivalent to executing a greedy selection, and its update equation is as follows:
[0088]
[0089] In the development phase of the algorithm, the population uses the following formula and lens reverse learning strategy to update individual positions. The lens reverse learning strategy is introduced in the development phase. By reversing the optimal solution, an elite solution is generated as a new attractor to guide the population to gather in more promising areas. At the same time, as the number of iterations increases, the search range gradually shrinks, achieving a smooth transition from global search to local search, and accelerating the convergence speed of the algorithm.
[0090] The population individual update expression is as follows:
[0091]
[0092] Among them, ub L lb L Represents the upper and lower bounds that are continuously updated with the number of iterations, ub and lb represent the upper and lower bounds, Indicates the position of the next iteration of the current population individual, represents the current iteration position of the current population individual, and r represents a random number [0,1]. The lens reverse learning strategy expression is as follows:
[0093]
[0094] in For the current position, is the optimal position after reverse solution, t and T are the current iteration number and the maximum iteration number respectively. Repeat the greedy selection fitness value sorting.
[0095] Store the location and optimal fitness value of the optimal solution, and determine whether the algorithm loop meets the termination conditions. If the conditions are met, output the location and optimal fitness value of the optimal solution; otherwise, return to continue iterating.
[0096] In the optimization process of this application, the boundary of the search space is not fixed, but dynamically updated as the number of iterations increases. This adaptive boundary update strategy can dynamically adjust the search range according to the location of the current optimal solution, which not only avoids blind search but also reduces the risk of the algorithm falling into a local optimum.
[0097] Taking a six-degree-of-freedom robotic arm as an example, given the four trajectory points of the robotic arm in the Cartesian space coordinate system, namely the starting point, two intermediate points and the end point, these path points are converted into the corresponding angle values of the joint space according to the inverse kinematics equation as shown in the following table.
[0098]
[0099] Simulation experiments are used to verify the optimization algorithm proposed in this application. Matlab2022b is used to respectively use the optimized coati algorithm, coati algorithm and whale algorithm to perform time-optimal trajectory planning under the constraints. Figure 3 It is a comparison curve of the iterative convergence of the fitness of the three algorithms in this application; Figure 4 This is a box plot comparing the optimization results of the three algorithms in this application. Figures 5 to 7 The curve change diagram of the joint angle, joint angular velocity and joint angular acceleration simulated in this application. In summary, a method for time optimal trajectory planning of a robot arm based on the optimized coati algorithm uses the robot arm to optimize the running time under the constraint conditions, thereby improving the working efficiency of the robot arm while ensuring the smooth operation of the robot arm.
[0100] The invention of the present application and its implementation methods are described schematically above. The description is not restrictive. Without departing from the spirit or basic features of the present application, the present application can be implemented in other specific forms. What is shown in the accompanying drawings is only one of the implementation methods of the invention of the present application. The actual structure is not limited to this. Any figure mark in the claims should not limit the claims involved. Therefore, if a person of ordinary skill in the art is inspired by it, without departing from the purpose of the present invention, a structural method and an embodiment similar to the technical solution are designed without creativity, which should all fall within the scope of protection of this patent. In addition, the word "including" does not exclude other elements or steps, and the word "one" before the element does not exclude the inclusion of "multiple" elements. The multiple elements stated in the product claim can also be implemented by one element through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
Claims
1. A robot arm trajectory planning method based on the optimized coati algorithm, characterized in that: include: The kinematic model of the robot arm is established according to the homogeneous transformation matrix between adjacent joints of the robot arm and the positive kinematic equation of the end effector relative to the base coordinate system; The total running time of each joint of the robot arm is taken as the objective function f(t), and the angle, angular velocity and angular acceleration of each joint of the robot arm are taken as the constraints; According to the constraints, the motion trajectory of the robot is generated using the piecewise polynomial interpolation function, and the total running time of the motion trajectory is obtained; The improved coati algorithm is used to optimize the motion trajectory, the optimized motion trajectory is obtained, and the total running time of the optimized motion trajectory is obtained; The improved coati algorithm initializes the population of the coati algorithm through Logistic chaotic mapping, and updates the positions of the individuals in the population by using quantum behavior strategy and lens reverse learning strategy.
2. The robot arm trajectory planning method based on the optimized coati algorithm according to claim 1 is characterized in that: The calculation formula of the objective function f(t) is: f(t)=min(t j1 +t j2 +t j3 ) Among them, t j1 represents the running time of the first path trajectory of the jth joint of the robot; t j2 represents the running time of the second path trajectory of the jth joint of the robot; t j3 represents the running time of the third path trajectory of the jth joint of the robot arm; t represents the joint running time; j1 represents the jth joint of the first path; j2 represents the jth joint of the second path; j3 represents the jth joint of the third path; The constraints are: Among them, θ j (t) and They represent the angle, angular velocity and angular acceleration of the j-th joint of the robot over time, θ jmax , and They respectively represent the maximum angle, maximum angular velocity and maximum angular acceleration allowed during the movement of the j-th joint of the robot; t represents the joint running time; j represents the joint number.
3. The robot arm trajectory planning method based on the optimized coati algorithm according to claim 2, characterized in that: The motion trajectory of the robot arm is generated using piecewise polynomial interpolation functions, including: Constructing polynomial interpolation functions Q1, Q2 and Q3 of the first path, the second path and the third path respectively; According to the constraint conditions, the angle, angular velocity and angular acceleration of the end point of the first path are used as the angle, angular velocity and angular acceleration of the starting point of the second path, and the angle, angular velocity and angular acceleration of the end point of the second path are used as the angle, angular velocity and angular acceleration of the starting point of the third path; Generate a first path, a second path, and a third path respectively using polynomial interpolation functions Q1, Q2, and Q3; Connecting the first path, the second path and the third path in sequence to obtain a motion trajectory of the robot arm; The objective function f(t) is used to calculate the total running time of the robot's motion trajectory.
4. The robot arm trajectory planning method based on the optimized coati algorithm according to claim 3 is characterized in that: The polynomial interpolation function Q1 of the first path is: Among them, t1 represents the running time of the i-th joint of the robot arm in the first path, q i1 (t) represents the angle of the i-th joint of the robot in the first path, Represents the angular velocity of the i-th joint of the robot in the first path, represents the angular acceleration of the i-th joint of the robot in the first path, a 13 、a 12 、a 11 and a 10 are the coefficients of the polynomial interpolation function of the first path segment.
5. The robot arm trajectory planning method based on the optimized coati algorithm according to claim 3 is characterized in that: The polynomial interpolation function Q2 of the second path is: Among them, t2 represents the running time of the i-th joint of the robot arm in the second path, q i2 (t) represents the angle of the i-th joint of the robot in the second path, represents the angular velocity of the i-th joint of the robot in the second path, represents the angular acceleration of the i-th joint of the robot in the second path, a 25 、a 24 、a 23 、a 22 、a 21 and a 20 are the coefficients of the polynomial interpolation function of the second path segment.
6. The robot arm trajectory planning method based on the optimized coati algorithm according to claim 3 is characterized in that: The polynomial interpolation function Q3 of the third path is: Among them, t3 represents the running time of the i-th joint of the robot arm in the third path, q i3 (t) represents the angle of the i-th joint of the robot in the third path, represents the angular velocity of the i-th joint of the robot in the third path, represents the angular acceleration of the i-th joint of the robot in the third path, a 33 、a 32 、a 31 and a 30 are the coefficients of the polynomial interpolation function of the third path segment.
7. The robot arm trajectory planning method based on the optimized coati algorithm according to claim 2, characterized in that: Use the improved coati algorithm to optimize the motion trajectory, including: Initialize the parameters of the coati algorithm, which include the population size N, the maximum number of iterations T, the upper limit ub and the lower limit lb of the search space; Initialize the population using Logistic chaotic mapping; When the number of iterations is less than or equal to half of the maximum number of iterations T, the quantum behavior strategy is used to update the positions of the first and second parts of individuals in the population, respectively. The first part is the first N / 2 individuals, and the second part is the last N / 2 individuals. Calculate the objective function value of the coati individual after the position is updated as the individual fitness value; According to the individual fitness value, the greedy selection strategy is used to determine whether the fitness value of the individual after the updated position is greater than the fitness value of the original position. If so, the individual position is updated, if not, the original position remains unchanged; When the number of iterations is greater than half of the maximum number of iterations T, the lens reverse learning strategy is used to update the positions of all individuals in the population; Repeat the iterative update until the preset termination condition is met, and select the individual with the best individual fitness value as the optimal solution; According to the optimal solution, an optimized motion trajectory is generated, and the total running time of the optimized motion trajectory is calculated.
8. The robot arm trajectory planning method based on the optimized coati algorithm according to claim 7, characterized in that: Logistic chaotic mapping uses the following formula to initialize the population: X i =mod(λ·P n ·(1-P n ),1)·(ub-lb)+lb Among them, X i represents the initial position of the individual in the search space, λ represents the control parameter, mod(*) represents the modulus function, and Pn represents the Logistic chaotic sequence.
9. The robot arm trajectory planning method based on the optimized coati algorithm according to claim 7, characterized in that: When the number of iterations is less than or equal to half of the maximum number of iterations T, the following formula and quantum behavior strategy are used to update the individual positions of the first part of individuals in the population: Among them, i represents the individual of the current iteration population, t represents the current iteration number, and T represents the maximum iteration number. Indicates the position of the next iteration of the current population individual, Indicates the position of the current iteration of the current population individual, represents the position of the optimal population individual of the current iteration, I represents a random integer from the integer set {1,2}, S represents the quantum behavior strategy term, α represents the dynamic contraction and expansion coefficient, α max , α min The maximum and minimum values of the dynamic shrinkage and expansion coefficients.
10. The robot arm trajectory planning method based on the optimized coati algorithm according to claim 7, characterized in that: When the number of iterations is less than or equal to half of the maximum number of iterations T, the following formula and quantum behavior strategy are used to update the individual positions of the second part of individuals in the population: Among them, i represents the individual of the current iteration population, t represents the current iteration number, and T represents the maximum iteration number. Indicates the position of the next iteration of the current population individual, represents the current iteration position of the current population individual, μ and r represent random numbers in [0,1], represents the position of the optimal population individual of the current iteration, I represents a random integer from the integer set {1,2}, represents the random position of the prey falling on the ground, ub and lb represent the upper and lower bounds, fit(*) is the calculated fitness, S represents the quantum behavior strategy term, α represents the dynamic contraction and expansion coefficient, α max , α min The maximum and minimum values of the dynamic shrinkage and expansion coefficients.
11. The robot arm trajectory planning method based on the optimized coati algorithm according to claim 7, characterized in that: When the number of iterations is greater than half of the maximum number of iterations T, the lens reverse learning strategy is used to update the positions of all individuals in the population: Among them, ub L lb L Represents the upper and lower bounds that are continuously updated with the number of iterations, ub and lb represent the upper and lower bounds, Indicates the position of the next iteration of the current population individual, represents the current iteration position of the current population individual, r represents a random number in [0,1], The reverse solution of the position of the next iteration of the current population individual, a and b represent the boundaries of the lens reverse learning solution, and k represents the coefficient that changes with the number of iterations.
12. A robot arm trajectory planning system based on the optimized coati algorithm, characterized in that: include: The modeling module establishes the kinematic model of the robot arm according to the homogeneous transformation matrix between adjacent joints of the robot arm and the positive kinematic equation of the end effector relative to the base coordinate system; The trajectory generation module uses the total running time of each joint of the robot as the objective function, the angle, angular velocity and angular acceleration of each joint of the robot as the constraint conditions, and uses the piecewise polynomial interpolation function to generate the motion trajectory of the robot; The trajectory optimization module uses the improved coati algorithm to optimize the motion trajectory and calculates the total running time of the optimized motion trajectory.
Citation Information
Patent Citations
Mechanical arm polynomial interpolation trajectory planning method based on QLPSO algorithm
CN114952848A
Mechanical arm time optimal trajectory planning method based on improved particle swarm optimization
CN117901115A
Energy system optimization scheduling method considering flexible resources and green certificate carbon transactions
CN118229020A
Method and system for optimizing feeding and discharging motion trail of mechanical arm of lens module
CN118559707A
Kinetic parameter identification method for building robot
CN119217378A
Cited By
Picking mechanical arm trajectory planning method and device, terminal and medium
CN120395916A
Plane mechanical arm trajectory planning method and system for stamping production line and medium
CN120480927A
Track optimization method for small-rigidity part transfer mechanical arm in narrow space
CN121912405A
A trajectory optimization method for a robotic arm for transporting low-rigidity parts in a narrow space
CN121912405B