Robot trajectory optimization method, device and equipment
By establishing the B -sized track trajectory and using the particle group algorithm to optimize the motion data of the robotic arm, the motion efficiency and energy consumption of the robotic arm are solved, and the fast, energy -saving and smooth motion trajectory is achieved.
Patent Information
- Application Number
- CN202411812122.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-01-24
AI Technical Summary
Existing robotic arms are difficult to achieve rapid and precise movement while ensuring safety, and may consume too much energy in limited work space.
Adopt a robot trajectory optimization method, establish B -sized trajectory by obtaining the position point of the end movement of the robotic arm, and based on the optimization model (including the length, energy consumption, sports smoothness and time optimization model) Each joint exercise data is finally established to be optimized.
A significant reduction of the time of the robotic arm to complete the task, reducing energy consumption, and improving the smoothness of the movement path, enabling the robotic arm to operate efficiently, energy conservation and safely in the complex industrial environment.
Smart Images

Figure CN119347784A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot control, and in particular to a robot trajectory optimization method, device and equipment. Background Art
[0002] With the rapid development of intelligent manufacturing and automation technology, collaborative robots (Cobots) are becoming increasingly important as key components in the manufacturing industry. Unlike traditional industrial robots, collaborative robots are designed to share workspaces with human workers and require greater flexibility and adaptability when performing tasks. To meet these needs, the design and motion planning of robots must adopt advanced optimization strategies to maximize performance and minimize costs.
[0003] Multi-objective optimization has become an important tool in robotic arm design due to its ability to solve problems involving multiple conflicting objectives. It allows researchers to consider multiple objectives such as speed, accuracy, energy consumption, cost, and safety at the same time. In recent years, a variety of multi-objective optimization algorithms, such as genetic algorithms, particle swarm optimization, and gray wolf optimization algorithms, have been successfully applied to motion planning and path optimization of robotic arms.
[0004] Currently, it is difficult for a robotic arm to move quickly and accurately while ensuring safety; within a limited working space, the movement trajectory of the robotic arm may consume too much energy. Summary of the invention
[0005] The object of the present invention is to provide a robot trajectory optimization method, device and equipment to reduce the time it takes for a robot arm to complete a task, while reducing energy consumption and improving the smoothness of the motion path.
[0006] In order to achieve the above-mentioned purpose, the present invention provides the following technical solutions: a robot trajectory optimization method, comprising the following steps: obtaining the motion position point of the end of the robot's mechanical arm in the motion space; establishing the B-spline trajectory of the mechanical arm according to the motion position point; establishing an optimization model of the joints of the mechanical arm in the B-spline trajectory; optimizing the motion data of each joint of the mechanical arm based on the optimization model; and establishing the motion trajectory of the mechanical arm according to the optimized motion data of the joints.
[0007] Furthermore, the B-spline trajectory is a cubic uniform B-spline curve.
[0008] Furthermore, the optimization model of the joint includes: a path length optimization model of the joint, an energy consumption optimization model of the joint, a motion smoothness optimization model and a motion time optimization model.
[0009] Furthermore, the optimization of the motion data of each joint of the robotic arm based on the optimization model includes: setting an optimization interval of the motion data; establishing a particle swarm algorithm; setting an upper limit on the number of iterations; optimizing the motion data of the joint through the particle swarm algorithm based on the optimization model until the upper limit on the number of iterations of the particle swarm algorithm is reached; wherein the particle swarm algorithm calculates the fitness of particles through the optimization model, and during the process of optimizing the motion data by the particle swarm algorithm, the motion data is within the optimization interval.
[0010] Furthermore, before optimizing the motion data of the joint by the particle swarm algorithm, the following steps are also included: setting the inertia weight of the particle swarm algorithm; and setting the values of the group learning factor c1 and the self-learning factor c2 of the particle swarm algorithm according to the inertia weight.
[0011] Further, the optimizing the motion data by the particle swarm algorithm until the upper limit of the number of iterations of the particle swarm algorithm is reached includes: the optimizing the motion data by the particle swarm algorithm based on the optimization model until the upper limit of the number of iterations of the particle swarm algorithm is reached includes: initializing the particles; updating the individual extreme values and the group extreme values of the particles based on the optimization model; calculating the optimal fitness of the particles under the current number of iterations based on the individual extreme values and the group extreme values of the particles in each iteration; judging whether the number of iterations of the particles reaches the upper limit of the number of iterations; when the number of iterations of the particles does not reach the upper limit of the number of iterations, iterating the particles and recalculating the optimal fitness of the particles after the iteration; otherwise, using the motion data of the particles with the optimal fitness as the motion data of the motion data of each joint of the optimized robotic arm.
[0012] Furthermore, the values of the group learning factor c1 and the self-learning factor c2 are:
[0013]
[0014] Wherein, the w is the inertia weight of the particle swarm algorithm.
[0015] Furthermore, the expression of the inertia weight w of the particle swarm algorithm is:
[0016] w=w max -(w max -w min )×k / G
[0017] where w max is the maximum value of the inertia weight, w min is the minimum value of the inertia weight, and G is the upper limit of the number of iterations.
[0018] On the other hand, a collaborative robot trajectory optimization device based on multi-objective optimization is provided, including: a position point acquisition mechanism, which acquires the motion position points of the robotic arm in the motion space; a B-spline trajectory establishment mechanism, which establishes the B-spline trajectory of the robotic arm according to the motion position points; an optimization model establishment mechanism, which establishes an optimization model of the joints of the robotic arm in the B-spline trajectory; a motion data optimization module, which optimizes the motion data of each joint of the robotic arm based on the optimization model; and a motion trajectory establishment module, which establishes the motion trajectory of the robotic arm according to the optimized motion data of the joints.
[0019] On the other hand, an electronic device is provided, comprising: a processor and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned trajectory optimization method.
[0020] It can be seen from the analysis that the present invention discloses a robot trajectory optimization method, device and equipment, which can significantly reduce the time it takes for a robot arm to complete a task, while reducing energy consumption and improving the smoothness of the motion path, so that the robot arm can operate efficiently, energy-savingly and safely in a complex industrial environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings constituting a part of the present application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. Among them:
[0022] Figure 1 Flowchart of an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments. Each example is provided by way of explanation of the present invention and does not limit the present invention. In fact, it will be clear to those skilled in the art that modifications and variations may be made in the present invention without departing from the scope or spirit of the present invention. For example, a feature shown or described as a part of one embodiment may be used in another embodiment to produce yet another embodiment. Therefore, it is desired that the present invention encompasses such modifications and variations within the scope of the appended claims and their equivalents.
[0024] One or more examples of the present invention are shown in the accompanying drawings. The detailed description uses numbers and letter labels to refer to features in the drawings. Like or similar labels in the drawings and description have been used to refer to like or similar parts of the present invention. As used herein, the terms "first", "second", "third", and "fourth", etc. are used interchangeably to distinguish one component from another and are not intended to indicate the location or importance of individual components.
[0025] like Figure 1 As shown, according to an embodiment of the present invention, a robot trajectory optimization method is provided. The present invention is applicable to robotic arms with various degrees of freedom. A six-degree-of-freedom robotic arm is taken as an example below. The method specifically includes the following steps:
[0026] Step S101, obtaining the motion position point of the end of the robot's mechanical arm in the motion space.
[0027] When the robot arm is moving, a movement target will be set in advance. Each movement target corresponds to a movement position point. There is a sequence relationship between the movement targets. Therefore, the movement trajectory of the robot arm can be predicted in advance through the movement position points.
[0028] Step S102, establishing a B-spline trajectory of the robot arm according to the motion position points.
[0029] The above B-spline trajectory is a cubic uniform B-spline curve.
[0030] B-spline curves are defined by a set of control points, with local control and high-order continuity. A B-spline curve can be expressed as:
[0031]
[0032] In formula (1), P i (i=0,1,...,n) is the i-th control point, i.e., the motion position point, B(u) is the position of the curve at time u, N i,k (u) is called the k-order canonical B-spline basis function, and n represents the control points of the curve. The control points can be solved by interpolation points and boundary conditions.
[0033] The above B-spline basis function is defined by the DeBoer-Cox recursion formula, and its iterative formula is as follows:
[0034]
[0035] The recursive formula shows that to determine the i-th k-order B-spline N i,k (u), u is needed i ,u i+1 ,...,u i+k+1 There are k+2 control points in total, called the interval [u i ,u i+k+1 ] is N i,k (u) support interval.
[0036] A cubic uniform B-spline curve can be defined by the following formula: Given a set of control points P0, P1, ..., P n , the position of the cubic uniform B-spline curve B(u) at parameter u can be expressed as:
[0037]
[0038] Among them, N i,3 (u), i = 0, 1, 2, 3 are cubic uniform B-spline basis functions, which are defined as follows:
[0039]
[0040] Substituting formula (4) into formula (3), we can get the cubic uniform B-spline curve equation:
[0041]
[0042] Where R0-R3 are the coefficients of the constant term, linear term, quadratic term, and cubic term of the cubic uniform B-spline curve, respectively. i -P i+3 It is from the i-th control point to the i+3-th control point.
[0043] Step S103, establishing an optimized model of the joints of the robot arm in the B-spline trajectory.
[0044] The above-mentioned joint path length optimization model, joint energy consumption optimization model, motion smoothness optimization model and motion time optimization model.
[0045] Specifically, the function J1 of the joint path length optimization model is:
[0046]
[0047] Where B(u) is the trajectory defined by a cubic uniform B-spline, is the first-order derivative of the trajectory (velocity), u0-u f The start and end times of the joint trajectory.
[0048] Specifically, the function J2 of the joint energy consumption optimization model is:
[0049]
[0050] In formula (7), is the second derivative (acceleration) of the trajectory.
[0051] Specifically, the function J3 of the motion smoothness optimization model is:
[0052]
[0053] In formula (8), is the third-order derivative of the trajectory, which measures the smoothness of the trajectory.
[0054] Specifically, the function J4 of the motion time optimization model is:
[0055] J4=u f -u0 (9)
[0056] Where J4 is the time difference from the start time to the end time of the robot's joint trajectory.
[0057] Among the following four optimization objectives, the path length optimization model of the joint is directly related to the total distance moved by the robot arm, affecting the energy consumption and execution time. The energy consumption optimization model of the joint is related to the severity of the trajectory change, which is usually proportional to the square of the acceleration. The motion smoothness optimization model ensures the continuity and smoothness of the trajectory, reducing the vibration and possible mechanical wear of the robot arm. The motion time optimization model is a key indicator for evaluating efficiency, and it is usually hoped to be as short as possible while meeting other conditions.
[0058] The above-mentioned joint path length optimization model, joint energy consumption optimization model, motion smoothness optimization model and motion time optimization model are all optimized separately for different objectives. When using them, which specific optimization objective to focus on depends on which objective the optimization project emphasizes more.
[0059] Step S104, optimizing the motion data of each joint of the robotic arm based on the optimization model.
[0060] Step S104 specifically includes:
[0061] Step S1041, setting an optimization interval for motion data.
[0062] Step S1042, establishing a particle swarm algorithm.
[0063] Step S1043, setting an upper limit on the number of iterations.
[0064] Step S1045, optimizing the motion data of the joints by using a particle swarm algorithm based on the optimization model until the upper limit of the number of iterations of the particle swarm algorithm is reached; Step S1045 specifically includes: initializing the particles; updating the individual extreme values and group extreme values of the particles based on the optimization model; calculating the optimal fitness of the particles under the current number of iterations based on the individual extreme values and group extreme values of the particles in each iteration; judging whether the number of iterations of the particles reaches the upper limit of the number of iterations; when the number of iterations of the particles does not reach the upper limit of the number of iterations, iterating the particles and recalculating the optimal fitness of the particles after the iterations; otherwise, using the motion data of the particles with the optimal fitness as the motion data of the motion data of each joint of the optimized robotic arm.
[0065] The optimal fitness is equivalent to the optimal solution of the above optimization model (the judgment standard of the optimal solution is determined according to the demand for the robot in actual application), and the optimal fitness can be obtained through the particle swarm algorithm.
[0066] Specifically, setting the optimization interval of motion data includes: using cubic uniform B-spline curves to construct the joint trajectories of each segment of the collaborative robot arm, and considering the joint displacement limit, joint speed limit, and joint acceleration limit of the robot arm as boundary conditions of the trajectory planning problem:
[0067] Among them, regarding the joint displacement limit; suppose the joint displacement of the jth (j = 1, 2, ..., m) segment of the motion trajectory of a joint of the robot arm is q j (u), according to the curve equation of the cubic uniform B-spline curve:
[0068] q j (u) = a1u 3 +a2u 2 +a3u+a4 (10)
[0069] In formula (10): Where: q j-1 ,q j ,q j+1 ,q j+2 are respectively the ordinates of the control vertices of the j-th trajectory of the joint.
[0070] In formula (10), when u∈[0,1) interval, the joint displacement q of the jth segment of the motion trajectory of the joint of the robot arm can be obtained respectively: j (u), thus establishing the constraint equation:
[0071] q j (u) = Θ (11)
[0072] Where: Θ is the allowable displacement range of the jth joint of the robot.
[0073] Specifically, regarding joint velocity constraints:
[0074] Suppose the joint velocity of the jth (j=1,2,...,m) segment of the motion trajectory of a joint of the robot arm is q j (t), then:
[0075]
[0076] In the formula, b2=u j-1 -2tu j +u j+1 ; Where: u j-1 ,uj ,u j+1 ,u j+2 are the horizontal coordinates of the control vertices of the Jth segment trajectory of the joint, q j-1 ,q j ,q j+1 ,q j+2 are respectively the ordinates of the control vertices of the j-th trajectory of the joint.
[0077] Similarly, in formula (12), when u<<[0,1), the joint velocity q′ of the jth segment of the motion trajectory of the joint of the robot arm can be obtained respectively: j (u), thus establishing the constraint equation:
[0078] q′ j (u) = θ′ (13)
[0079] In formula (13), Θ′ is the speed range allowed by the joint of the robot arm.
[0080] Specifically, regarding joint acceleration constraints:
[0081] Suppose the joint acceleration of the jth (j=1,2,…,m) segment of the motion trajectory of a joint of the robot arm is q" j (u), then:
[0082]
[0083] In the formula, when k changes from 0 to n, n+1 linear equations can be obtained. However, there are m+1 unknowns. According to formula (10), it is necessary to add additional p-1 equations to obtain the unique solution of the control point. The present invention uses quintic B-spline (p=5), which requires 4 more equations.
[0084] Similarly, in formula (14), when u<<[0,1), the joint acceleration q" of the jth segment of the motion trajectory of the joint of the robot arm can be obtained respectively: j (u), thus establishing the constraint equation:
[0085] q″ j (t) = Θ″ (15)
[0086] Where: Θ″ is the acceleration range allowed by the joint of the robot arm.
[0087] Specifically, the particle swarm algorithm is established as follows;
[0088] The formula of the particle swarm algorithm is as follows. The velocity and position of the particle are updated by the following formula (16):
[0089]
[0090] In formula (16) and formula (17): n represents the nth particle in the group; v nd represents the velocity of particle n in dimension d, m / s; x nd represents the position of particle n in dimension d; p nd represents the optimal position of particle n in dimension d in history; g nd represents the optimal position of the entire group in dimension d in history; w is the inertia weight; c1 and c2 are the group learning factor and self-learning factor respectively; r1 and r2 are random numbers between 0 and 1; k is the number of iterations. The above particles represent the positions of the corresponding joints of the robotic arm, and the nth particle corresponds to the nth joint of the robotic arm.
[0091] The values of the group learning factor c1 and the self-learning factor c2 of the particle swarm algorithm are set according to the inertia weight.
[0092] The expression of the inertia weight w of the particle swarm algorithm is:
[0093] w=w max -(w max -w min )×k / G (18)
[0094] Among them, w max is the maximum value of the inertia weight, w min is the minimum value of the inertia weight and G is the upper limit of the number of iterations.
[0095] In order to improve the algorithm's search ability in the early stage of the search and its convergence ability in the later stage of the search, the values of the group learning factor c1 and the self-learning factor c2 are:
[0096]
[0097] Step S105 , establishing a motion trajectory of the robot arm according to the optimized joint motion data.
[0098] After obtaining the motion data of the joints, the motion trajectory of the robot arm can be established through the motion data of the joints.
[0099] The present invention also discloses a collaborative robot trajectory optimization device based on multi-objective optimization, including: a position point acquisition mechanism, which acquires the motion position points of the robotic arm in the motion space; a B-spline trajectory establishment mechanism, which establishes the B-spline trajectory of the robotic arm according to the motion position points; an optimization model establishment mechanism, which establishes an optimization model of the joints of the robotic arm in the B-spline trajectory; a motion data optimization module, which optimizes the motion data of each joint of the robotic arm based on the optimization model; and a motion trajectory establishment module, which establishes the motion trajectory of the robotic arm according to the motion data of the optimized joints.
[0100] The present invention also discloses an electronic device, which includes: a processor and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned trajectory optimization method.
[0101] From the above description, it can be seen that the above embodiments of the present invention achieve the following technical effects: the present invention can significantly reduce the time it takes for a robot arm to complete a task, while reducing energy consumption and improving the smoothness of the motion path, so that the robot arm can operate efficiently, energy-savingly and safely in a complex industrial environment.
[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A robot trajectory optimization method, characterized in that: The following steps are involved: Obtain the motion position point of the end of the robot's mechanical arm in the motion space; Establishing a B-spline trajectory of the robotic arm according to the motion position points; Establishing an optimized model of the joints of the robotic arm in the B-spline trajectory; Optimizing the motion data of each joint of the robotic arm based on the optimization model; The motion trajectory of the robotic arm is established according to the optimized motion data of the joint.
2. A robot trajectory optimization method according to claim 1, characterized in that: The B-spline trajectory is a cubic uniform B-spline curve.
3. A robot trajectory optimization method according to claim 1, characterized in that: The optimization model of the joint includes: a path length optimization model of the joint, an energy consumption optimization model of the joint, a motion smoothness optimization model and a motion time optimization model.
4. A robot trajectory optimization method according to claim 1, characterized in that: Optimizing the motion data of each joint of the robotic arm based on the optimization model includes: Setting an optimization interval for the motion data; Establish a particle swarm algorithm; Set an upper limit on the number of iterations; Based on the optimization model, the motion data of the joint is optimized by the particle swarm algorithm until the upper limit of the number of iterations of the particle swarm algorithm is reached; The particle swarm algorithm calculates the fitness of particles through the optimization model, and in the process of optimizing the motion data by the particle swarm algorithm, the motion data is within the optimization interval.
5. A robot trajectory optimization method according to claim 4, characterized in that: Before optimizing the motion data of the joint by the particle swarm algorithm, the following steps are also included: Setting the inertia weight of the particle swarm algorithm; The values of the group learning factor c1 and the self-learning factor c2 of the particle swarm algorithm are set according to the inertia weight.
6. A robot trajectory optimization method according to claim 4, characterized in that: The step of optimizing the motion data by using the particle swarm algorithm based on the optimization model until the upper limit of the number of iterations of the particle swarm algorithm is reached includes: Initialize particles; Based on the optimization model, updating the individual extreme value and the group extreme value of the particles; Based on the individual extreme value and the group extreme value of the particle in each iteration, the optimal fitness of the particle under the current number of iterations is calculated; Determine whether the number of iterations of the particle reaches an upper limit of the number of iterations; When the number of iterations of the particle does not reach the upper limit of the number of iterations, iterating the particle and recalculating the optimal fitness of the particle after the iteration; Otherwise, the motion data of the particle with the optimal fitness is used as the motion data of each joint of the optimized robotic arm.
7. A robot trajectory optimization method according to claim 5, characterized in that: The values of the group learning factor c1 and the self-learning factor c2 are: Wherein, w is the inertia weight of the particle swarm algorithm.
8. A robot trajectory optimization method according to claim 7, characterized in that: The expression of the inertia weight w of the particle swarm algorithm is: w=w max -(w max -w min )×k / G where w max is the maximum value of the inertia weight, w min is the minimum value of the inertia weight, and G is the upper limit of the number of iterations.
9. A collaborative robot trajectory optimization device based on multi-objective optimization, characterized in that: include: A position point acquisition mechanism is used to acquire the motion position point of the robot arm in the motion space; A B-spline trajectory establishing mechanism, which establishes a B-spline trajectory of the robotic arm according to the motion position points; An optimization model building mechanism is used to build an optimization model of the joints of the robot arm in the B-spline trajectory; A motion data optimization module, which optimizes the motion data of each joint of the robotic arm based on the optimization model; The motion trajectory establishing module establishes the motion trajectory of the robotic arm according to the optimized motion data of the joint.
10. An electronic device, characterized in that: The electronic device comprises: a processor and a memory for storing executable instructions of the processor; Wherein, the processor is configured to execute the trajectory optimization method according to any one of claims 1-8.
Citation Information
Patent Citations
Mechanical arm time optimal trajectory planning method based on improved particle swarm optimization
CN117103268A
Multi-target trajectory optimization method for mechanical arm
CN118596150A
Robot satellite trajectory planning method based on multi-target particle swarm optimization algorithm
CN118795908A
A Trajectory Planning Method For Six Degree-of-Freedom Robots Taking Into Account of End Effector Motion Error
US20190184560A1
Three-dimensional track planning method based on improved particle swarm optimization algorithm
US20220374675A1
Cited By
Design method for space moving track of manipulator
CN120269565A
Mechanical arm track optimization method and mechanical arm digital twin system
CN120269583A