Time-optimal asymmetric S-shaped acceleration and deceleration control method
Through intelligent algorithms and whale algorithms, time-optimal asymmetric S-shaped acceleration and deceleration control is achieved, which solves the problem of smooth transition of robotic arm motion and improves the efficiency, accuracy, applicability and robustness of task execution.
Patent Information
- Application Number
- CN202211161701.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-09-23
AI Technical Summary
Existing acceleration and deceleration control methods are difficult to achieve a smooth transition of robotic arm motion in high-speed, high-precision tasks, resulting in geometric path errors. Especially under complex kinematic constraints, traditional method parameter calculations are complex and inapplicable.
The time-optimal asymmetric S-shaped acceleration and deceleration control method based on intelligent algorithms is adopted, and the whale algorithm is used to initialize the population. By continuously updating the position of the search agent, the optimal time parameters are obtained, and the acceleration, speed and acceleration of each stage of the S-shaped speed curve are calculated. The displacement curve satisfies the kinematic constraints of the robotic arm.
It achieves simpler parameter calculation and better applicability. It can obtain time-optimal asymmetric S-shaped velocity distribution without violating kinematic constraints, shorten task execution time, and avoid trajectory tracking errors.
Smart Images

Figure CN115464653B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot arm motion control, and in particular to a time-optimal asymmetric S-shaped acceleration and deceleration control method. Background Art
[0002] The collaborative equipment based on robotic manipulators is a complex system with high precision, multi-input and multi-output, high nonlinearity and strong coupling. The redundant manipulators have higher operational flexibility and stronger robustness. They show good adaptability during task execution and are easy to repair and maintain. They have been widely used in agile manufacturing, hazardous environment operations, on-orbit assembly in space and other fields.
[0003] The robot control system requires that under the action of a certain control strategy, the robot can complete the given task quickly and accurately. For tasks with strict path requirements, it is necessary to plan the motion trajectory of the robot arm configuration space and obtain the joint trajectory through the inverse kinematics algorithm. The movement of the end effector of the robot arm determines the efficiency and accuracy of the task execution. The steady running speed can reduce the wear of mechanical parts and avoid vibration and impact of the system. For complex curves, the constant end running speed will cause the speed and acceleration of each joint axis to change continuously. Excessive speed or too fast speed change may cause large geometric path errors. Therefore, the robot must use the acceleration and deceleration control algorithm to achieve a smooth transition of speed during the start and stop phases and when the speed changes.
[0004] At present, the existing acceleration and deceleration control methods mainly include trapezoidal acceleration and deceleration, trigonometric function acceleration and deceleration, exponential acceleration and deceleration, etc., but most manipulators still use the simplest trapezoidal acceleration and deceleration control method for speed planning. With the requirements of high-speed and high-precision tasks, asymmetric S-type acceleration and deceleration control technology has received widespread attention. The complete S-type velocity curve includes seven stages: acceleration section, uniform acceleration section, deceleration section, uniform speed section, acceleration and deceleration section, uniform deceleration section, and deceleration and deceleration section. The asymmetric S-type velocity curve allows different accelerations in each stage. Compared with other methods, it involves more parameters, making the planning process more difficult, especially for redundant manipulators with complex kinematic constraints. Summary of the invention
[0005] In view of the shortcomings of traditional acceleration and deceleration control algorithms, the present invention provides a time-optimal asymmetric S-shaped acceleration and deceleration control method based on an intelligent algorithm to solve the problems existing in the prior art. To achieve the above-mentioned purpose, the present invention provides a time-optimal asymmetric S-shaped acceleration and deceleration control method, comprising the following steps:
[0006] S1. Obtain the total length of the given path, the starting point speed, and the ending point speed information of the robot arm path to be planned, and determine the problem type according to whether there is an acceleration zone and a deceleration zone in the S-shaped speed curve to be planned;
[0007] S2, establish fitness function;
[0008] S3. Input the preset parameters in the whale algorithm to initialize the population, wherein the preset parameters include the problem type, the size of the whale population, and the maximum number of iterations;
[0009] S4, determining whether the search agent in the whale algorithm meets the kinematic constraints;
[0010] The kinematic constraints include:
[0011] At any time, the motion of each joint of the manipulator should satisfy the acceleration, velocity constraint extreme value and velocity extreme value of the configuration space;
[0012] At any time, the planned motion of the end effector of the robot arm should satisfy the jerk, acceleration and velocity constraints of the operating space;
[0013] The acceleration direction of the acceleration zone of the S-shaped velocity profile is positive, and the acceleration direction of the deceleration zone is negative;
[0014] S5. Based on the whale algorithm and its update formula, the best solution in the population is obtained by continuously updating the position of the search agent within the maximum number of iterations, thereby obtaining the optimal time parameter based on the whale algorithm;
[0015] S6. According to the optimal time parameters output by the whale algorithm, the jerk of each stage of the S-shaped velocity curve is calculated, and the acceleration, velocity and displacement curves are obtained by successive integration, so as to determine the movement of the end effector of the robot arm.
[0016] Furthermore, the step S1 specifically includes:
[0017] S101. Define a reference path length, where the reference path length is expressed as formula (1):
[0018] L ref =L Acc +L Dec (1)
[0019] Among them, L ref Denotes the reference path length, L Acc Indicates the reference path length of the acceleration zone, L Dec represents the reference path length of the deceleration zone, calculated according to formula group (2) and formula group (3):
[0020]
[0021]
[0022] Among them, vs represents the velocity at the starting point of the path, v e represents the velocity at the end of the path, v c A represents the tangential velocity value of the given robot end effector when it moves at a constant speed. max represents the maximum acceleration of the end effector, J max Indicates the maximum jerk of the end effector;
[0023] S102: judging whether there is an acceleration zone and / or a deceleration zone in the S-shaped speed curve to be planned according to the relationship between the total length of the given path and the length of the reference path; wherein the following situations are classified:
[0024] If L ≥ L ref When , the path is a long path, and the S-shaped speed curve to be planned has both an acceleration area and a deceleration area;
[0025] If L <L ref When , the path is a short path. At this time, by judging the relationship between the initial and final speeds, it is determined whether the S-shaped speed curve to be planned includes an acceleration area and a deceleration area.
[0026] Furthermore, the determination of whether the S-shaped speed curve to be planned includes an acceleration zone and a deceleration zone is divided into the following cases:
[0027] When v s >v e When , the S-shaped speed curve to be planned does not include an acceleration zone;
[0028] When v s <v e When the S-shaped speed curve to be planned does not include a deceleration zone;
[0029] When v s =v e When , the S-shaped speed curve to be planned includes neither an acceleration area nor a deceleration area;
[0030] Where L represents the total length of the given path.
[0031] Furthermore, the fitness function in step S2 is as shown in formula (4):
[0032]
[0033] Among them, T m (m=1,2,…,7) represents the execution time of the mth segment of the curve to be planned, ω m Indicates the weight factor corresponding to the execution time of the mth segment of the S-shaped speed curve to be planned.
[0034] Furthermore, in step S3, the initialization population is expressed as formula (5):
[0035]
[0036] Where Ns represents the size of the whale population; X n ,n=1,2,…,Ns represents a search agent; T m,n ∈[0,T m,max ],m=1,2,…,7,T m,max Indicates the maximum execution time of the mth segment;
[0037] If there are both acceleration and deceleration zones, the time of each stage is not set to 0;
[0038] If there is no acceleration zone, T1, T2, and T3 are set to 0;
[0039] If there is no deceleration zone, T5, T6, and T7 are set to 0;
[0040] If there is neither an acceleration zone nor a deceleration zone, T1, T2, T3, T5, T6, and T7 are set to 0.
[0041] Furthermore, the kinematic constraint condition in step S4 is expressed as formula (6):
[0042]
[0043] in, They represent the extreme value of acceleration and velocity of the i-th joint of the robot arm respectively; They represent the acceleration and velocity of the i-th joint of the robot at any time; J lim , A lim 、V lim They represent the extreme jerk, acceleration and velocity of the end effector of the robot arm respectively; J k 、a k 、v k They represent the jerk, acceleration and velocity of the end effector of the robot at any time; a Acc and a Dec Represent the acceleration in the acceleration zone and deceleration zone respectively.
[0044] Furthermore, in step S5, the mathematical model of the whale algorithm is: Formula (7)-(11):
[0045]
[0046]
[0047]
[0048]
[0049]
[0050] in, represents the position vector of the whale, i.e. the search agent, represents the position vector of the prey, i.e. the global optimal solution, δ represents the current number of iterations, represents the distance between the prey and the whale, Express decision The weight value that affects the whale's movement distance. is a random vector defined on [0,2], Indicates the influence in the δth iteration The weight value of the change decreases linearly from 2 to 0 during the iteration process. is a random vector defined on [0,1];
[0051] The updated search agent position is as follows:
[0052] Define a random number p on [0,1],
[0053] If p<0.5 and Then update according to formulas (12) and (13)
[0054]
[0055]
[0056] If p<0.5 and Then update according to formulas (14) and (15)
[0057]
[0058]
[0059] in, represents the position vector of any search agent selected from the current population;
[0060] If p ≥ 0.5, update according to formulas (16) and (17)
[0061]
[0062]
[0063] Where b is the logarithmic spiral shape constant and l is a random number defined on [-1,1].
[0064] Furthermore, in step S6, the optimal asymmetric S-shaped speed curve is obtained as specifically expressed by formulas (18)-(25):
[0065] The jerk at each stage of the S-shaped velocity curve is expressed as formula (18)-(22):
[0066] If there are both acceleration and deceleration zones, the jerk can be expressed as formula (18) and formula (19):
[0067]
[0068]
[0069] If there is no acceleration zone, the jerk is expressed as formula (20):
[0070]
[0071] If there is no deceleration zone, the jerk is expressed as formula (21):
[0072]
[0073] If there is neither an acceleration zone nor a deceleration zone, the jerk is expressed as formula (22):
[0074] J1=J2=J3=J4=J5=J6=J7=0 (22)
[0075] The acceleration, velocity and displacement at each stage of the S-shaped velocity curve are respectively expressed as formulas (23)-(25):
[0076] The acceleration at each stage of the S-shaped velocity curve is expressed as formula (23):
[0077]
[0078] The speed at each stage of the S-shaped speed curve is expressed as formula (24):
[0079]
[0080] The displacement of each stage of the S-shaped velocity curve is expressed as formula (25):
[0081]
[0082] Among them, T m (m=1,2,…,7) represents the execution time of the mth segment of the S-shaped speed curve, J m(m=1,2,…,7) represents the jerk value of the mth segment of the S-shaped velocity curve, L represents the total length of the path, v s represents the velocity at the starting point of the path, v e Indicates the speed at the end of the path.
[0083] Compared with the prior art, the present invention has the following advantages:
[0084] 1. The present invention designs a complete S-shaped acceleration and deceleration control algorithm. By judging whether there is an acceleration zone, a uniform speed zone and a deceleration zone in the S-shaped speed curve to be planned, it is classified into four cases, including all possibilities of asymmetric S-shaped speed curves. Compared with the traditional S-shaped acceleration and deceleration control algorithm, the parameter calculation of the present invention is simple and does not rely on any simplified assumptions. The obtained S-shaped speed distribution can be asymmetric, and the speeds at the starting point and the end point of the path can be non-zero, which has better feasibility and applicability.
[0085] 2. When solving the optimal time parameters of the S-shaped speed curve based on the intelligent algorithm, the present invention takes into account more kinematic constraints, including not only the restrictions on the path of the end effector of the robot arm, but also the movement restrictions of each joint, thereby avoiding the excessive movement range due to the nonlinearity of the robot arm's operating space and configuration space, and ensuring the trajectory tracking performance of the end effector.
[0086] 3. The present invention applies the whale algorithm to the speed planning of the end effector of the robotic arm for the first time. The algorithm is a swarm-based global optimization algorithm with high computational efficiency, fast evolutionary convergence speed, high precision, strong robustness and good feasibility. It can effectively obtain the time-optimal asymmetric S-shaped speed distribution, fully develop the movement ability of the robotic arm without violating the kinematic constraints, shorten the task execution time and avoid the trajectory tracking error caused by the saturation of the joint motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 It is a schematic flow chart of a time-optimal asymmetric S-shaped acceleration and deceleration control method according to an embodiment of the present invention;
[0088] Figure 2 It is a schematic block diagram of a closed-loop inverse kinematics algorithm of a manipulator in a time-optimal asymmetric S-shaped acceleration and deceleration control method according to an embodiment of the present invention;
[0089] Figure 3 It is a flow chart of calculating the optimal time parameters of the S-shaped speed curve based on the whale algorithm in the time-optimal asymmetric S-shaped acceleration and deceleration control method of an embodiment of the present invention;
[0090] Figure 4 It is a motion curve diagram obtained by S-type acceleration and deceleration control in the time-optimal asymmetric S-type acceleration and deceleration control method in an embodiment of the present invention. DETAILED DESCRIPTION
[0091] The following is a further detailed description of the embodiments of the present invention in conjunction with the accompanying drawings and embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0092] Figure 1 A schematic flow chart of a time-optimal asymmetric S-shaped acceleration and deceleration control method according to an embodiment of the present invention is shown. Figure 2 A schematic block diagram of a closed-loop inverse kinematics algorithm for a manipulator in a time-optimal asymmetric S-shaped acceleration and deceleration control method according to an embodiment of the present invention is shown. Figure 3 A flow chart of calculating the optimal time parameters of an S-shaped speed curve based on a whale algorithm in a time-optimal asymmetric S-shaped acceleration and deceleration control method according to an embodiment of the present invention is shown. Figure 4 The motion curve diagram obtained by the S-type acceleration and deceleration control in the time-optimal asymmetric S-type acceleration and deceleration control method in an embodiment of the present invention is shown.
[0093] The embodiment of the present invention provides a time-optimal asymmetric S-shaped acceleration and deceleration control method, such as Figure 1 As shown, the following steps are included:
[0094] S1. Obtain the given total length of the robot path to be planned, the speed of the path starting point, and the speed of the path ending point, and determine the problem type based on whether there are acceleration and deceleration areas in the S-shaped speed curve to be planned.
[0095] S101. Define a reference path length, where the reference path length is expressed as formula (1):
[0096] L ref =L Acc +L Dec (1)
[0097] Among them, L ref Denotes the reference path length, L Acc Indicates the reference path length of the acceleration zone, L Dec represents the reference path length of the deceleration zone, calculated according to formula group (2) and formula group (3):
[0098]
[0099]
[0100] Among them, v s represents the velocity at the starting point of the path, v e represents the velocity at the end of the path, v cA represents the tangential velocity value of the given robot end effector when it moves at a constant speed. max represents the maximum acceleration of the end effector, J max Indicates the maximum jerk of the end effector;
[0101] S102: judging whether there is an acceleration zone and / or a deceleration zone in the S-shaped speed curve to be planned according to the relationship between the total length of the given path and the length of the reference path; wherein the following four situations are included:
[0102] If L ≥ L ref When , the path is a long path, and the S-shaped speed curve to be planned has both an acceleration area and a deceleration area. For the convenience of further describing the embodiment of the present invention, this case is defined as: Case=1.
[0103] If L <L ref , then the path is a short path. At this time, it is necessary to further determine whether the S-shaped speed curve to be planned includes an acceleration area and a deceleration area by judging the relationship between the initial and final speeds.
[0104] When v s >v e When the S-shaped speed curve to be planned does not include an acceleration zone. For the convenience of further describing the embodiment of the present invention, this case is defined as: Case=2.
[0105] When v s <v e When the S-shaped speed curve to be planned does not include a deceleration zone. For the convenience of further describing the embodiment of the present invention, this case is defined as: Case=3.
[0106] When v s =v e When the S-shaped speed curve to be planned includes neither an acceleration zone nor a deceleration zone. For the convenience of further describing the embodiment of the present invention, this case is defined as: Case=4.
[0107] Where L represents the total length of the given path.
[0108] S2. Establish fitness function.
[0109] In the embodiment of the present invention, the motion execution time is specifically used as the fitness evaluation index. In order to minimize the total motion execution time, the inverse of the total time is used as the fitness function. The fitness function established in step S2 is shown in formula (4):
[0110]
[0111] Among them, T m(m=1, 2, ..., 7) represents the execution time of the mth segment of the S-shaped speed curve to be planned; ω m The weight factor corresponding to the execution time of the mth segment of the S-shaped speed curve to be planned is represented. ω1, ω2, ω3, ω5, ω6, ω7 are set to 1 and ω4 is set to 0.5 to extend the execution time of the uniform speed segment. The problem to be solved in the embodiment of the present invention is the maximum optimization problem. The larger the fitness value, the closer the position of the search agent is to the optimal solution.
[0112] S3. Input preset parameters in the whale algorithm to initialize the population, wherein the preset parameters include problem type, whale population size, and maximum number of iterations.
[0113] In step S3 of the embodiment of the present invention, the problem type Case, the population size Ns, and the maximum number of iterations N are input. iter , the initial population X is expressed as formula (5):
[0114]
[0115] Where Ns represents the size of the whale population; X n ,n=1,2,…,Ns represents a search agent; T m,n ∈[0,T m,max ],m=1,2,…,7,T m,max Indicates the maximum execution time of the mth segment.
[0116] If Case = 1, there are both acceleration and deceleration zones, and the time of each stage is not set to 0;
[0117] If Case = 2, there is no acceleration zone, and T1, T2, and T3 are set to 0;
[0118] If Case = 3, there is no deceleration zone, and T5, T6, and T7 are set to 0;
[0119] If Case = 4, there is neither an acceleration zone nor a deceleration zone, and T1, T2, T3, T5, T6, and T7 are set to 0.
[0120] The technical solution provided in the embodiment of the present invention designs a complete S-shaped acceleration and deceleration control algorithm. By judging whether there are acceleration areas, uniform speed areas and deceleration areas in the S-shaped speed curve to be planned, it is classified into four cases, which include all possibilities of asymmetric S-shaped speed curves. Compared with the traditional S-shaped acceleration and deceleration control algorithm, the parameter calculation of the technical solution provided in the embodiment of the present invention is simple and does not rely on any simplified assumptions. The resulting S-shaped speed distribution can be asymmetric, and the speeds at the starting point and the end point of the path can be non-zero, which has better feasibility and applicability.
[0121] In the embodiment of the present invention, the S-shaped speed curve includes seven stages, so each search agent dimension is 7, the population size Ns is set to 30, and the maximum number of iterations N iter Set to 500, the question type is obtained by step S1.
[0122] S4. Determine whether the search agent in the whale algorithm meets the kinematic constraints. The kinematic constraints include: at any time, the movement of each joint of the manipulator should meet the acceleration, velocity constraint extreme value and velocity extreme value of the configuration space; at any time, the movement of the planned manipulator end effector should meet the jerk, acceleration and velocity constraints of the operation space; the acceleration direction of the acceleration zone of the S-shaped velocity profile is positive, and the acceleration direction of the deceleration zone is negative. The kinematic constraints in step S4 are expressed as formula (6):
[0123]
[0124] in, They represent the extreme value of acceleration and velocity of the i-th joint of the robot arm respectively; They represent the acceleration and velocity of the i-th joint of the robot at any time; J lim , A lim 、V lim They represent the extreme jerk, acceleration and velocity of the end effector of the robot arm respectively; J k 、a k 、v k They represent the jerk, acceleration and velocity of the end effector of the robot at any time; a Acc and a Dec They represent the acceleration in the acceleration zone and the deceleration zone respectively, and can be calculated by the following formulas (7) and (8):
[0125] a Acc =J1T1=J3T3 (7)
[0126] a Dec =J5T5=J7T7 (8)
[0127] According to the velocity profile of the end effector, combined with its predefined geometric path, the desired trajectory of the end effector can be obtained. Then the joint velocity and acceleration of the robot arm can be iteratively solved by the closed-loop inverse kinematics algorithm. The closed-loop inverse kinematics algorithm block diagram is shown in Figure 2 As shown, the control law can be expressed as formula (9):
[0128]
[0129] in, represents the Jacobian matrix, K prepresents the stiffness matrix of the end vertex, B represents the joint damping coefficient, Δx = xx des , x des The desired end position is designed. Substituting the joint angle into the forward kinematics equation f(q) can calculate the actual end position x; the desired end speed is With the Jacobi pseudoinverse The product of is used as a feed-forward link to improve system performance; is the gradient projection operator, and the gradient projection coefficient takes a negative value; H is the optimization objective function, which is set as formula (10):
[0130]
[0131] Among them, Nq represents the total number of robot joints, i represents the i-th joint, and q i represents the position of the i-th joint, q i,lim Represents the position extreme value of the i-th joint.
[0132] In the process of inverse kinematics solution, the optimization objective function is projected into the null space of the Jacobian matrix, driving the joint to move to the median of the joint's allowable displacement to achieve joint limitation.
[0133] The technical solution provided by the embodiment of the present invention takes into account more kinematic constraints, including not only the restrictions on the path of the end effector of the robot arm, but also the movement restrictions of each joint, thereby avoiding the excess of the movement range due to the nonlinearity of the robot arm's operating space and configuration space, and ensuring the trajectory tracking performance of the end effector.
[0134] S5. In the embodiment of the present invention, based on the whale algorithm and its update formula, the best solution in the population is obtained by continuously updating the position of the search agent within the maximum number of iterations. The flowchart of solving the optimal time parameter based on the whale algorithm is as follows: Figure 3 shown.
[0135] The mathematical model of the whale algorithm in the embodiment of the present invention is: Formula (11)-(15):
[0136]
[0137]
[0138]
[0139]
[0140]
[0141] in, represents the position vector of the whale, i.e. the search agent, represents the position vector of the prey, i.e. the global optimal solution, δ represents the current number of iterations, represents the distance between the prey and the whale, Express decision The weight value that affects the whale's movement distance. is a random vector defined on [0,2], Indicates the influence in the δth iteration The weight value of the change decreases linearly from 2 to 0 during the iteration process. is a random vector defined on [0,1].
[0142] The updated search agent position is as follows:
[0143] Define a random number p on [0,1],
[0144] If p<0.5 and Then update according to formulas (16) and (17):
[0145]
[0146]
[0147] If p<0.5 and Then update according to formulas (18) and (19),
[0148]
[0149]
[0150] in, Represents the position vector of any search agent selected from the current population.
[0151] If p ≥ 0.5, update according to formulas (20) and (21).
[0152]
[0153]
[0154] Where b is the logarithmic spiral shape constant and l is a random number defined on [-1,1].
[0155] S6. Obtain the time-optimal curve path and speed based on the optimal parameters of the whale algorithm.
[0156] In the embodiment of the present invention, the jerk of each stage is calculated according to the optimal execution time of the S curve, and then the acceleration, velocity and displacement curves of the end effector of the robot arm are obtained.
[0157] In the embodiment of the present invention, the jerk at each stage of the S curve can be calculated according to the following formulas (22) to (26) based on the optimal parameters obtained by the whale algorithm:
[0158] If Case=1, there are both acceleration and deceleration zones, then
[0159]
[0160] in,
[0161]
[0162] If Case=2, there is no acceleration zone, then
[0163]
[0164] If Case=3, there is no deceleration zone, then
[0165]
[0166] If Case = 4, there is neither an acceleration zone nor a deceleration zone, then it degenerates into a constant speed motion, including only a uniform speed zone.
[0167] J1=J2=J3=J4=J5=J6=J7=0 (26)
[0168] After calculating the jerk, the following acceleration time formula (27), velocity time formula (28), and displacement time formula (29) can be obtained through the integration formula:
[0169]
[0170]
[0171]
[0172] Among them, T m (m=1,2,…,7) represents the execution time of the mth segment of the S-shaped speed curve, J m (m=1,2,…,7) represents the jerk value of the mth segment of the S-shaped velocity curve, L represents the total length of the path, v s represents the velocity at the starting point of the path, v e Indicates the speed at the end of the path.
[0173] In the embodiment of the present invention, the time-optimal asymmetric S-shaped acceleration and deceleration control method based on the whale algorithm can obtain the jerk, acceleration, velocity, and displacement curves of the end effector of the manipulator, such as Figure 4 shown.
[0174] The technical solution provided in the embodiment of the present invention applies the whale algorithm to the speed planning of the end effector of the robotic arm for the first time. The algorithm is a global optimization algorithm based on a population, which has high computational efficiency, fast evolutionary convergence speed, high precision, strong robustness, and good feasibility. It can effectively obtain the time-optimal asymmetric S-shaped speed distribution, fully develop the movement ability of the robotic arm without violating the kinematic constraints, shorten the task execution time, and avoid the trajectory tracking error caused by the saturation of the joint motor.
[0175] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. 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 representations of the above terms do 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. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0176] 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.
[0177] The above specific implementations of the present invention do not constitute a limitation on the protection scope of the present invention. Any other corresponding changes and modifications made based on the technical concept of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. Time-optimal asymmetric S-type acceleration and deceleration control method, It is characterized in that The following steps are involved: S1. Obtain the total length of the given path, the starting point speed, and the ending point speed information of the robot arm path to be planned, and determine the problem type according to whether there is an acceleration zone and a deceleration zone in the S-shaped speed curve to be planned; S2, establish fitness function; S3. Input the preset parameters in the whale algorithm to initialize the population, wherein the preset parameters include the problem type, the size of the whale population, and the maximum number of iterations; S4, determining whether the search agent in the whale algorithm meets the kinematic constraints; The kinematic constraints include: At any time, the motion of each joint of the manipulator should satisfy the acceleration and velocity constraints of the configuration space; At any time, the planned motion of the end effector of the robot arm should satisfy the jerk, acceleration and velocity constraints of the operating space; The acceleration direction of the acceleration zone of the S-shaped velocity profile is positive, and the acceleration direction of the deceleration zone is negative; S5. Based on the whale algorithm and its update formula, the best solution in the population is obtained by continuously updating the position of the search agent within the maximum number of iterations, thereby obtaining the optimal time parameter based on the whale algorithm; S6. Calculate the jerk at each stage of the S-shaped velocity curve according to the optimal time parameter output by the whale algorithm, and successively integrate to obtain the acceleration, velocity and displacement curves, thereby determining the movement of the end effector of the robot arm; The step S1 specifically includes: S101. Define a reference path length, where the reference path length is expressed as formula (1): L ref =L Acc +L Dec (1) Among them, L ref Denotes the reference path length, L Acc Indicates the reference path length of the acceleration zone, L Dec represents the reference path length of the deceleration zone, calculated according to formula group (2) and formula group (3): Among them, v s represents the velocity at the starting point of the path, v e represents the velocity at the end of the path, v c A represents the tangential velocity value of the given robot end effector when it moves at a constant speed. max represents the maximum acceleration of the end effector, J max Indicates the maximum jerk of the end effector; S102: judging whether there is an acceleration zone and / or a deceleration zone in the S-shaped speed curve to be planned according to the relationship between the total length of the given path and the length of the reference path; wherein: If L ≥ L ref When , the path is a long path, and the S-shaped speed curve to be planned has both an acceleration area and a deceleration area; If L <L ref When , the path is a short path. At this time, by judging the relationship between the initial and final speeds, it is determined whether the S-shaped speed curve to be planned includes an acceleration zone and a deceleration zone, where L represents the total length of the given path; The judgment of whether the S-shaped speed curve to be planned based on the short path includes an acceleration zone and a deceleration zone is divided into the following cases: When v s >v e When , the S-shaped speed curve to be planned does not include an acceleration zone; When v s <v e When the S-shaped speed curve to be planned does not include a deceleration zone; When v s =v e When , the S-shaped speed curve to be planned includes neither an acceleration area nor a deceleration area; The fitness function in step S2 is shown in formula (4): Among them, T m (m=1,2,…,7) represents the execution time of the mth segment of the S-shaped speed curve to be planned, ω m represents the weight factor corresponding to the execution time of the mth segment of the S-shaped speed curve to be planned; In step S3, the initialization population is expressed as formula (5): Where Ns represents the size of the whale population; X n ,n=1,2,…,Ns represents a search agent; T m,n ∈[0,T m,max ],m=1,2,…,7,T m,max Indicates the maximum execution time of the mth segment; If there are both acceleration and deceleration zones, the time of each stage is not set to 0; If there is no acceleration zone, T 1 ,T 2 ,T 3 Set to 0; If there is no deceleration zone, T 5 ,T 6 ,T 7 Set to 0; If there is neither an acceleration zone nor a deceleration zone, T 1 ,T 2 ,T 3 ,T 5 ,T 6 ,T 7 Set to 0; The kinematic constraint condition in step S4 is expressed as formula (6): in, They represent the extreme value of acceleration and velocity of the i-th joint of the robot arm respectively; They represent the acceleration and velocity of the i-th joint of the robot at any time; J lim , A lim 、V lim They represent the extreme jerk, acceleration and velocity of the end effector of the robot arm respectively; J k 、a k 、v k They represent the jerk, acceleration and velocity of the end effector of the robot at any time; a Acc and a Dec Represent the acceleration in the acceleration zone and the deceleration zone respectively; In step S5, the mathematical model of the whale algorithm is: Formula (7)-(11): in, represents the position vector of the whale, i.e. the search agent, represents the position vector of the prey, i.e. the global optimal solution, δ represents the current number of iterations, represents the distance between the prey and the whale, Express decision The weight value that affects the whale's movement distance. is a random vector defined on [0,2], Indicates the impact in the δth iteration The weight value of the change decreases linearly from 2 to 0 during the iteration process. is a random vector defined on [0,1]; The updated search agent position is as follows: Define a random number p on [0,1], If p<0.5 and Then update according to formulas (12) and (13) If p<0.5 and Then update according to formulas (14) and (15) in, represents the position vector of any search agent selected from the current population; If p ≥ 0.5, update according to formulas (16) and (17) Where b is the logarithmic spiral shape constant, l is a random number defined on [-1,1]; In step S6, the optimal asymmetric S-shaped speed curve is obtained as follows: The jerk at each stage of the S-shaped velocity curve is expressed as formula (18)-(22): If there are both acceleration and deceleration zones, the jerk can be expressed as formula (18) and formula (19): If there is no acceleration zone, the jerk is expressed as formula (20): If there is no deceleration zone, the jerk is expressed as formula (21): If there is neither an acceleration zone nor a deceleration zone, the jerk is expressed as formula (22): I 1 =J 2 =J 3 =J 4 =J 5 =J 6 =J 7 =0 (22) The acceleration, velocity and displacement at each stage of the S-shaped velocity curve are respectively expressed as formulas (23)-(25): The acceleration at each stage of the S-shaped velocity curve is expressed as formula (23): The speed at each stage of the S-shaped speed curve is expressed as formula (24): The displacement of each stage of the S-shaped velocity curve is expressed as formula (25): Among them, T m (m=1,2,…,7) represents the execution time of the mth segment of the S-shaped speed curve, J m (m=1,2,…,7) represents the jerk value of the mth segment of the S-shaped velocity curve, L represents the total length of the path, v s represents the velocity at the starting point of the path, v e Indicates the speed at the end of the path.
