Six-axis mechanical arm trajectory planning method based on particle swarm optimization algorithm
Through the particle swarm optimization algorithm and the trajectory planning method combined with quintic polynomials, the problem of difficulty in determining the movement path and avoiding obstacles of the six-degree-of-freedom manipulator in a highly complex system is solved, achieving smooth and vibration-free movement to satisfy users Demand trajectory planning.
Patent Information
- Application Number
- CN202410724781.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-06-05
AI Technical Summary
The existing technology lacks mature trajectory planning solutions, especially the inability to determine the position of each point when the six-degree-of-freedom manipulator moves from the starting point to the target according to user needs, and it is difficult to avoid obstacles and ensure smoothness in highly complex systems. Vibration-free movement.
A six-axis robotic arm trajectory planning method based on the particle swarm optimization algorithm is used to create a starting group, calculate the fitness value of the particles, update the speed and position, and use a fifth-order polynomial for joint space trajectory planning to ensure that the end robotic arm moves from the starting point to the Smooth continuous motion of the end point and avoid obstacles through particle swarm optimization algorithm.
It realizes the determination of the robot motion path according to user needs in a highly complex system, minimizes vibration, ensures that the robot arm avoids obstacles from the optimal path to the end point under constraint conditions, and provides efficient trajectory planning and continuous motion.
Smart Images

Figure CN118528262A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial robots, and in particular to a six-axis robot arm trajectory planning method based on a particle swarm optimization algorithm. Background Art
[0002] Nowadays, with the rapid development of industrial automation, robotic systems have become an indispensable part of production systems and daily life. In the era of intelligent manufacturing, the controlled operation of robots plays a key role in various tasks and stages, including improving production efficiency, achieving high-precision and error-free assembly, and achieving barrier-free transportation. This ensures the optimal use of time while also increasing the potential for work. Robot manipulators usually consist of a set of rigid arms connected by revolute or prismatic joints. These rigid arms can be programmed and self-controlled in three or more axes to move various objects from one point to another.
[0003] Nowadays, robotic arms are widely used in many fields, but this also raises the issue of trajectory control, which requires proper trajectory planning. The goal of trajectory planning is to move the robotic arm from the starting point to the predetermined end point in a smooth and controllable manner, while avoiding vibrations and ensuring that there is no collision with any obstacles. This is particularly critical in the workspace, because there are usually multiple possible paths between the starting point and the end point, and one of the tasks of trajectory planning is to determine the shortest distance path.
[0004] At present, in the industrial world, there is no mature trajectory planning solution for high-complexity systems such as six-degree-of-freedom robotic arms, especially to determine the position of the robot at each point when moving from the starting point to the target according to user needs. Summary of the invention
[0005] The object of the present invention is to solve at least one of the technical drawbacks.
[0006] To this end, the purpose of the present invention is to propose a six-axis robot trajectory planning method based on a particle swarm optimization algorithm. For a high-complexity system such as a six-degree-of-freedom robot, the position of the robot at each point when it moves from a starting point to a target can be determined according to user needs.
[0007] In order to achieve the above object, an embodiment of the present invention provides a six-axis robot arm trajectory planning method based on a particle swarm optimization algorithm, comprising the following steps:
[0008] Step S1, using a particle swarm optimization algorithm to plan the trajectory of a six-degree-of-freedom serial robot arm, including: the end robot arm starts to move from a starting point, checks whether there are obstacles in the process of moving to a target, and if obstacles are found, uses a particle swarm optimization algorithm; when searching for the best trajectory of particles in the motion space, determines a local optimal value and a global optimal value to ensure that the target moves to the best trajectory in the best particle tracking, and the particle swarm optimization algorithm includes:
[0009] Step S11, creating a starting group, speed and position;
[0010] Step S12, calculating the fitness values of all particles in the group;
[0011] Step S13, in each generation, all particles are compared with the best particle of the previous generation, and if the fitness value is better, it is replaced;
[0012] Step S14, comparing all local optimal values and selecting the best one as the global optimal value;
[0013] Step S15, updating speed and position values;
[0014] Step S16, repeating steps S12 to S15, when the stop condition is met, stopping the particle swarm algorithm and displaying the result;
[0015] Step S2, using fifth-order polynomials to perform trajectory planning in the joint space, so that the end effector of the serial robot moves from the starting point to the target point without vibration, and all joints of the robot arm are completed simultaneously.
[0016] Further, in step S14, for each particle, a local optimum is found from the current generation, and the number of optimums in the group is equal to the number of particles, and the global optimum is selected from the local optimums of the current generation.
[0017] Furthermore, for the fitness function calculation of the problem composed of multi-dimensional parameters, the particle matrix composed of n particles is as follows:
[0018]
[0019] In the above particle matrix, particle i, x i =[x i1 , x i2 ,Ix iD ],
[0020] The position of particle i given the previous best fitness value, P bset =[p i1 , p i2 , ..., p iD ];
[0021] The global best value Gbest is unique for all particles in each iteration, and
[0022] G bset =[p1, p2, ..., p D ]
[0023] The velocity of the particle is expressed as:
[0024] Further, in the step S1, the joint angles of the robot are determined using a library function, and the joint angles include: the starting and ending angles of each joint;
[0025] A fifth-order polynomial is determined based on the maximum and minimum constraints created by the joint angles; a smooth and continuous trajectory of the end manipulator is estimated from a starting point to an end point; wherein the fifth-order polynomial is used to describe the motion trajectory of the end manipulator between two points.
[0026] Further, the path traveled by the robotic manipulator is estimated by determining the linear equation for each joint angle, with the goal of obtaining the linear equation that gives the shortest distance and avoids possible obstacles.
[0027] Further, in step S1, the objective function of each particle position is evaluated to determine the optimal function value and the optimal position, wherein the objective function is used to minimize the track time and total distance according to limiting parameters such as speed, acceleration and vibration.
[0028] Further, a new velocity is selected based on the current velocity, the individual best position of the particle and the best positions of its neighboring particles.
[0029] Further, the particle position, velocity and neighbors are iteratively updated, wherein the new position updated iteratively is the old position plus the velocity, and the velocity is modified to keep the particle within the boundary.
[0030] Furthermore, by calculating the distances between all points drawn by the tip manipulator and the target point, an objective function is created as follows:
[0031]
[0032] Among them, Q is the target coordinate, and P represents the position coordinate created when the robot moves to the target point.
[0033] According to the trajectory planning method of a six-axis robot based on a particle swarm optimization algorithm in an embodiment of the present invention, a quintic polynomial is introduced into the PSO algorithm to minimize the vibration that may occur during the movement of the robot and provide the best continuity. By using a quintic polynomial and a PSO algorithm to perform trajectory planning in the joint space, and taking into account the technical information of the 6-axis robot, the simulation effect is outstanding. According to the simulation results, it is concluded that the end robot avoids obstacles from the optimal path under the constraints and reaches the end point. The present invention can be applied to highly complex systems such as a six-degree-of-freedom robot, and the position of the robot at each point when it moves from the starting point to the target can be determined according to user needs.
[0034] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0036] Figure 1 A flowchart of a six-axis robot arm trajectory planning method based on a particle swarm optimization algorithm according to an embodiment of the present invention;
[0037] Figure 2 A schematic diagram of a six-axis robot arm trajectory planning method based on a particle swarm optimization algorithm according to an embodiment of the present invention;
[0038] Figure 3 A schematic diagram of a simulation model of a robot according to an embodiment of the present invention;
[0039] Figure 4 A schematic diagram of a robot trajectory created according to an embodiment of the present invention;
[0040] Figure 5 is an angle-time diagram of a nonlinear motion obtained from a fifth-order polynomial equation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0042] First, some technical terms involved in the present invention are explained below.
[0043] Trajectory planning for a robot arm can be done in two ways: joint space and Cartesian space. When using Cartesian space for trajectory planning, the robot arm achieves linear motion between its starting and target positions. On the defined linear path, the position and velocity of the robot arm at close intermediate points need to be determined. Whereas in trajectory planning in joint space, the motion of the end robot arm occurs at certain time intervals between the starting and target points and is usually described by a cubic or higher order polynomial. By using polynomial functions, it is possible to ensure that the joint position, velocity, and acceleration parameters are continuous, resulting in a smooth joint trajectory. This approach helps ensure that the robot arm remains stable and precise during motion.
[0044] Particle Swarm Optimization (PSO) is a stochastic optimization technique inspired by the behavior of bird and fish schools. PSO is used to solve multivariate and parameterized nonlinear optimization problems, simulating the random behavior of animals in groups (such as birds and fish) when searching for food and ensuring safety. These animals communicate with each other to reach their goals in the shortest way and adjust their speed. The PSO algorithm starts with a collection of random solutions and searches for the optimal solution through iterative updates. In PSO, possible solutions are called particles, and they move in the problem space based on the current best particle. Unlike traditional optimization techniques, PSO does not require derivative information. PSO models the social interactions between particles within the group. In the PSO algorithm, each solution particle is called a particle in the group and uses its own experience to adjust its position to get closer to the best position in the group. In summary, the PSO algorithm searches for the optimal solution based on the update of the particle relative to the best position in the group.
[0045] Determining the middle point between the start and end points, as well as the speed of the robot arm, depends on acceleration and distance parameters, which becomes more complicated when the robot's degrees of freedom are taken into account. With the continuous advancement of research in the field of robotics, the trajectory planning problem has ushered in a variety of heuristic optimization methods that can effectively solve this problem. In research, the PSO algorithm is widely used because it allows the latest multi-information exchange, thereby reducing the computational burden. With the help of the PSO algorithm, the robot can plan the trajectory more efficiently, avoid obstacles, and reach the target location in the fastest, shortest and most convenient way.
[0046] The present invention proposes a trajectory planning method for a six-axis robot based on a particle swarm optimization algorithm, using a PSO algorithm to provide fifth-order polynomial interpolation and continuity of trajectory control. The robot is simulated using the MATLAB programming language. Various obstacles such as circles and rectangles are placed in the simulation, and the trajectory formed by the robot in the presence of these obstacles is checked based on the number of iterations and RNG parameters. For a highly complex system such as a six-degree-of-freedom robot, the present invention can determine the position of the robot at each point when it moves from a starting point to a target according to user requirements. Therefore, time optimization is achieved by selecting the shortest path between two points.
[0047] like Figure 1 As shown, a six-axis robot arm trajectory planning method based on a particle swarm optimization algorithm according to an embodiment of the present invention comprises the following steps:
[0048] Step S1, using particle swarm optimization algorithm to plan the trajectory of the six-degree-of-freedom serial robot arm, including: the end arm of the robot starts to move from the starting point, checks whether there are obstacles in the process of moving to the target, and if there are obstacles, uses particle swarm optimization algorithm; when searching for the best trajectory of particles in the motion space, determines the local optimal value and the global optimal value to ensure that the target moves to the best trajectory in the best particle tracking. Figure 2 As shown, the particle swarm optimization algorithm includes:
[0049] Step S11, creating a starting group, speed and position.
[0050] Specifically, the starting swarm is created with randomly generated starting positions and velocities.
[0051] Step S12, calculating the fitness values of all particles in the group.
[0052] Step S13, in each generation, all particles are compared with the best particle of the previous generation, and if the fitness value is better, it is replaced.
[0053] Step S14: compare all local optimal values pbest and select the best one as the global optimal value gbest.
[0054] For each particle, the local optimum is found from the current generation, and the number of optima in the swarm is equal to the number of particles, and the global optimum is selected from the local optimum of the current generation.
[0055] Step S15, updating the speed and position values.
[0056] Step S16, repeating steps S12 to S15, when the stop condition is met, stop the particle swarm algorithm and display the result.
[0057] For the fitness function calculation of a problem consisting of D (dimensional) parameters, the particle matrix consisting of n particles is as follows:
[0058]
[0059] In the above matrix, particle i, x i =[x i1 , x i2 , Ix iD ], giving the position of particle i with the previous best fitness value, P bset =[p i1 , p i2 , ..., p iD ].
[0060] The global optimal value gbest is unique for all particles in each iteration, and G bset =[p1, p2, ..., p D ]. The velocity of a particle (how much its position has changed in each dimension) is expressed as:
[0061] Step S2, using fifth-order polynomials to perform trajectory planning in the joint space, so that the end effector of the serial robot moves from the starting point to the target point without vibration, and all joints of the robot arm are completed simultaneously.
[0062] The detailed process of the six-axis robot arm trajectory planning method based on the particle swarm optimization algorithm according to the embodiment of the present invention is described below.
[0063] Particle swarm optimization (PSO) algorithm is the main method for trajectory planning of six-degree-of-freedom serial robot arms. Using PSO algorithm, the position, velocity, and acceleration parameters of each joint are more sensitive to reach the target point from the starting point in the optimal time.
[0064] The trajectory planning in the joint space is performed using fifth-order polynomials, so that the end effector of the serial robot moves from the starting point to the target point without vibration, and all joints of the robot arm are completed simultaneously. The initial and final positions of the end manipulator in the absence and presence of obstacles are studied in Cartesian space using forward kinematics and joint angles.
[0065] In the flowchart created by the PSO algorithm, the end robot starts moving from the starting point and checks for obstacles while moving toward the target. When obstacles exist, the PSO algorithm is used. When searching for the best trajectory of particles in the motion space, the Pbest and Gbest values are determined to ensure that the target moves to the best trajectory in the best particle tracking.
[0066] The process of particle swarm algorithm is as follows:
[0067] (1) Evaluate the objective function of each particle position and determine the optimal (lowest) function value and optimal position.
[0068] (2) Select a new speed based on the current speed, the individual best position of the particle, and the best positions of its neighboring particles.
[0069] (3) Then iteratively update the particle position (the new position is the old position plus the velocity, modified to keep the particle within the boundary), velocity, and neighbors.
[0070] (4) Iterations continue until the algorithm reaches the stopping criterion.
[0071] In an embodiment of the present invention, a simulation model of a robot is created using the Robotic Toolbox library on the MATLAB program, such as Figure 3 shown.
[0072] By using the library function, the start and end angles of each joint of the robot are determined. Forward kinematics can use the joint angles to obtain the position and rotation information of the start and end points of the robot end function in Cartesian space.
[0073] The robot trajectory planning includes two methods: point-to-point (PTP) and continuous path-CP. The PTP method only specifies the starting point and the end point, while the CP method also specifies the intermediate point between the two points. This study uses the PTP method and uses the five-polynomial algorithm in MATLAB to perform joint space interpolation every 2 seconds. The created trajectory is shown in Figure 4 shown.
[0074] A fifth-order polynomial determined by the maximum and minimum constraints created from the joint angles; a smooth and continuous trajectory estimate for the end manipulator from the start point to the end point. The fifth-order polynomial is used to describe the motion trajectory of the end manipulator between two points. Figure 5 The angle-time plot shows the nonlinear motion obtained from the quintic polynomial equation.
[0075] The path traveled by the robotic manipulator is estimated by determining the linear equation for each joint angle. The goal is to obtain the linear equation that gives the shortest distance and avoids possible obstacles. The PSO algorithm searches for the best linear or nonlinear equation for the trajectory. The equation obtained can range from a linear equation to a multidimensional polynomial. This result indicates that the joint angles can be used to move from the starting point to the target point using a simple linear equation or a nonlinear polynomial equation.
[0076] The purpose of using a quintic polynomial is to minimize the vibrations that may occur during the movement of the robot arm and to ensure optimal continuity. All joints belong to the robot. The objective function is used to minimize the orbit time and total distance based on the limiting parameters such as speed, acceleration, and vibration. The objective function created by calculating the distance between all points drawn by the tip manipulator to the target point is shown in the formula:
[0077]
[0078] Where: Q is the target coordinate. P represents the position coordinate created when the robot moves to the target point.
[0079] According to the trajectory planning method of a six-axis robot based on a particle swarm optimization algorithm in an embodiment of the present invention, a quintic polynomial is introduced into the PSO algorithm to minimize the vibration that may occur during the movement of the robot and provide the best continuity. By using a quintic polynomial and a PSO algorithm to perform trajectory planning in the joint space, and taking into account the technical information of the 6-axis robot, the simulation effect is outstanding. According to the simulation results, it is concluded that the end robot avoids obstacles from the optimal path under the constraints and reaches the end point. The present invention can be applied to highly complex systems such as a six-degree-of-freedom robot, and the position of the robot at each point when it moves from the starting point to the target can be determined according to user needs.
[0080] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0081] Although the embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. Those skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and purpose of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A six-axis robot arm trajectory planning method based on particle swarm optimization algorithm, characterized in that: The steps include: Step S1, using a particle swarm optimization algorithm to plan the trajectory of a six-degree-of-freedom serial robot arm, including: the end robot arm starts to move from a starting point, checks whether there are obstacles in the process of moving to a target, and if obstacles are found, uses a particle swarm optimization algorithm; when searching for the best trajectory of particles in the motion space, determines a local optimal value and a global optimal value to ensure that the target moves to the best trajectory in the best particle tracking, and the particle swarm optimization algorithm includes: Step S11, creating a starting group, speed and position; Step S12, calculating the fitness values of all particles in the group; Step S13, in each generation, all particles are compared with the best particle of the previous generation, and if the fitness value is better, it is replaced; Step S14, comparing all local optimal values and selecting the best one as the global optimal value; Step S15, updating speed and position values; Step S16, repeating steps S12 to S15, when the stop condition is met, stopping the particle swarm algorithm and displaying the result; Step S2, using a fifth-order polynomial to perform trajectory planning in the joint space, so that the end effector of the serial robot moves from the starting point to the target point without vibration, and all joints of the robot arm are completed simultaneously.
2. The six-axis robot arm trajectory planning method based on particle swarm optimization algorithm as claimed in claim 1, characterized in that: In step S14, for each particle, a local optimum is found from the current generation, and the number of optimums in the group is equal to the number of particles, and the global optimum is selected from the local optimums of the current generation.
3. The six-axis robot arm trajectory planning method based on particle swarm optimization algorithm as claimed in claim 1, characterized in that: For the fitness function calculation of problems composed of multi-dimensional parameters, the particle matrix composed of n particles is as follows In the above particle matrix, particle i, x i =[x l1 , x l2 , Ix iD ], The position of particle i given the previous best fitness value, P best =[p i1 , p i2 ,…,p iD ]; The global best value Gbest is unique for all particles in each iteration, and G bset =[p1,p2,...,p D ] The velocity of a particle is expressed as:
4. The six-axis robot arm trajectory planning method based on particle swarm optimization algorithm as claimed in claim 1, characterized in that: In the step S1, a library function is used to determine the joint angles of the robot, wherein the joint angles include: the starting and ending angles of each joint; A fifth-order polynomial is determined based on the maximum and minimum constraints created by the joint angles; a smooth and continuous trajectory of the end manipulator is estimated from a starting point to an end point; wherein the fifth-order polynomial is used to describe the motion trajectory of the end manipulator between two points.
5. The six-axis robot arm trajectory planning method based on particle swarm optimization algorithm as claimed in claim 4, characterized in that: The path that the robotic manipulator travels is estimated by determining the linear equation for each joint angle, with the goal of obtaining a linear equation that gives the shortest distance and avoids possible obstacles.
6. The six-axis robot arm trajectory planning method based on particle swarm optimization algorithm according to claim 1, characterized in that: In step S1, the objective function of each particle position is evaluated to determine the optimal function value and the optimal position, wherein the objective function is used to minimize the track time and the total distance according to the limiting parameters such as speed, acceleration and vibration.
7. The six-axis robot arm trajectory planning method based on particle swarm optimization algorithm as claimed in claim 6, characterized in that: A new velocity is chosen based on the current velocity, the particle's individual best position, and the best positions of its neighbors.
8. The six-axis robot arm trajectory planning method based on particle swarm optimization algorithm as claimed in claim 7, characterized in that: Iteratively update the particle position, velocity, and neighbors, where the new position is the old position plus the velocity, and the velocity is modified to keep the particle within the boundary.
9. The six-axis robot arm trajectory planning method based on particle swarm optimization algorithm as claimed in claim 6, characterized in that: By calculating the distance between all points drawn by the tip manipulator and the target point, the objective function is created as follows: Among them, Q is the target coordinate, and P represents the position coordinate created when the robot moves to the target point.
Citation Information
Patent Citations
Genetic-algorithm-based trajectory planning optimization method for mobile mechanical arm
CN103235513A
Lane change trajectory planning method based on integration of polynomial and particle swarm optimization
CN109283843A
Speed curve model method based on optimal time and jerk
CN114740715A
Double-mechanical-arm collaborative obstacle avoidance motion planning optimization method based on mixed geometric characterization
CN115008475A
Mechanical arm time optimal trajectory planning method based on improved particle swarm optimization
CN117103268A
