A mechanical arm trajectory planning method and system based on an optimized long-nosed raccoon algorithm

By optimizing the Long-Nosed Raccoon algorithm, utilizing Logistic chaotic mapping and quantum behavior strategies, and combining lens back-learning to optimize the robotic arm trajectory, the problem of robotic arm trajectory planning easily getting trapped in local optima was solved, and the generation of time-optimal trajectories and efficient operation of the robotic arm were achieved.

CN119952706BActive Publication Date: 2026-07-21ANHUI UNIVERSITY OF TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANHUI UNIVERSITY OF TECHNOLOGY
Filing Date
2025-02-21
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing robotic arm trajectory planning methods are prone to getting stuck in local optima and are difficult to generate time-optimal trajectories, which prevents further improvement in the working efficiency of robotic arms.

Method used

The trajectory planning is based on the optimized long-nosed raccoon algorithm. The population is initialized by Logistic chaotic mapping, and the robot arm's motion trajectory is optimized by combining quantum behavior strategy and lens back learning strategy to generate the time-optimal trajectory that meets the constraints.

Benefits of technology

This improves the convergence speed and accuracy of robotic arm trajectory planning, generates better motion trajectories, and ensures efficient operation of the robotic arm under constraints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119952706B_ABST
    Figure CN119952706B_ABST
Patent Text Reader

Abstract

The application discloses a mechanical arm trajectory planning method and system based on an optimized long-nosed raccoon algorithm, and belongs to the field of mechanical arm motion planning, and comprises the following steps: establishing a mechanical arm kinematics model; taking the total running time of each joint of the mechanical arm as a target function f(t), and taking the joint angle, angular velocity and angular acceleration of the mechanical arm as constraint conditions; generating the motion trajectory of the mechanical arm by using a piecewise polynomial interpolation function according to the constraint conditions, and obtaining the total running time of the motion trajectory; optimizing the motion trajectory by using an improved long-nosed raccoon algorithm, obtaining the optimized motion trajectory, and obtaining the total running time of the optimized motion trajectory; the improved long-nosed raccoon algorithm initializes the population of the long-nosed raccoon algorithm through a Logistic chaotic mapping, and updates the position of the population individuals by using a quantum behavior strategy and a lens reverse learning strategy; and the application improves the convergence speed and convergence precision, and has stronger robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robotic arm path planning, and more specifically, to a robotic arm trajectory planning method and system based on the optimized Long-nosed Raccoon algorithm. Background Technology

[0002] With the continuous advancement and development of robotics technology, robots have been widely applied in key fields such as industrial production, energy, and medicine. As a crucial actuator of robots, the robotic arm's motion performance directly impacts the robot's work efficiency and stability. To pursue more efficient and stable robotic arms, trajectory planning has become one of the important indicators for evaluating the robotic arm's motion process. In the field of robotic arm trajectory planning, time-optimal trajectory planning is a research hotspot. Time-optimal refers to optimizing the trajectory with the shortest possible motion time while satisfying the kinematic constraints of the robotic arm. The significance of time-optimal trajectory planning lies in two aspects: firstly, motion time directly reflects the working efficiency of the robotic arm, which is crucial for time-sensitive applications such as industrial production; secondly, the speed and accuracy of trajectory planning also relate to whether the robotic arm can complete its tasks stably and efficiently.

[0003] Currently, common methods for robotic arm trajectory planning include polynomial interpolation and spline interpolation, which can generate smooth trajectories that satisfy the boundary states of position, velocity, and acceleration. However, these methods struggle to achieve optimal trajectory time. Therefore, intelligent optimization algorithms such as genetic algorithms and particle swarm optimization have been introduced into time-optimal trajectory planning to obtain time-optimal solutions under different velocity constraints. However, traditional intelligent optimization algorithms generally suffer from weak global optimization capabilities and a tendency to get trapped in local optima, resulting in trajectories that are difficult to optimize in terms of running time, thus hindering further improvements in the robotic arm's efficiency.

[0004] Chinese patent application CN202410198092.2, published on April 19, 2024, discloses a time-optimal trajectory planning method for a robotic arm based on an improved particle swarm optimization (PSO) algorithm. The method includes: obtaining the mapping relationship between the joints of the robotic arm according to its kinematic model; obtaining the interpolation angles of each joint in the joint space based on the path points of the robotic arm in Cartesian space and by inverting the mapping relationship; generating a continuous trajectory equation of the position, velocity, and acceleration of the robotic arm using a mixed polynomial interpolation function based on the interpolation angles of each joint in the joint space; obtaining a fitness function based on the optimization objective and constraints; and optimizing the trajectory running time of the robotic arm using an improved PSO algorithm. However, while the PSO algorithm has a certain global search capability, its convergence speed is relatively slow, and it is prone to premature convergence to a local optimum. This method improves the PSO algorithm, but its optimization performance still needs further improvement for complex time-optimal trajectory planning problems. Summary of the Invention

[0005] 1. Technical problems to be solved

[0006] To address the issue that existing robotic arm trajectory planning techniques are prone to getting trapped in local optima, this application provides a robotic arm trajectory planning method and system based on the optimized Long-nosed Raccoon algorithm. First, the population is initialized using Logistic chaotic mapping, which improves the diversity of initial solutions and avoids premature convergence. Then, during the iteration process, quantum behavior strategy and lens back-learning strategy are integrated to balance the algorithm's local exploitation and global search capabilities, thereby improving convergence speed and accuracy and exhibiting stronger robustness.

[0007] 2. Technical Solution

[0008] The purpose of this application is achieved through the following technical solution.

[0009] One aspect of this application provides a robotic arm trajectory planning method based on an optimized Longnose Raccoon algorithm, comprising: establishing a kinematic model of the robotic arm based on the homogeneous transformation matrix between adjacent joints of the robotic arm and the forward kinematic equations of the end effector relative to the base coordinate system; using the total running time of each joint of the robotic arm as the objective function f(t), and the angle, angular velocity, and angular acceleration of each joint of the robotic arm as constraints; generating the motion trajectory of the robotic arm using a piecewise polynomial interpolation function according to the constraints, and obtaining the total running time of the motion trajectory; optimizing the motion trajectory using an improved Longnose Raccoon algorithm to obtain the optimized motion trajectory, and obtaining the total running time of the optimized motion trajectory; wherein the improved Longnose Raccoon algorithm initializes the population of the Longnose Raccoon algorithm through a Logistic chaotic mapping, and updates the position of the individuals in the population using a quantum behavior strategy and a lens back-learning strategy.

[0010] Furthermore, taking the total running time of all joints of the robotic arm as the objective function f(t), and the angles, angular velocities, and angular accelerations of each joint as constraints, the formula for calculating the objective function f(t) is: f(t) = min(t) j1 +t j2 +t j3 ), where t j1 t represents the runtime of the first segment of the path trajectory of the j-th joint of the robotic arm; j2 t represents the runtime of the second segment of the path trajectory of the j-th joint of the robotic arm; j3 The runtime of the third segment of the path trajectory of the j-th joint of the robotic arm is represented by t; the joint runtime is represented by j; and 1, 2, and 3 represent the first, second, and third segments of the path, respectively.

[0011] The constraints are: Where, θ j(t), and Let θ represent the angle, angular velocity, and angular acceleration of the j-th joint of the robotic arm as a function of time. jmax , and These represent the maximum allowable angle, maximum angular velocity, and maximum angular acceleration during the movement of the j-th joint of the robotic arm, respectively; t represents the joint running time, and j represents the nth joint.

[0012] Furthermore, based on the constraints, the motion trajectory of the robotic arm is generated using piecewise polynomial interpolation functions, and the initial total running time of the motion trajectory is obtained. This includes: constructing polynomial interpolation functions Q1, Q2, and Q3 for the first, second, and third paths, respectively; using the angle, angular velocity, and angular acceleration of the termination point of the first path as the angle, angular velocity, and angular acceleration of the starting point of the second path, and using the angle, angular velocity, and angular acceleration of the termination point of the second path as the angle, angular velocity, and angular acceleration of the starting point of the third path, respectively; generating the first, second, and third paths using polynomial interpolation functions Q1, Q2, and Q3, respectively; and sequentially connecting the first, second, and third paths to obtain the motion trajectory of the robotic arm. The total running time of the robotic arm's motion trajectory is calculated using the objective function f(t).

[0013] Furthermore, the polynomial interpolation function Q1 for the first path is: Where t1 represents the running time of the i-th joint of the robotic arm in the first path segment, and q i1 (t) represents the angle of the i-th joint of the robotic arm in the first segment of the path. This represents the angular velocity of the i-th joint of the robotic arm in the first segment of the path. a represents the angular acceleration of the i-th joint of the robotic arm in the first segment of the path. 13 a 12 a 11 and a 10 These are the coefficients of the polynomial interpolation function for the first path segment.

[0014] Furthermore, the polynomial interpolation function Q2 for the second path is: Where t2 represents the running time of the i-th joint of the robotic arm in the second path segment, and q i2 (t) represents the angle of the i-th joint of the robotic arm in the second segment of the path. This represents the angular velocity of the i-th joint of the robotic arm in the second segment of the path. a represents the angular acceleration of the i-th joint of the robotic arm in the second segment of the path. 25 a 24 a 23 a 22 a 21 and a20 These are the coefficients of the polynomial interpolation function for the second path segment.

[0015] Furthermore, the polynomial interpolation function Q3 for the third path is: Where t3 represents the running time of the i-th joint of the robotic arm in the third path segment, and q i3 (t) represents the angle of the i-th joint of the robotic arm in the third segment of the path. This represents the angular velocity of the i-th joint of the robotic arm in the third segment of the path. a represents the angular acceleration of the i-th joint of the robotic arm in the third segment of the path. 33 a 32 a 31 and a 30 These are the coefficients of the polynomial interpolation function for the third path segment.

[0016] Furthermore, the improved long-nosed raccoon algorithm is used to optimize the movement trajectory, obtaining the optimized trajectory and the total running time of the optimized trajectory. This includes: initializing the parameters of the long-nosed raccoon algorithm, which include the population size N, the maximum number of iterations T, and the upper and lower bounds of the search space ub and lb; initializing the population using a Logistic chaotic mapping; when the number of iterations is less than or equal to half of the maximum number of iterations T, updating the positions of the first and second parts of the population using a quantum behavior strategy, where the first part consists of the first N / 2 individuals and the second part consists of the last N / 2 individuals; calculating the position update... The objective function value of the newly generated long-nosed raccoon individual is used as its fitness value. Based on the individual fitness value, a greedy selection strategy is used to determine whether the fitness value of the individual after updating its position is greater than the fitness value of its original position. If it is, the individual position is updated; otherwise, the original position is kept unchanged. When the number of iterations exceeds half of the maximum number of iterations T, a lens back-learning strategy is used to update the positions of all individuals in the population. This iterative update is repeated until a preset termination condition is met, and the individual with the best fitness value is selected as the optimal solution. Based on the optimal solution, an optimized motion trajectory is generated, and the total running time of the optimized motion trajectory is calculated.

[0017] Furthermore, the Logistic chaotic mapping initializes the population using the following formula: Xi = mod(λ·Pn·(1-Pn),1)·(ub-lb) + lb, where X i λ represents the initial position of an individual in the population within the search space, λ represents the control parameter, mod(*) represents the modulo 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 individual positions of the first group of individuals in the population are updated using the following formula: Where i represents an individual in the current iteration population, t represents the current iteration number, and T represents the maximum number of iterations. This indicates the position of the current population individual in the next iteration. This indicates the current iteration position of an individual in the current population. Let I represent the position of the optimal individual in the population during the current iteration, I represent a random integer from the set of integers {1,2}, S represent the quantum behavior policy term, and α represent the dynamic contraction / expansion coefficient. max α min The maximum and minimum values ​​of the dynamic contraction and expansion coefficient;

[0019] This application introduces a quantum behavior mechanism, enabling individuals to search globally in the solution space. This enhances the algorithm's exploration capability, helps it escape local optima, and finds better path planning solutions. S represents the quantum behavior policy term, which controls the individual's movement direction through its probability magnitude, guiding the individual towards a direction 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 individual positions of the second part of the population are updated using the following formula:

[0021]

[0022]

[0023] Where i represents an individual in the current iteration population, t represents the current iteration number, and T represents the maximum number of iterations. This indicates the position of the current population individual in the next iteration. This represents the current iteration position of an individual in the current population, where μ and r represent random numbers in the range [0,1]. Let represent the position of the best individual in the population during the current iteration, and I represent a random integer from the set of integers {1,2}. This represents the random position where the prey lands on the ground, ub and lb represent the upper and lower bounds, fit(*) is used to calculate fitness, S represents the quantum behavior policy term, and α represents the dynamic contraction and expansion coefficient. max α min The maximum and minimum values ​​of the dynamic contraction and expansion coefficient;

[0024] 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, individuals are not only affected by their own state and the global optimal solution, but also by the information of other quantum individuals, thus updating to a new state that is more conducive to optimization. This enhances the information utilization and sharing capabilities of the population. Through random quantum measurement, the individual state can change abruptly in the continuous solution space, overcoming the limitations of traditional optimization algorithms in individual updates. It can move in a wide range and nonlinearly in the solution space, increasing the search breadth and randomness. At the same time, by selectively retaining superior individuals, it can guide the population towards a better solution.

[0025] Furthermore, when the number of iterations exceeds half of the maximum number of iterations T, a lens back-learning strategy is used to update the position of each individual in the population:

[0026]

[0027]

[0028]

[0029] k = (1 + (t / T)) 12 ) 10

[0030] Among them, ub L lb L The upper and lower bounds are continuously updated as the number of iterations changes; ub and lb represent the upper and lower bounds, respectively. This indicates the position of the current population individual in the next iteration. This indicates the current iteration position of an individual in the current population, where r represents a random number in the range [0,1]. The reverse solution for the position of the current population individual in the next iteration, where a and b represent the boundaries of the lens's reverse learning solution, and k represents the coefficient that changes with the number of iterations.

[0031] In this application, a lens-based back-learning strategy is used to focus the search. When more than half of the iterations have been completed, the algorithm has performed a sufficient global exploration, and the population begins to converge towards the optimal solution region. At this point, using lens-based back-learning can accelerate the population convergence speed and improve the search efficiency of the algorithm in the later stages.

[0032] On the other hand, lens back-learning, by introducing back solutions and dynamically changing search boundaries, can resample and perturb the solution space based on existing solutions, generating some new solutions that are related to but different from the current solution, increasing population diversity and preventing the algorithm from getting trapped in local optima too early.

[0033] In the problem of robotic arm trajectory planning, the search for the global optimum is challenging due to the large number of path points, complex constraints, and the high-dimensional, nonlinear, and multi-modal nature of the solution space. The lens-based back-learning strategy guides the population to focus on the optimal solution region in later stages, enabling rapid localization of the global optimum, improving the accuracy and efficiency of path planning, and resulting in a better robotic arm trajectory.

[0034] One aspect of this application provides a robotic arm trajectory planning system based on an optimized Long-Nosed Raccoon algorithm, comprising: a modeling module for establishing a kinematic model of the robotic arm based on the homogeneous transformation matrix between adjacent joints and the forward kinematic equations of the end effector relative to the base coordinate system; a trajectory generation module for generating the motion trajectory of the robotic arm using a piecewise polynomial interpolation function with the total running time of each joint as the objective function and the angles, angular velocities, and angular accelerations of each joint as constraints; and a trajectory optimization module for optimizing the motion trajectory using the improved Long-Nosed Raccoon algorithm and calculating the total running time of the optimized motion trajectory.

[0035] 3. Beneficial effects

[0036] Compared to existing technologies, the advantages of this application are:

[0037] (1) Existing technologies require mapping the Cartesian path points to the joint space through inverse kinematics of the robotic arm to obtain the interpolated angles of each joint. This method has the following problems: First, inverse kinematics of the robotic arm is a complex nonlinear problem, and the solution process is cumbersome and computationally intensive; second, when the robotic arm has a singular configuration, the inverse solution may not exist or may not be unique, leading to trajectory planning failure; third, the joint angles obtained from the inverse solution may exceed the joint motion range, requiring additional processing.

[0038] This application directly establishes a kinematic optimization model within the joint space, constrained by joint angles, angular velocities, and angular accelerations. This forward modeling method avoids complex inverse kinematics calculations, simplifying the kinematic modeling process. Furthermore, by directly constraining and optimizing joint parameters, it ensures that the generated trajectory meets the kinematic constraints of the robotic arm, eliminating the need for additional singularity and joint limit checks, thus improving the success rate and efficiency of trajectory planning.

[0039] (2) Existing technologies use particle swarm optimization (PSO) for trajectory optimization. Although it has a certain global search capability, the algorithm has a slow convergence speed and is prone to premature convergence to a local optimum. This application uses the Long-nosed Raccoon algorithm, which has a stronger global search capability and faster convergence speed and accuracy compared to PSO.

[0040] Building upon this foundation, this application further enhances the algorithm's performance through the following strategies: Logistic chaotic mapping replaces random initialization, improving the diversity of the initial population and the search space coverage, thus avoiding premature convergence; the quantum behavior strategy simulates the foraging behavior of raccoons, enhancing the algorithm's global exploration capability and preventing it from getting trapped in local optima through quantum superposition; the lens back learning strategy dynamically adjusts the search range, gradually guiding the optimization focus towards the vicinity of the global optimum, thereby accelerating the algorithm's convergence process.

[0041] (3) Existing technologies use 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 segment connection, resulting in an unsmooth trajectory; the selection of the order also lacks theoretical basis, affecting the smoothness and accuracy of the trajectory.

[0042] This application employs piecewise hybrid polynomial interpolation. Leveraging the continuity of position, velocity, and acceleration inherent in hybrid polynomials, a smooth, abrupt trajectory can be generated. Simultaneously, by appropriately setting the boundary conditions (starting and ending states) of each polynomial segment, the trajectory can satisfy the dynamic characteristics of the robotic arm, such as velocity and acceleration limitations and continuous abrupt changes. Hybrid polynomials offer better numerical stability and parameter adjustment flexibility, resulting in a trajectory that better matches the actual motion requirements of the robotic arm. Attached Figure Description

[0043] Figure 1 This is a flowchart of a robotic arm trajectory planning method based on the optimized long-nosed raccoon algorithm of this application;

[0044] Figure 2 This is a kinematic model diagram of the six-degree-of-freedom robotic arm of this application;

[0045] Figure 3 The graph shows a comparison of the fitness iteration convergence curves of the three algorithms in this application.

[0046] Figure 4 Box plot showing the comparison of optimization results of the three algorithms in this application;

[0047] Figure 5 This is a simulation of a joint angle curve variation diagram for this application;

[0048] Figure 6 This is a simulation of a joint angular velocity curve variation diagram in this application;

[0049] Figure 7 This is a simulation of the joint angular acceleration curve variation in this application. Detailed Implementation

[0050] The present application will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0051] like Figure 1 As shown, this application includes the following steps:

[0052] This embodiment uses a six-degree-of-freedom robotic arm as an example to establish its kinematic model. The structural parameters of the robotic arm are as follows: Figure 2 As shown, the equation for the homogeneous transformation matrix between adjacent joints of the robotic 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, i.e., the forward kinematics equations of the robotic arm:

[0055]

[0056] The objective of this application is to minimize the total running time of each joint of the robotic arm while satisfying the joint motion constraints. To this end, we use the total running time of the robotic arm joints as the objective function and the constraints on joint angle, angular velocity, and angular acceleration as optimization conditions, constructing the following optimization model:

[0057] f(t)=min(t j1 +t j2 +t j3 )

[0058]

[0059] Among them, t j1 t represents the runtime of the first segment of the path trajectory of the j-th joint of the robotic arm; j2 tj3 represents the runtime of the first segment of the path trajectory of the j-th joint of the robotic arm; θ represents the runtime of the first segment of the path trajectory of the j-th joint of the robotic arm; j (t), and Let θ represent the angle, angular velocity, and angular acceleration of the j-th joint of the robotic arm as a function of time. jmax , and These represent the maximum allowable angle, maximum angular velocity, and maximum angular acceleration during the movement of the j-th joint of the robotic arm, respectively; t represents the joint running time; j represents the nth joint; 1, 2, and 3 represent the first, second, and third segments of the path, respectively.

[0060] Optimize the objective function f(t) = min(t) j1 +t j2 +tj3 The objective function represents the sum of the time taken for the six joints of the robotic arm to travel on their respective trajectories, reflecting the total time cost for the robotic arm to complete the task. By optimizing this objective function, the robotic arm can complete the predetermined motion task in the shortest possible time.

[0061] To generate a robotic arm motion trajectory that meets the requirements of continuity and smoothness, this application employs a 3-5-3 hybrid polynomial interpolation method. This application divides the motion trajectory of each joint into three segments: the first and last segments use cubic polynomial interpolation, and the middle segment uses quintic polynomial interpolation. By appropriately 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 for the three-segment polynomial interpolation function is as follows:

[0063]

[0064] Where t1 represents the running time of the i-th joint of the robotic arm in the first path segment, and q i1 (t) represents the angle of the i-th joint of the robotic arm in the first segment of the path. This represents the angular velocity of the i-th joint of the robotic arm in the first segment of the path. a represents the angular acceleration of the i-th joint of the robotic arm in the first segment of the path. 13 a 12 a 11 and a 10 These are the coefficients of the polynomial interpolation function for the first path segment.

[0065] Where t2 represents the running time of the i-th joint of the robotic arm in the second path segment, and q i2 (t) represents the angle of the i-th joint of the robotic arm in the second segment of the path. This represents the angular velocity of the i-th joint of the robotic arm in the second segment of the path. a represents the angular acceleration of the i-th joint of the robotic arm in the second segment of the path. 25 a 24 a 23 a 22 a 21 and a 20 These are the coefficients of the polynomial interpolation function for the second path segment.

[0066]

[0067] Where t3 represents the running time of the i-th joint of the robotic arm in the third path segment, and q i3 (t) represents the angle of the i-th joint of the robotic arm in the third segment of the path. This represents the angular velocity of the i-th joint of the robotic arm in the third segment of the path. a represents the angular acceleration of the i-th joint of the robotic arm in the third segment of the path. 33 a 32 a 31 and a 30 These are the coefficients of the polynomial interpolation function for the third path segment.

[0068] To solve for the 14 unknown coefficients in the above expression, the motion constraints during trajectory planning are: the angular velocity and angular acceleration at the starting and ending points are 0, and the velocity and acceleration at the midpoints of the trajectory are continuous. Based on the above equations and constraints, a system of matrix equations 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] The coefficients of the corresponding 3-5-3 polynomial interpolation function can be solved using the aforementioned matrix equations. The resulting trajectory satisfies the continuity requirements of position, velocity, and acceleration throughout the entire motion cycle, exhibiting smoothness and stability, and is computationally efficient. In subsequent trajectory optimization, the optimization variable is the time of each trajectory segment, while the polynomial form of each segment remains constant.

[0074] This application introduces various strategies to improve the standard Long-nosed Raccoon algorithm, thereby enhancing the efficiency and quality of trajectory optimization.

[0075] First, initialize the search space for the long-nosed raccoon, where the population size is N, the maximum number of iterations is T, and the lower bound and upper bound of the search space are ub and lb. The population is initialized using a Logistic chaotic map, the expression of which is: Where λ is a control parameter, which is not zero; mod() is the modulo function, used to take the modulus and return the remainder; ub and lb are the upper and lower bounds of the search space; P n The sequence is chaotic. Traditional long-nosed raccoon algorithms use random initialization of the population, while this application introduces a Logistic chaotic mapping to generate initial solutions, enhancing population diversity and search space coverage, which helps the algorithm escape local optima.

[0076] During the initial iteration, in the exploration phase of the algorithm, the first half of the population updates their individual positions using the following formula and quantum behavior strategy, while the second half of the population updates their individual positions using the same formula and quantum behavior strategy.

[0077] The update expression for the first half of the population is as follows:

[0078]

[0079]

[0080] The specific update expression for the second half of the population is as follows:

[0081]

[0082]

[0083]

[0084]

[0085] Where i represents an individual in the current iteration population, t represents the current iteration number, and T represents the maximum number of iterations. This indicates the position of the current population individual in the next iteration. This represents the current iteration position of an individual in the current population, where μ and r represent random numbers in the range [0,1]. Let represent the position of the best individual in the population during the current iteration, and I represent a random integer from the set of integers {1,2}. This represents the random position where the prey lands on the ground, ub and lb represent the upper and lower bounds, fit(*) is used to calculate fitness, S represents the quantum behavior policy term, and α represents the dynamic contraction and expansion coefficient. max α min The maximum and minimum values ​​of the dynamic contraction and expansion coefficients. Quantum behavior strategy is an optimization method based on quantum mechanics principles. By introducing the characteristics of quantum states and qubits, and leveraging the uncertainty of quantum particles in the search space, it improves the algorithm's global search capability and efficient convergence speed.

[0086] During the exploration phase, this application divides the population into two parts, employing different update formulas and quantum behavior strategies for position updates. This phased optimization approach enhances the algorithm's global search capability while also ensuring refinement of local searches, thus balancing the algorithm's exploration and development capabilities.

[0087] Calculate the fitness value of the raccoon individual after updating its position. If the fitness of each raccoon at its new position is less than the optimal fitness, it means the current position is better, and the raccoon's position is updated; otherwise, the raccoon remains at its original position. This is equivalent to performing a greedy selection, and the update equation is as follows:

[0088]

[0089] During the algorithm's development phase, the population updates individual positions using the following formula and a lens back-learning strategy. Introducing the lens back-learning strategy during development involves generating an elite solution as a new attractor by back-solving the optimal solution, guiding the population to cluster towards more promising regions. Simultaneously, as the number of iterations increases, the search range gradually shrinks, achieving a smooth transition from global search to local search and accelerating the algorithm's convergence speed.

[0090] The specific expression for population individual update is as follows:

[0091]

[0092] Among them, ub L lb L The upper and lower bounds are continuously updated as the number of iterations changes; ub and lb represent the upper and lower bounds, respectively. This indicates the position of the current population individual in the next iteration. This represents the current iteration position of an individual in the current population, where r represents a random number in the range [0,1]. The specific expression for the lens back-learning strategy is as follows:

[0093]

[0094] in To determine the current position, Let t represent the optimal position after reverse engineering, and t and T represent the current iteration number and the maximum iteration number, respectively. Repeat the greedy selection and fitness value sorting process.

[0095] Store the location of the optimal solution and the optimal fitness value. Iterate through the algorithm to check if the termination condition is met. If the condition is met, output the location of the optimal solution and the optimal fitness value; otherwise, return to continue iterating.

[0096] In this application, the boundary of the search space is not fixed during the optimization process, but is dynamically updated as the number of iterations increases. This adaptive boundary update strategy can dynamically adjust the search range according to the position of the current optimal solution, which avoids blind searching and reduces the risk of the algorithm getting trapped in local optima.

[0097] Taking a six-degree-of-freedom robotic arm as an example, given the four trajectory points the robotic arm passes through in the Cartesian coordinate system—the starting point, two intermediate points, and the ending point—the angle values ​​corresponding to these path points in the joint space are calculated using the inverse kinematics equations, as shown in the table below.

[0098]

[0099] The optimization algorithm proposed in this application was verified by simulation experiments. Matlab2022b was used to perform time-optimal trajectory planning using the optimized Long-Nosed Raccoon algorithm, Long-Nosed Raccoon algorithm and Whale algorithm respectively under the constraints. Figure 3 The graph shows a comparison of the fitness iteration convergence curves of the three algorithms in this application. Figure 4 Box plot showing the comparison of optimization results of the three algorithms in this application. Figures 5-7 The figures show the changes in joint angle, joint angular velocity, and joint angular acceleration curves simulated in this application. In summary, a time-optimal trajectory planning method for a robotic arm based on the optimized Long-Nosed Raccoon algorithm optimizes the running time of the robotic arm under constraints, improving its work efficiency while ensuring smooth operation.

[0100] The foregoing illustrative description of the invention and its embodiments is not restrictive and can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. The accompanying drawings are only one embodiment of the invention, and the actual structure is not limited thereto. No reference numerals in the claims should limit the scope of the claims. Therefore, if a person skilled in the art, inspired by this description, designs a similar structure and embodiment without departing from the spirit of the invention, such design should fall within the scope of protection of this patent. Furthermore, the word "comprising" does not exclude other elements or steps, and the word "a" preceding an element does not exclude the inclusion of "a plurality" of that element. Multiple elements stated in the product claims can also be implemented by a single element through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.

Claims

1. A robotic arm trajectory planning method based on the optimized Long-nosed Raccoon algorithm, characterized in that, include: A kinematic model of the robotic arm is established based on the homogeneous transformation matrix between adjacent joints of the robotic arm and the positive kinematic equations of the end effector relative to the base coordinate system. The objective function is the total running time of all joints of the robotic arm. The constraints are the angles, angular velocities, and angular accelerations of each joint of the robotic arm. Based on the constraints, the motion trajectory of the robotic arm is generated using a piecewise polynomial interpolation function, and the total running time of the motion trajectory is obtained. The improved long-nosed raccoon algorithm is used to optimize the motion trajectory, and the total running time of the optimized motion trajectory is obtained. The improved long-nosed raccoon algorithm initializes the long-nosed raccoon population through Logistic chaotic mapping and updates the position of individuals in the population using quantum behavior strategy and lens back learning strategy. The motion trajectory of the robotic arm is generated using a piecewise polynomial interpolation function, including: Construct polynomial interpolation functions Q1, Q2, and Q3 for the first path, the second path, and the third path, respectively; According to the constraints, the angle, angular velocity, and angular acceleration of the first path termination point are taken as the angle, angular velocity, and angular acceleration of the second path starting point, and the angle, angular velocity, and angular acceleration of the second path termination point are taken as the angle, angular velocity, and angular acceleration of the third path starting point. The first path, the second path, and the third path are generated using polynomial interpolation functions Q1, Q2, and Q3, respectively. By sequentially connecting the first path, the second path, and the third path, the motion trajectory of the robotic arm can be obtained. The total running time of the robotic arm's motion trajectory is calculated using the objective function f(t); The improved long-nosed raccoon algorithm is used to optimize the movement trajectory, including: Initialize the parameters of the Long-nosed Raccoon 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 part and the second part of the population, respectively. The first part consists of the first N / 2 individuals and the second part consists of the last N / 2 individuals. Calculate the objective function value of the long-nosed raccoon individual after the location update, and use it as the individual fitness value; Based on the individual's fitness value, a greedy selection strategy is used to determine whether the individual's fitness value after updating its position is greater than the fitness value of its original position. If it is, the individual's position is updated; otherwise, the original position is kept unchanged. When the number of iterations is greater than half of the maximum number of iterations T, the position of each individual in the population is updated using a lens back learning strategy. Repeat the iterative update until the preset termination condition is met, and select the individual with the best fitness value as the optimal solution; Based on the optimal solution, the optimized motion trajectory is generated, and the total running time of the optimized motion trajectory is calculated.

2. The robotic arm trajectory planning method based on the optimized long-nosed raccoon algorithm according to claim 1, characterized in that: objective function The calculation formula is: in, The first representing the robotic arm The running time of the first segment of the joint's path trajectory; The first representing the robotic arm The running time of the second segment of the joint's path trajectory; The first representing the robotic arm The running time of the third segment of the joint path trajectory; t represents the joint running time; j1 represents the j-th joint of the first segment; j2 represents the j-th joint of the second segment; j3 represents the j-th joint of the third segment; The constraints are: in, , and These represent the first and second digits of the robotic arm. The angle, angular velocity, and angular acceleration that change over time during joint movement. , and These represent the first and second digits of the robotic arm. The maximum allowable angle, maximum angular velocity, and maximum angular acceleration during joint movement; j indicates which joint.

3. The robotic arm trajectory planning method based on the optimized long-nosed raccoon algorithm according to claim 1, characterized in that: The polynomial interpolation function Q1 for the first path is: in, Indicates the first robotic arm The running time of the joint in the first segment of the path. Representing the robotic arm The angle of the joint in the first segment of the path, Representing the robotic arm The angular velocity of the joint in the first segment of the path. Representing the robotic arm The angular acceleration of the joint in the first segment of the path. , , and These are the coefficients of the polynomial interpolation function for the first path segment.

4. The robotic arm trajectory planning method based on the optimized long-nosed raccoon algorithm according to claim 1, characterized in that: The polynomial interpolation function Q2 for the second path is: in, Indicates the first robotic arm The running time of the joint in the second path segment. Representing the robotic arm The angle of the joint in the second segment of the path, Representing the robotic arm The angular velocity of the joint in the second segment of the path. Representing the robotic arm The angular acceleration of the joint in the second segment of the path. , , , , and These are the coefficients of the polynomial interpolation function for the second path segment.

5. The robotic arm trajectory planning method based on the optimized long-nosed raccoon algorithm according to claim 1, characterized in that: The polynomial interpolation function Q3 for the third path is: in, Indicates the first robotic arm The running time of the joint in the third path segment. Representing the robotic arm The angle of the joint in the third segment of the path, Representing the robotic arm The angular velocity of the joint in the third segment of the path. Representing the robotic arm The angular acceleration of the joint in the third segment of the path. , , and These are the coefficients of the polynomial interpolation function for the third path segment.

6. The robotic arm trajectory planning method based on the optimized long-nosed raccoon algorithm according to claim 5, characterized in that: The Logistic chaotic mapping initializes the population using the following formula: in, λ represents the initial position of an individual in the population within the search space, λ represents the control parameter, mod(*) represents the modulo function, and Pn represents the Logistic chaotic sequence.

7. The robotic arm trajectory planning method based on the optimized long-nosed raccoon algorithm according to claim 5, characterized in that: When the number of iterations is less than or equal to half of the maximum number of iterations T, the individual positions of the first part of the population are updated using the following formula and quantum behavior strategy: in, This represents an individual in the current iteration of the population. Indicates the current iteration number. Indicates the maximum number of iterations. This indicates the position of the current population individual in the next iteration. This indicates the current iteration position of an individual in the current population. This indicates the position of the best individual in the population during the current iteration. Represents a set of integers A random integer, S, represents the quantum behavior policy term. Indicates the dynamic contraction and expansion coefficient. , The maximum and minimum values ​​of the dynamic contraction and expansion coefficient; express Random numbers.

8. The robotic arm trajectory planning method based on the optimized long-nosed raccoon algorithm according to claim 5, characterized in that: When the number of iterations is less than or equal to half of the maximum number of iterations T, the individual positions of the second part of the population are updated using the following formula and quantum behavior strategy: in, This represents an individual in the current iteration of the population. Indicates the current iteration number. Indicates the maximum number of iterations. This indicates the position of the current population individual in the next iteration. This indicates the current iteration position of an individual in the current population. express random numbers, This indicates the position of the best individual in the population during the current iteration. Represents a set of integers random integers, This indicates the random location where the prey landed on the ground. , Indicates upper and lower bounds, It calculates fitness, where S represents the quantum behavior policy term. Indicates the dynamic contraction and expansion coefficient. , The maximum and minimum values ​​of the dynamic contraction and expansion coefficient.

9. The robotic arm trajectory planning method based on the optimized long-nosed raccoon algorithm according to claim 5, characterized in that: When the number of iterations exceeds half of the maximum number of iterations T, the position of each individual in the population is updated using a lens back-learning strategy: in, , This represents the upper and lower bounds that are continuously updated as the number of iterations changes. , Indicates upper and lower bounds, This indicates the position of the current population individual in the next iteration. This indicates the current iteration position of an individual in the current population. express random numbers, The reverse solution for the position of the current individual in the next iteration. , This represents the boundary of the lens's back-learned solution. This represents a coefficient that changes with the number of iterations. Indicates the current iteration number. This indicates the maximum number of iterations.

10. A robotic arm trajectory planning system based on the optimized long-nosed raccoon algorithm, characterized in that, include: The modeling module establishes a kinematic model of the robotic arm based on the homogeneous transformation matrix between adjacent joints and the positive kinematic equations of the end effector relative to the base coordinate system. The trajectory generation module uses the total running time of each joint of the robotic arm as the objective function and the angle, angular velocity and angular acceleration of each joint of the robotic arm as constraints, and uses a piecewise polynomial interpolation function to generate the motion trajectory of the robotic arm. The trajectory optimization module uses an improved long-nosed raccoon algorithm to optimize the motion trajectory and calculates the total running time of the optimized motion trajectory. The process of generating the robotic arm's motion trajectory using a piecewise polynomial interpolation function includes: Construct polynomial interpolation functions Q1, Q2, and Q3 for the first path, the second path, and the third path, respectively; According to the constraints, the angle, angular velocity, and angular acceleration of the first path termination point are taken as the angle, angular velocity, and angular acceleration of the second path starting point, and the angle, angular velocity, and angular acceleration of the second path termination point are taken as the angle, angular velocity, and angular acceleration of the third path starting point. The first path, the second path, and the third path are generated using polynomial interpolation functions Q1, Q2, and Q3, respectively. By sequentially connecting the first path, the second path, and the third path, the motion trajectory of the robotic arm can be obtained. The total running time of the robotic arm's motion trajectory is calculated using the objective function f(t); The improved long-nosed raccoon algorithm is used to optimize the movement trajectory, including: Initialize the parameters of the Long-nosed Raccoon 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 part and the second part of the population, respectively. The first part consists of the first N / 2 individuals and the second part consists of the last N / 2 individuals. Calculate the objective function value of the long-nosed raccoon individual after the location update, and use it as the individual fitness value; Based on the individual's fitness value, a greedy selection strategy is used to determine whether the individual's fitness value after updating its position is greater than the fitness value of its original position. If it is, the individual's position is updated; otherwise, the original position is kept unchanged. When the number of iterations is greater than half of the maximum number of iterations T, the position of each individual in the population is updated using a lens back learning strategy. Repeat the iterative update until the preset termination condition is met, and select the individual with the best fitness value as the optimal solution; Based on the optimal solution, the optimized motion trajectory is generated, and the total running time of the optimized motion trajectory is calculated.