Mechanical arm time-optimal trajectory planning method based on improved sand cat group optimization algorithm
By improving the sand cat swarm optimization algorithm and the 5-7-5 hybrid polynomial interpolation function, the trajectory planning time of the robotic arm is optimized, which solves the problem of poor global search capability in the trajectory planning of the robotic arm in traditional algorithms. This enables the robotic arm to move efficiently and smoothly, improving work efficiency and dynamic performance.
Patent Information
- Application Number
- CN202411453207.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-10-17
AI Technical Summary
Existing traditional optimization algorithms suffer from poor global search capabilities, slow convergence speed, and susceptibility to getting trapped in local optima in time-optimal trajectory planning for robotic arms, making it difficult to optimize the running time of robotic arms while ensuring the smoothness and continuity of the trajectory.
An improved sand cat swarm optimization algorithm is adopted, which combines a 5-7-5 mixed polynomial interpolation function and kinematic constraints. Through cubic chaos-refraction inverse learning, adaptive auditory sensitivity, elite pool weighted guidance of search behavior, spiral Levy flight predation behavior and sand cat vigilance behavior, the trajectory planning time of the robotic arm is optimized.
It improves the working efficiency of the robotic arm, ensures smooth and continuous trajectory, reduces the impact during the movement of the robotic arm, and enhances the dynamic performance and working efficiency of the robotic arm.
Smart Images

Figure CN119217368B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of multi-degree-of-freedom robot arm control, and particularly relates to a robot arm time-optimal trajectory planning method based on an improved sand cat swarm optimization algorithm. BACKGROUND
[0002] With the rapid development of industrial automation and robot technology, the robot arm, as its core executive component, plays an irreplaceable role in precision manufacturing, advanced medical treatment, intelligent agriculture and even deep space exploration. Trajectory planning of the robot arm is a key link in its motion control, directly affecting the efficiency, accuracy and safety of the work. Through effective trajectory planning, the robot arm can move efficiently in the workspace and accurately complete various complex tasks.
[0003] In the context of pursuing efficient production, the time of trajectory planning has become a key indicator of the performance of the robot arm. By optimizing the time indicator of trajectory planning, not only can the work process of the robot arm be accelerated, but also the demand for efficient work in actual application scenarios can be better met, promoting the dual improvement of production efficiency and quality.
[0004] Currently, in the application process of time-optimal trajectory planning based on traditional optimization algorithms such as genetic algorithm and particle swarm optimization algorithm, there are often problems such as poor global search ability, slow convergence speed and easy to fall into local optimal solution, which makes it difficult to ensure smooth and continuous trajectory while ensuring optimal planning time. SUMMARY
[0005] The purpose of the present application is to provide a robot arm time-optimal trajectory planning method based on an improved sand cat swarm optimization algorithm, aiming to ensure stable operation of the robot arm while improving the work efficiency of the robot arm.
[0006] To achieve the above-mentioned purpose, the present application provides a robot arm time-optimal trajectory planning method based on an improved sand cat swarm optimization algorithm, comprising the following steps:
[0007] Step 1: According to the established kinematic model of the robot arm, the mapping relationship between the joint space and the end effector Cartesian space is established;
[0008] Step 2: For the given path points in the Cartesian space, the interpolation angles of each joint of the robot arm in the joint space are obtained through the mapping relationship constructed in step 1 and inverse kinematics solution;
[0009] Step 3: A 5-7-5 hybrid polynomial interpolation function is used to generate smooth and continuous position, velocity, acceleration and jerk trajectories based on the interpolation angles in the joint space;
[0010] Step 4: Based on the kinematic constraint conditions, the motion trajectory is optimized with the time optimization as the target;
[0011] Step 5: The motion time in each segment trajectory planning is taken as the optimization target, and the improved sand cat group optimization algorithm is used to optimize the motion time of the manipulator trajectory;
[0012] Step 6: According to the time optimization principle, the optimized manipulator trajectory planning optimal scheme is output.
[0013] Optionally, the transformation relationship of the connecting rod i-1 coordinate system relative to the i coordinate system in step 1 is expressed by a homogeneous transformation matrix as follows:
[0014]
[0015] Wherein, θ i is the angle of rotation around the z-axis of the i coordinate system, d i is the distance of translation along the z-axis of the i coordinate system, α i is the angle of rotation around the x-axis of the i coordinate system, a i is the distance of translation along the x-axis of the i coordinate system.
[0016] Optionally, in step 3, according to the interpolation angle of the joint space, the motion of each joint is regarded as being composed of a plurality of continuous segments, and a 5-7-5 hybrid polynomial method is used to generate the interpolation function corresponding to each joint. The equation of the segmented trajectory is as follows:
[0017]
[0018] Wherein, l ik (t) represents the polynomial trajectory at the kth part of the ith joint, a i1k represents the kth coefficient of the first stage interpolation function of the ith joint trajectory.
[0019] Optionally, the optimization objective function expression in step 4 is as follows:
[0020]
[0021] Wherein, T is the total running time of the manipulator. t j is the time of the jth point, and n is the number of path points;
[0022] The kinematic constraint is defined as:
[0023]
[0024] Wherein, Q imax , V imax , A imax , J imaxq i (t),v i (t),a i (t),j i (t) are the angle, angular velocity, angular acceleration and angular jerk of the i th joint, respectively.
[0025] Optionally, the execution process of step 5 comprises the following steps:
[0026] Step 5.1: generate an initial population by a cubic chaos-refractive reverse learning method;
[0027] Step 5.2: calculate the fitness function value of the sand cat individual, i.e. the total running time of each joint of the robot arm represented by each individual, compare the fitness function value of each initial individual, and take the individual with the smallest function value as the global and local optimal solution;
[0028] Step 5.3: select exploration or exploitation behavior strategy according to the balance factor R selection algorithm, and update the population individual position according to the corresponding action strategy, if |R|>1, execute the sand cat exploration behavior, otherwise execute the sand cat predation behavior;
[0029] Step 5.4: execute the sand cat alert behavior strategy, and update the current position of the sand cat individual in space;
[0030] Step 5.5: judge whether the updated individual position, i.e. the running time of each stage, meets the constraint condition of the robot arm trajectory running in step 4, if it meets, recalculate the fitness value of the individual according to the updated individual position information, otherwise, jump to step 5.3 and step 5.4 to update the individual that meets the condition;
[0031] Step 5.6: update the global optimal solution and the local optimal solution based on the updated fitness value;
[0032] Step 5.7: output the optimized robot arm trajectory planning best scheme according to the time optimal principle.
[0033] The application provides a mechanical arm time-optimal trajectory planning method based on an improved sand cat swarm optimization algorithm. BRIEF DESCRIPTION OF DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0035] Figure 1 is a step flowchart of a mechanical arm time-optimal trajectory planning method based on an improved sand cat swarm optimization algorithm.
[0036] Figure 2 is a fitness value convergence diagram over time of an improved sand cat swarm optimization algorithm and a comparative algorithm at joint 1 in a specific embodiment of the present application.
[0037] Figure 3 is a fitness value convergence diagram over time of an improved sand cat swarm optimization algorithm and a comparative algorithm at joint 2 in a specific embodiment of the present application.
[0038] Figure 4 is a fitness value convergence diagram over time of an improved sand cat swarm optimization algorithm and a comparative algorithm at joint 3 in a specific embodiment of the present application.
[0039] Figure 5 is a fitness value convergence diagram over time of an improved sand cat swarm optimization algorithm and a comparative algorithm at joint 4 in a specific embodiment of the present application.
[0040] Figure 6 is a fitness value convergence diagram over time of an improved sand cat swarm optimization algorithm and a comparative algorithm at joint 5 in a specific embodiment of the present application.
[0041] Figure 7 is a fitness value convergence diagram over time of an improved sand cat swarm optimization algorithm and a comparative algorithm at joint 6 in a specific embodiment of the present application.
[0042] Figure 8 is the front angle displacement curve graph optimized by the improved sand cat swarm algorithm in the embodiment of the application.
[0043] Figure 9 is the front angle velocity curve graph optimized by the improved sand cat swarm algorithm in the embodiment of the application.
[0044] Figure 10 is the front angle acceleration curve graph optimized by the improved sand cat swarm algorithm in the embodiment of the application.
[0045] Figure 11 is the front angle jerk curve graph optimized by the improved sand cat swarm algorithm in the embodiment of the application.
[0046] Figure 12 is the rear angle displacement curve graph optimized by the improved sand cat swarm algorithm in the embodiment of the application.
[0047] Figure 13 is the rear angle velocity curve graph optimized by the improved sand cat swarm algorithm in the embodiment of the application.
[0048] Figure 14 is the rear angle acceleration curve graph optimized by the improved sand cat swarm algorithm in the embodiment of the application.
[0049] Figure 15 is the rear angle jerk curve graph optimized by the improved sand cat swarm algorithm in the embodiment of the application. DETAILED DESCRIPTION
[0050] Embodiments of the application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are intended to explain the application, and cannot be understood as a limitation of the application.
[0051] The application provides a mechanical arm time-optimal trajectory planning method based on an improved sand cat swarm optimization algorithm, comprising the following steps:
[0052] Step 1: According to the established kinematic model of the mechanical arm, the mapping relationship between the joint space and the end effector Cartesian space is established;
[0053] Step 2: For the given path point in the Cartesian space, the interpolation angle of each joint of the mechanical arm in the joint space is obtained through the mapping relationship constructed in step 1 and inverse kinematics solution;
[0054] Step 3: A 5-7-5 hybrid polynomial interpolation function is used to generate smooth and continuous position, velocity, acceleration and jerk trajectories based on the interpolation angle of the joint space.
[0055] Step 4: Based on the kinematic constraint conditions, the motion trajectory is optimized with the time optimization as the target;
[0056] Step 5: The improved sand cat group optimization algorithm is used to optimize the motion time of the robot arm trajectory planning in each segment trajectory planning;
[0057] Step 6: According to the time optimization principle, the optimized robot arm trajectory planning best scheme is output.
[0058] The specific robot arm space trajectory planning method flow is as shown in Figure 1 The following will be further described in combination with specific examples and execution steps:
[0059] Step 1: According to the established robot arm kinematic model, the mapping relationship between the robot arm joint space and the end Cartesian space is obtained:
[0060] The position and attitude of the end effector can be solved by knowing the angle of each link of the robot arm and the coordinate system parameters of the remaining links, so as to realize the position control and trajectory planning of the robot arm. In the D-H coordinate system of the robot, the transformation relationship of the link i-1 coordinate system relative to the i coordinate system can be expressed by the homogeneous transformation matrix as:
[0061]
[0062] Taking a six-degree-of-freedom robot arm as an example, its D-H parameters are shown in the following table:
[0063]
[0064] Among them, θ i is the angle of rotation around the z-axis of the i coordinate system, d i is the distance of translation along the z-axis of the i coordinate system, α i is the angle of rotation around the x-axis of the i coordinate system, a i is the distance of translation along the x-axis of the i coordinate system.
[0065] According to the above table and combining the transformation matrix between the links, the pose transformation matrix of the robot link end coordinate system relative to the base coordinate system is obtained as:
[0066]
[0067] Step 2: Based on the path points of the robot arm in the Cartesian space, and through the inverse mapping relationship of step 1, the interpolation angle of each joint of the robot arm in the joint space is obtained:
[0068] The path points traversed by the mechanical arm in the Cartesian space, including the initial point, two path points and the terminal point, are mapped back to the joint space through inverse kinematics to obtain the corresponding joint angles.
[0069] Step 3: Based on the interpolation angles of each joint of the mechanical arm in the joint space according to step 2, a continuous trajectory equation of the position, velocity and acceleration of the mechanical arm is generated using a 5-7-5 hybrid polynomial interpolation function:
[0070] According to the joint space interpolation points obtained in step 2, the motion of each joint is regarded as being composed of a plurality of continuous segments, and a 5-7-5 hybrid polynomial method is used to generate the corresponding interpolation function of each joint. The equations of the trajectory of each segment are as follows:
[0071]
[0072] wherein, l ik (t) represents the polynomial trajectory at the kth segment of the ith joint, a i1k represents the kth coefficient of the first stage interpolation function of the trajectory of the ith joint. According to the constraint condition of the multiple polynomials, the displacement of the initial point, two path points and the terminal point of each joint is known, the position, velocity, acceleration and jerk, i.e. the 3rd derivative of the trajectory, is continuous at the middle two path points, and the velocity, acceleration and jerk between the initial point and the terminal point is 0. The polynomial is solved to obtain the relationship matrix A of the joint interpolation points and the coefficients, and the solution is as follows:
[0073]
[0074] θ = [x i0 0 0 0 x i3 0 0 0 x i1 x i1 x i2 x i2 0 0 0 0 0 0 0 0] T
[0075] a = A -1 θ
[0076] wherein, θ represents the displacement matrix of the joint angle, a represents the coefficient matrix of the trajectory curve, x ij represents the displacement of the jth segment interpolation of the ith joint.
[0077] Step 4: Based on the kinematic constraint condition, the motion trajectory is optimized with the time optimization as the target, i.e. the fitness function is obtained based on the optimization target requirement and the constraint condition, and the optimization target function is defined as:
[0078]
[0079] where T is the total running time of the robot arm. j is the time of the jth point, and n is the number of path points.
[0080] The kinematic constraint is defined as:
[0081]
[0082] where Q imax , V imax , A imax , J imax are the maximum angular displacement, maximum angular velocity, maximum angular acceleration and maximum angular jerk of the ith joint, respectively, q i (t), v i (t), a i (t), j i (t) are the angle, angular velocity, angular acceleration and angular jerk of the ith joint, respectively.
[0083] Step 5: Taking the motion time in each trajectory planning as the optimization objective, the improved sand cat swarm optimization algorithm is used to optimize the trajectory running time of the robot arm, which includes the following steps:
[0084] S1: Generate the initial population by cubic chaos-refractive reverse learning. The cubic chaos operator formula is as follows:
[0085]
[0086] y i+1 = 4y i 3 - 3y i
[0087] - 1 < y i < 1, y i ≠ 0; i = 0, 1, 2, … n
[0088] where X(i) is the population position after cubic chaos mapping initialization, and n represents the population size. First, on the n d-dimensional population, use a randomly generated d-dimensional vector y1 as the first operator, and each dimension value is between [-1, 1]. Then traverse each dimension of the first operator to generate the remaining (n-1) operators. Finally, map the data obtained by the cubic chaos operator to the population to obtain the initial solution.
[0089] After generating the initial solution using the cubic chaotic mapping, the refraction reverse learning strategy is introduced to expand the search range by generating the reverse position. In the two-dimensional coordinate, the x-axis represents the search range, and the y-axis represents the convex lens. Through the lens imaging, the projection of object X on the x-axis is X * , and the projection of height h is h * . The function relationship is specifically represented as follows:
[0090]
[0091] Wherein, l b and u b represent the upper and lower bounds of the position. After converting the above formula, the expression of the reverse solution X * is obtained as follows:
[0092]
[0093] Wherein, X * is the reverse solution of the initial solution obtained by the refraction reverse learning of the current search agent. The greedy selection is adopted to select the better population as the initial population between the chaotic mapping initial solution and the refraction reverse solution, which is represented as follows:
[0094]
[0095] In the formula, Pos(i) represents the position of the ith sand cat individual, and f(X(i)) and f(X * (i)) are the fitness values of the search agent X(i) and X * (i), respectively.
[0096] S2: Calculate the fitness function value of the sand cat individual, that is, the running time of each joint of the mechanical arm at each stage represented by each individual, compare the fitness function value of each initial individual, and take the individual with the minimum function value as the global and local optimal solution;
[0097] S3: According to the balance factor R, the selection algorithm executes the exploration or development behavior strategy, and updates the population individual position according to the corresponding action strategy, including:
[0098] r represents the sensitivity of the sand cat to low-frequency noise:
[0099] r=r G ×rand(0,1)
[0100] Wherein, with the increase of the iteration number, r G represents the sensitivity range linearly decreasing from 2 to 0, which is represented as:
[0101]
[0102] Wherein, the sensitivity range of sand cat is 2-0 kHz, so S M The value of r is 2; further, the application proposes adaptive hearing sensitivity range r G Instead of the above formula, it is expressed as:
[0103]
[0104] Wherein, max_t is the maximum number of iterations, t is the current number of iterations, the disturbance factor k∈(1, 3) controls the decreasing amplitude of the hearing sensitivity range, the greater k, the smaller the decreasing amplitude of the hearing sensitivity range, and vice versa, rand(0, 1) represents a random number between 0 and 1.
[0105] The balance factor R of the sand cat population behavior strategy is expressed as:
[0106] R=2×r G ×rand(0,1)-r G
[0107] The action strategy includes:
[0108] If |R|>1, the sand cat exploration behavior is executed, and the position update equation is described as:
[0109] Pos(t+1)=r×(Pos bc (t)-rand(0,1)×Pos c (t))
[0110] In the formula, Pos(t+1) represents the updated position, t represents the current number of iterations, Pos bc (t) represents the optimal candidate position, and Pos c (t) represents the current position of the sand cat.
[0111] Further, the application proposes an elite pool weighted guiding exploration behavior strategy instead of the above-mentioned exploration behavior position update formula of the original sand cat group optimization algorithm to update the current position of the sand cat individual in space, and the elite pool set calculation formula is expressed as:
[0112] Pos s (i)={Pos(k):f(Pos(k))<f(Pos(t))and i≠k},where i=1,2,…,N and k
[0113] ∈{1,2,......,N}
[0114] In the formula, Pos s(i) is the elite pool individual position set of the ith sand cat, Pos(k) is the population member with better objective function value than the ith sand cat, and f(Pos(k)) is its objective function value. The weighted sum of each dimension position information of the elite pool individual is:
[0115]
[0116] where q represents the number of individuals in the elite pool set of the ith sand cat at the current iteration, D q represents the weighted average of the individual positions in the sand cat elite pool. rand{-1, 1} represents randomly increasing or decreasing the position solution to provide an opportunity to change the agent direction, thereby performing a good scan on the given search space in all possible directions. is the vector of the dimension of the target optimization problem, and the component of each dimension is a random number generated from the interval (1, 2). The operation "*" represents the Hadamard product of two vectors (i.e., all components of the resulting vector are formed by multiplying the corresponding components of the given two vectors). A random permutation sequence P ∈ (1, q) is generated to introduce a probabilistic selection mechanism to select an individual from the elite pool as a reference individual:
[0117]
[0118] Thus, the position update formula of the elite pool weighted guidance search strategy is:
[0119]
[0120] where Pos b (t) is the position information of the current individual after the last iteration.
[0121] If |R|≤1, perform the sand cat predation behavior, and the position update equation is described as:
[0122] Pos rnd = |rand(0, 1) × Pos best (t) - pos c (t)|
[0123] Pos(t+1) = Pos best (t) - r × Pos rnd × cos(θ)
[0124] where Pos best (t) represents the global optimal position of the population, and θ is an arbitrary angle between 0 and 360 generated based on roulette. Pos rnd represents a random position generated between the best position and the current position.
[0125] Further, the application proposes a spiral Levy flight predation strategy to replace the position updating formula of the predation behavior of the original sand cat group optimization algorithm to update the current position of the sand cat individual in the space, and the position updating formula is as follows:
[0126] Pos (t+1) = Pos best (t)-e zl ×cos(2πl)×r×Pos rnd ×Levy(D)
[0127] Wherein, Levy(D) is a step length, subject to a Levy random distribution, D represents the dimension of the position vector, r is a constant for defining a logarithmic spiral shape, and l represents a random number in [-1, 1].
[0128]
[0129] The adaptive spiral factor z is represented as follows:
[0130]
[0131] Wherein, μ represents a constant, the parameter z changes with the iteration number, and the shape of the spiral line is dynamically adjusted according to the value of the cos function. The parameter l updating formula is represented as follows:
[0132]
[0133] The coefficient l evolves to a new domain [-2, 0] from the initial value range [-1, 1] with the iteration. The algorithm improves the development accuracy of the later iteration by reducing the final distance lower limit of the parameter l value range.
[0134] S4: Further, the application increases the sand cat alert behavior on the basis of the behavior of the original sand cat group optimization algorithm to update the current position of the sand cat individual in the space. When the sand cat is located at the edge of the group and the fitness is higher than the global optimal value, it needs to quickly escape to the vicinity of the global optimal position:
[0135] Pos (b(i+1)) = Pos best (t)+β|Pos b (b(i))-Pos best (t)|
[0136] Wherein, b(i) represents the ith individual in the randomly selected alert sand cat set, the alert sand cat accounts for 30% of the sand cat population, and Pos b(b(i)) and Pos(b(i+1)) represent the position of sand cat before and after updating, respectively, and β is a random number conforming to standard normal distribution. When the sand cat is in the middle of the group, that is, the fitness value is equal to the current global optimal solution, it is realized that there may be danger and it is necessary to change the position and approach other sand cats to avoid being preyed upon. An adaptive Gaussian-Cauchy mutation disturbance is proposed, which is expressed as follows:
[0137] X(b(i+1))=Pos best (t)×(1+μ1×Gauss(σ)+μ2×cauchy(σ))
[0138] where Pos(b(i+1)) is the optimal position Pos best (t) of the group in the tth iteration after Gaussian-Cauchy mutation disturbance, Gauss(σ) is a Gaussian mutation operator, cauchy(σ) is a Cauchy mutation operator, μ1=1-(t / T) 2 , μ2=(t / T) 2 , and the weight coefficients of the mutation operators change in a non-linear manner, ensuring that each iteration disturbance is uniform and smooth. At the same time, through the transverse crossover operation, the crossover operation between two different individuals in the same dimension is performed, so that different individuals can learn from each other, and the solution space of the multi-dimensional problem is divided into a semi-group hypercube, the space is searched on the edge, and the global optimization ability of the algorithm is improved while reducing blind spots, so as to jump out of the local optimal solution. The specific expression is as follows:
[0139]
[0140] where r1 and r2 are random numbers in [0,1], and c1 and c2 are random numbers in [-1,1]. After the adaptive Gaussian-Cauchy mutation disturbance and transverse crossover operation are performed, a greedy strategy is used to judge the position update to select a better position to jump out of the local optimum, which is expressed as follows:
[0141]
[0142] S5: Determine whether the updated individual position, i.e., the running time of each stage, meets the constraint condition of the trajectory running of the manipulator in step 4. If it meets the condition, the fitness value of the individual corresponding to the updated individual position information is recalculated, otherwise, jump to S3 and S4 to update the individual that meets the condition;
[0143] S6: Update the global optimal solution and the local optimal solution based on the updated fitness value;
[0144] S7: Determine whether the algorithm has reached the maximum number of iterations. If it meets the condition, end and output the current global optimal solution, otherwise, jump to S3 and continue iteration.
[0145] Step 6: According to the time optimization principle, output the optimized mechanical arm trajectory planning optimal scheme.
[0146] The following will be improved sand cat group optimization algorithm and other algorithms are compared and illustrated by examples:
[0147] The D-H parameter table of the six-degree-of-freedom mechanical arm in the example is as follows:
[0148]
[0149] Given 4 path points in Cartesian space as interpolation points of the motion trajectory, as shown in the following table,
[0150]
[0151] The joint angles of each joint in the joint space at each interpolation point are solved by inverse kinematics of the mechanical arm, and the speed constraints of each joint of the mechanical arm are given, as shown in the following table:
[0152]
[0153] Initialize the motion time interval between each joint interpolation point, set the initial interpolation time between each path point to 1s, construct a 5-7-5 polynomial trajectory, and obtain the angle displacement, velocity, acceleration and jerk curve diagram before optimization by the improved sand cat swarm optimization algorithm.
[0154] Further, in order to verify the feasibility and superiority of the improved sand cat swarm optimization algorithm (YSCSO) in the time optimization trajectory planning of the mechanical arm, it is compared with the sand cat swarm optimization algorithm (SCSO), whale optimization algorithm (WOA), dung beetle optimization algorithm (DBO), sparrow search algorithm (SSA) and grey wolf optimization algorithm (GWO). Under the condition that the maximum number of iterations is 100, the time optimal trajectory planning in the joint space is carried out according to the given joint angle. 10 experiments are carried out, the optimal value of each algorithm is recorded, the average value and standard deviation are solved, and the experimental results are shown in the following table. By comparing the experimental results of the five algorithms, the YSCSO algorithm proposed in the application shows the optimal running time and the best stability in the time optimal trajectory planning of the mechanical arm.
[0155]
[0156] The fitness value convergence graph of the improved sand cat swarm optimization algorithm and the comparison algorithm at each joint with time is as Figures 2 to 7 shown.
[0157] The results show that after 100 iterations, the convergence curve of the solution of the running time of each joint of the mechanical arm of each algorithm has tended to be stable.The WOA algorithm and the DBO algorithm perform poorly in terms of convergence speed and accuracy, and relatively, the YSCSO algorithm performs better in these two aspects, and not only can it find a better solution in the early stage of iteration, but also the algorithm performance is more stable.Compared with the SCSO algorithm, the YSCSO algorithm not only retains the advantages of the original algorithm, but also significantly improves the early convergence speed, enhances the optimization ability of the algorithm, and is more likely to jump out of the local optimal solution in the later stage, find the global optimal solution, improve the stability of the solution result, and make the algorithm have higher solution quality and efficiency.
[0158] Randomly select one of the experimental results, after optimization by the YSCSO algorithm, the time period of the 5-7-5 polynomial interpolation motion trajectory of each joint of the mechanical arm is as shown in the following table.
[0159]
[0160] Please refer to Figures 8 to 15 Under the condition of ensuring that all joints meet the position, speed, acceleration and jerk constraints, the maximum value of the time of each trajectory segment of the six joints is selected, which is t1=0.7066s, t2=0.5009s, t3=0.6569s, the total time is 1.8644 seconds, and the running time is shortened from 3 seconds to 1.8644 seconds, which meets the time optimization target.
[0161] The optimized results are constructed into trajectories by 5-7-5 polynomials, and the motion trajectories before optimization are compared, and the obtained trajectories not only meet the requirements of passing through the path points, but also keep continuity in position, speed and acceleration, and the trajectory curve of the jerk has no protrusion and fluctuation in the whole running process, which meets the kinematic constraint conditions.
[0162] In summary, the working time of the mechanical arm is optimized in the application, and the mechanical arm is ensured to move under the constraint condition all the time, the working efficiency of the mechanical arm is improved while the stable operation of the mechanical arm is ensured.
[0163] Compared with the prior art, the application has the following advantages:
[0164] (1) The improved sand cat swarm optimization algorithm used in the application can search for the optimal running time of each joint of the mechanical arm more quickly, and the iteration speed is faster and the optimal time is shorter than that of the traditional swarm intelligence algorithm.
[0165] (2) The 5-7-5 polynomial trajectory is proposed and solved in the application, which can better fit the complex motion trajectory while ensuring the smoothness of the trajectory planning position, speed and acceleration, and reduce the impact in the motion process of the mechanical arm.
[0166] (3) The application is based on the sand cat swarm optimization algorithm SCSO, introduces a cubic chaos-refractive reverse learning initialization population, uses adaptive auditory sensitivity to balance the relationship between the elite pool weighted guided search behavior and the spiral levi flight predation behavior, increases the sand cat alert behavior, and improves the overall optimization performance of the algorithm.
[0167] The above only discloses a preferred embodiment of the application, and of course cannot limit the scope of the application. Those skilled in the art can understand that all or part of the above-mentioned processes can be implemented, and equivalent changes made according to the claims of the application still fall within the scope of the application.
Claims
1. A time-optimal trajectory planning method for a robotic arm based on an improved sand cat swarm optimization algorithm, characterized in that, Includes the following steps: Step 1: Based on the established kinematic model of the robotic arm, establish the mapping relationship between the joint space and the Cartesian space of the end effector; Step 2: For the given path points in Cartesian space, the interpolated angles of each joint of the robotic arm in joint space are obtained through the mapping relationship established in Step 1 and the inverse kinematics solution. Step 3: Using a 5-7-5 hybrid polynomial interpolation function, based on the interpolation angle in joint space, generate smooth and continuous position, velocity, acceleration, and jerk trajectories; Step 4: Optimize the motion trajectory based on kinematic constraints, with time optimization as the objective; Step 5: Using the motion time in each trajectory planning segment as the optimization objective, optimize the robotic arm trajectory running time using the improved sand cat swarm optimization algorithm; The execution process of step 5 includes the following steps: Step 5.1: Generate the initial population using a cubic chaos-refraction back learning approach; Step 5.2: Calculate the fitness function value of the sand cat individual, that is, the total running time of each joint of the robotic arm represented by each individual. Compare the fitness function values of each initial individual and take the individual with the smallest function value as the global and local optimal solution. Step 5.3: Select the exploration or development behavior strategy according to the balance factor R, and update the position of the population individuals according to the corresponding action strategy. If |R|>1, execute the sand cat exploration behavior; otherwise, execute the sand cat predation behavior. Step 5.4: Implement the sand cat vigilance behavior strategy and update the current position of the individual sand cat in the space; Step 5.5: Determine whether the updated individual position, i.e. the running time of each stage, meets the constraints of the robotic arm trajectory in Step 4. If it does, recalculate the fitness value of the individual based on the updated individual position information; otherwise, jump to Step 5.3 and Step 5.4 to update the individuals that meet the conditions. Step 5.6: Based on the updated fitness values, update the global optimum and local optima; Based on the original sand cat swarm optimization algorithm, a sand cat vigilance behavior is added to update the current position of individual sand cats in space; when a sand cat is at the edge of the group and its fitness is higher than the global optimum, it needs to quickly escape to the vicinity of the global optimum: Pos(b(i+1))=Pos best (t)+β|Pos b (b(i))-Pos best (t)| Where b(i) represents the i-th individual in a randomly selected set of vigilant sand cats, and vigilant sand cats account for 30% of the sand cat population, Pos b (b(i)) and Pos(b(i+1)) represent the positions of the alert sand cat before and after the update, respectively, and β is a random number that conforms to the standard normal distribution. When the sand cat is in the middle of the group, that is, when the fitness value is equal to the current global optimal solution, it realizes that there may be danger and needs to change its position to get closer to other sand cats to avoid being preyed upon. The adaptive Gaussian-Cauchy variation perturbation is expressed by the following formula: X(b(i+1))=Pos best (t)×(1+μ1×Gauss(σ)+μ2×cauchy(σ)) Where Pos(b(i+1)) is the optimal position Pos of the population in the t-th iteration. best (t) represents the position after the Gaussian-Cauchy mutation perturbation, where Gauss(σ) is the Gaussian mutation operator and Gauss(σ) is the Cauchy mutation operator, and μ1 = 1 - (t / T). 2 μ2=(t / T) 2 The weight coefficients of the mutation operator change gradually in a non-linear manner to ensure that the perturbation in each iteration is uniform and smooth. Meanwhile, by performing cross operations on the same dimension between two different individuals through lateral cross operations, the different individuals can learn from each other. This decomposes the solution space of the multidimensional problem into a semigroup of hypercubes, and performs edge search on the space. This reduces blind spots and improves the algorithm's global optimization ability, thereby escaping local optima. The specific representation is as follows: Where r1 and r2 are both random numbers in [0,1], and c1 and c2 are both random numbers in [-1,1]. After performing the adaptive Gaussian-Cauchy mutation perturbation and lateral crossover operation, a greedy strategy is used to determine the position update in order to select a better position and escape the local optimum, as shown below: Step 6: Based on the principle of optimal time, output the optimized robotic arm trajectory planning solution.
2. The time-optimal trajectory planning method for a robotic arm based on the improved sand cat swarm optimization algorithm as described in claim 1, characterized in that, In step 1, the transformation relationship between the i-1 coordinate system and the i coordinate system is represented by the homogeneous transformation matrix as follows: Where, θ i Let d be the angle of rotation about the z-axis of the i-coordinate system. i Let α be the distance translated along the z-axis of coordinate system i. i Let a be the angle of rotation about the x-axis of coordinate system i. i Let be the distance translated along the x-axis of coordinate system i.
3. The time-optimal trajectory planning method for a robotic arm based on the improved sand cat swarm optimization algorithm as described in claim 2, characterized in that, In step 3, based on the interpolation angle in joint space, the motion of each joint is considered to consist of multiple continuous segments. Using a 5-7-5 mixed polynomial method, the interpolation function corresponding to each joint is generated; the equation for the segmented trajectory is expressed as follows: Among them, l ik (t) represents the polynomial trajectory at the k-th part of the i-th joint, a i1k This represents the k-th coefficient of the first-stage interpolation function for the trajectory of the i-th joint.
4. The time-optimal trajectory planning method for a robotic arm based on the improved sand cat swarm optimization algorithm as described in claim 3, characterized in that, The objective function expression in step 4 is as follows: Where T is the total running time of the robotic arm; t j is the time at the j-th point, and n is the number of path points; Kinematic constraints are defined as: Among them, Q imax V imax A imax J imax These are the maximum angular displacement, maximum angular velocity, maximum angular acceleration, and maximum angular jerk of the i-th joint, respectively. i (t),v i (t),a i (t),j i (t) represents the angle, angular velocity, angular acceleration, and angular jerk of the i-th joint, respectively.
Citation Information
Patent Citations
Robot joint space trajectory planning method
CN111906789A
Mechanical arm time optimal trajectory planning method based on improved particle swarm optimization
CN117103268A