A method, device and equipment for determining a trajectory of a robot arm
Patent Information
- Application Number
- CN202311580425.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-11-23
AI Technical Summary
[0005]针对现有技术存在的问题,本发明实施例提供了一种确定机械臂运行轨迹的方法、装置及设备,以解决或者部分解决现有技术中对多轴机械臂的运动轨迹进行规划时,由于空间原因无法规划出最优的路径,影响货物装卸效率的技术问题
[0059]本发明提供了一种确定机械臂运行轨迹的方法、装置及设备,方法包括:确定机械臂末端执行器到达末端位姿时,各关节点需要转动的目标角度;以各关节点需要转动的目标角度为已知条件,以起点、终点、预设的第一中间点和第二中间点确定机械臂的初始运行轨迹;所述初始运行轨迹包括三段轨迹;第一段轨迹、第二段轨迹和第三段轨迹;所述第一段轨迹为五次多项式,第二段轨迹为六次多项式,第三段轨迹为七次多项式;利用改进后的自适应量子遗传算法对所述机械臂的初始运行轨迹进行优化,获得待优化参数的最优解;所述待优化参数包括:第一段轨迹的长度、第二段轨迹的长度、第三段轨迹的长度,第一段轨迹的运行时长,第二段运行轨迹的运行时长、第三段运行轨迹的运行时长、第一中间点的速度、第二中间点的速度、第三中间点的速度、第一中间点的加速度、第二中间点的加速度、第三中间点的加速度、第一中间点的加速度变化率、第二中间点的加速度变化率和第三中间点的加速度变化率;根据所述待优化参数的最优解确定所述五次多项式,所述六次多项式,及所述七次多项式的系数,得到目标运行轨迹;如此,根据起点、中间点和终点的需求不同,将初始运行轨迹划分为三段,分别用五次多项式,所述六次多项式,及所述七次多项式来规划初始轨迹,确保速度、加速度和加速度变化率光滑;为了对初始运行轨迹的优化效果,使用自适应量子遗传算法来确定出最优解,自适应量子遗传算法具有速度快、搜索范围广、适应性强等特点,因此可快速准确地找到最优解,为机械臂规划出最优的路径,提高货物装卸效率。
Smart Images

Figure CN117506911B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotic arms for automated loading and unloading equipment, and in particular to a method, apparatus and equipment for determining the running trajectory of a robotic arm. Background Technology
[0002] Intelligent loading and unloading is a new type of cargo handling method applicable to the loading and unloading of goods inside box trucks, freight trains, and containers, or bulk cargo within yards. When goods such as box trucks, freight trains, and containers are transported in bulk, intelligent loading and unloading equipment (multi-axis robotic arms) is used to quickly unload or load goods upon arrival at various distribution points in the freight yard or warehouse. This significantly reduces loading and unloading time, improves the overall transportation efficiency of the entire transfer process, lowers loading and unloading costs, and saves a considerable amount of labor.
[0003] In existing technologies, most methods for optimizing the motion trajectory of robotic arms in intelligent loading and unloading equipment use cubic and quintic polynomial interpolation functions in polynomial interpolation calculation methods. The joint angles and angular velocities of the robotic arm motion obtained by cubic polynomial interpolation are continuous, and the angular acceleration obtained by quintic polynomial interpolation is also continuous. This method is suitable for most robotic arm path planning.
[0004] However, intelligent loading and unloading equipment has the characteristics of small operating space, many joints, long working time and high work intensity. Existing path planning technology has certain limitations in the current operation of the equipment, thus affecting the loading and unloading efficiency of goods. Summary of the Invention
[0005] To address the problems existing in the prior art, embodiments of the present invention provide a method, apparatus, and equipment for determining the running trajectory of a robotic arm, so as to solve or partially solve the technical problem in the prior art where the optimal path cannot be planned due to space constraints when planning the motion trajectory of a multi-axis robotic arm, thus affecting the efficiency of cargo loading and unloading.
[0006] A first aspect of the present invention provides a method for determining the trajectory of a robotic arm, the method comprising:
[0007] Determine the target angle that each joint needs to rotate when the end effector of the robotic arm reaches the end pose;
[0008] Using the target angles that each joint needs to rotate as known conditions, the initial running trajectory of the robotic arm is determined by the starting point, the ending point, and the preset first and second intermediate points; the initial running trajectory includes three segments: the first segment, the second segment, and the third segment; the first segment is a fifth-degree polynomial, the second segment is a sixth-degree polynomial, and the third segment is a seventh-degree polynomial.
[0009] An improved adaptive quantum genetic algorithm is used to optimize the initial trajectory of the robotic arm to obtain the optimal solution for the parameters to be optimized. The parameters to be optimized include: the length of the first trajectory segment, the length of the second trajectory segment, the length of the third trajectory segment, the runtime of the first trajectory segment, the runtime of the second trajectory segment, the runtime of the third trajectory segment, the velocity of the first intermediate point, the velocity of the second intermediate point, the acceleration of the first intermediate point, the acceleration of the second intermediate point, the rate of change of acceleration of the first intermediate point, and the rate of change of acceleration of the second intermediate point.
[0010] The coefficients of the fifth-degree polynomial, the sixth-degree polynomial, and the seventh-degree polynomial are determined based on the optimal solution of the parameters to be optimized, and the target trajectory is obtained.
[0011] In the above scheme, the first segment of the trajectory is the trajectory connecting the starting point and the first intermediate point, and the first segment of the trajectory is represented as:
[0012]
[0013] The constraint equations satisfied by the quintic polynomial are:
[0014]
[0015] Let T1 = t1 - t0, then we have:
[0016]
[0017] At this moment, the rate of change of acceleration at the first intermediate point is:
[0018] θ1″′(t1)=6c 53 +24c 54 t1+60c 55 t1 2 ;in,
[0019] t0 is the starting time, t1 is the time of the first intermediate point, θ1(t) is the fifth-order polynomial corresponding to the first segment of the trajectory; T1 is the running time of the first segment of the trajectory, θ1′(t) is the first derivative of θ1(t), θ″1(t) is the second derivative of θ1(t), θ″′(t) is the third derivative of θ(t), θ1(t0) is the position of the starting point, θ1′(t0) is the velocity at the starting point, θ″1(t0) is the acceleration at the starting point, θ1(t1) is the position of the first intermediate point, θ′1(t1) is the velocity at the first intermediate point, and θ″1(t1) is the acceleration at the first intermediate point.
[0020] In the above scheme, the second segment of the trajectory is the trajectory connecting the first intermediate point and the second intermediate point, and the second segment of the trajectory is represented as follows:
[0021]
[0022] The constraint equations satisfied by the sixth-degree polynomial are:
[0023]
[0024] Let T2 = t2 - t1, then we have:
[0025]
[0026] At this point, the rate of change of acceleration at the second intermediate point is:
[0027] θ″′2(t2)=6c 63 +24c 64 t2+60c 65 t2 2 +120t2 3 ;in,
[0028] t1 is the time of the first intermediate point, t2 is the time of the second intermediate point, θ2(t) is the sixth-order polynomial corresponding to the second trajectory segment; T2 is the running time of the second trajectory segment, θ′2(t) is the first derivative of θ2(t), θ″2(t) is the second derivative of θ2(t), θ″′2(t2) is the third derivative of θ2(t), θ2(t1) is the position of the first intermediate point, θ′2(t1) is the velocity of the first intermediate point, θ″2(t1) is the acceleration of the first intermediate point, θ″′2(t1) is the rate of change of acceleration of the first intermediate point, θ′2(t2) is the velocity of the second intermediate point, θ″2(t2) is the acceleration of the second intermediate point, and θ″′2(t2) is the rate of change of acceleration of the second intermediate point.
[0029] In the above scheme, the third segment of the trajectory is the trajectory connecting the second intermediate point and the endpoint, and the third segment of the trajectory is represented as follows:
[0030] θ3(t)=c 70 +c 71 t+c 72 t 2 +c 73 t 3 +c 74 t 4 +c 75 t 5 +c 76 t 6 +c 77 t 7
[0031] θ′3(t)=c 71 +2c 72 t+3c73 t 2 +4c 74 t 3 +5c 75 t 4 +6c 76 t 5 +7c 77 t 6
[0032] θ″3(t)=2c 72 +6c 73 t+12c 74 t 2 +20c 75 t 3 +30c 76 t 4 +42c 77 t 5
[0033] θ″′3(t)=6c 73 +24c 74 t+60c 75 t 2 +120c 76 t 3 +210c 77 t 4
[0034] The constraint equations satisfied by the seventh-degree polynomial are:
[0035]
[0036] Let T3 = t f -t2, then:
[0037] in,
[0038] t2 is the second intermediate point time, t f The endpoint is θ3(t), which is the seventh-degree polynomial corresponding to the third trajectory segment; T3 is the running time of the third trajectory segment.
[0039] θ′3(t) is the first derivative of θ3(t), θ″3(t) is the second derivative of θ3(t), θ″′3(t) is the third derivative of θ3(t), θ3(t2) is the position of the second intermediate point, θ′3(t2) is the velocity of the second intermediate point, θ″3(t2) is the acceleration of the first intermediate point, θ″′3(t2) is the rate of change of acceleration of the second intermediate point, and θ′3(t) is the velocity of the second intermediate point. f ) is the velocity at the endpoint, θ″3(t f ) represents the acceleration at the endpoint, θ″′3(t fThe rate of change of acceleration is the endpoint.
[0040] In the above scheme, the step of optimizing the initial trajectory of the robotic arm using an improved adaptive quantum genetic algorithm to obtain the optimal solution for the parameters to be optimized includes:
[0041] Obtain the initial population size, maximum number of iterations, quantum chromosome encoding length, and the type and value range of the parameters to be optimized;
[0042] In the current iteration, based on the initial population size, the quantum chromosome encoding length, and the value range of the parameters to be optimized, the improved adaptive quantum genetic algorithm is used to randomly generate the current generation population, which is the solution of each set of the parameters to be optimized.
[0043] Determine the fitness function and constraints corresponding to trajectory optimization. Under the constraints, with the fitness function as the optimization objective, substitute each set of solutions into the polynomial corresponding to the initial running trajectory to obtain the fitness function value corresponding to each set of solutions.
[0044] If it is determined that the current iteration meets the iteration termination condition, the set of solutions corresponding to the minimum fitness function value is determined as the optimal solution for the parameters to be optimized.
[0045] In the above scheme, the fitness function corresponding to trajectory optimization includes:
[0046] According to the formula Determine the fitness function; J is the fitness function value, k is the runtime index, T1 is the runtime of the first running trajectory, T2 is the runtime of the second running trajectory, and T3 is the runtime of the third running trajectory.
[0047] In the above scheme, if it is determined that the current iteration does not meet the iteration termination condition, the method further includes:
[0048] Determine the current quantum rotation angle and quantum rotation direction for each parameter to be optimized in the current generation population;
[0049] Based on the adaptive quantum genetic algorithm, the next quantum rotation angle is determined using the current quantum rotation angle;
[0050] Based on the next quantum rotation angle and the quantum rotation direction, rotation is performed to generate the next generation of the current generation; each generation contains multiple solutions.
[0051] In the above scheme, determining the next quantum rotation angle based on the current quantum rotation angle using the adaptive quantum genetic algorithm includes:
[0052] According to the formula Determine the next quantum rotation angle γ j+1 ; wherein, the γ j The current quantum rotation angle is given, g is the number of iterations, and f is the value of f. j f is the fitness function value corresponding to the j-th solution in the current population. best This represents the optimal fitness function value in the current population.
[0053] A second aspect of the present invention provides an apparatus for determining the trajectory of a robotic arm, the apparatus comprising:
[0054] The first determining unit determines the target angle that each joint needs to rotate when the end effector of the robotic arm reaches the endpoint pose.
[0055] The second determining unit uses the target angle that each joint needs to rotate as a known condition, and determines the initial running trajectory of the robotic arm using the starting point, the ending point, and the preset first and second intermediate points; the initial running trajectory includes three segments: the first segment, the second segment, and the third segment; the first segment is a fifth-order polynomial, the second segment is a sixth-order polynomial, and the third segment is a seventh-order polynomial.
[0056] An optimization unit is used to optimize the initial running trajectory of the robotic arm using an improved adaptive quantum genetic algorithm to obtain the optimal solution for the parameters to be optimized. The parameters to be optimized include: the length of the first trajectory segment, the length of the second trajectory segment, the length of the third trajectory segment, the running time of the first trajectory segment, the running time of the second trajectory segment, the running time of the third trajectory segment, the velocity of the first intermediate point, the velocity of the second intermediate point, the acceleration of the first intermediate point, the acceleration of the second intermediate point, the rate of change of acceleration of the first intermediate point, and the rate of change of acceleration of the second intermediate point.
[0057] The third determining unit is used to determine the coefficients of the fifth-degree polynomial, the sixth-degree polynomial, and the seventh-degree polynomial based on the optimal solution of the parameters to be optimized, so as to obtain the target running trajectory.
[0058] A third aspect of the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method described in any of the first aspects.
[0059] This invention provides a method, apparatus, and device for determining the trajectory of a robotic arm. The method includes: determining the target angles that each joint needs to rotate when the end effector of the robotic arm reaches its end pose; using the target angles that each joint needs to rotate as known conditions, determining the initial trajectory of the robotic arm using a start point, an end point, and a preset first and second intermediate point; the initial trajectory includes three segments: a first segment, a second segment, and a third segment; the first segment is a fifth-order polynomial, the second segment is a sixth-order polynomial, and the third segment is a seventh-order polynomial; optimizing the initial trajectory of the robotic arm using an improved adaptive quantum genetic algorithm to obtain the optimal solution for the parameters to be optimized; the parameters to be optimized include: the length of the first segment, the length of the second segment, the length of the third segment, the runtime of the first segment, the runtime of the second segment, the runtime of the third segment, the speed of the first intermediate point, and the second... The velocity at the intermediate point, the velocity at the third intermediate point, the acceleration at the first intermediate point, the acceleration at the second intermediate point, the acceleration at the third intermediate point, the rate of change of acceleration at the first intermediate point, the rate of change of acceleration at the second intermediate point, and the rate of change of acceleration at the third intermediate point are calculated. Based on the optimal solution of the parameters to be optimized, the coefficients of the fifth-order polynomial, the sixth-order polynomial, and the seventh-order polynomial are determined to obtain the target trajectory. Thus, according to the different requirements of the starting point, intermediate points, and ending point, the initial trajectory is divided into three segments, and the initial trajectory is planned using the fifth-order polynomial, the sixth-order polynomial, and the seventh-order polynomial respectively, ensuring that the velocity, acceleration, and rate of change of acceleration are smooth. To optimize the initial trajectory, an adaptive quantum genetic algorithm is used to determine the optimal solution. The adaptive quantum genetic algorithm has the characteristics of high speed, wide search range, and strong adaptability, thus it can quickly and accurately find the optimal solution, plan the optimal path for the robotic arm, and improve the efficiency of cargo loading and unloading. Attached Figure Description
[0060] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings.
[0061] In the attached diagram:
[0062] Figure 1 A schematic flowchart of a method for determining the trajectory of a robotic arm according to an embodiment of the present invention is shown;
[0063] Figure 2 A schematic diagram of the coordinate system structure of a robotic arm according to an embodiment of the present invention is shown;
[0064] Figure 3A schematic diagram of the initial running trajectory according to an embodiment of the present invention is shown;
[0065] Figure 4 A schematic diagram of a device for determining the trajectory of a robotic arm according to an embodiment of the present invention is shown.
[0066] Figure 5 A schematic diagram of a device for determining the trajectory of a robotic arm according to an embodiment of the present invention is shown. Detailed Implementation
[0067] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0068] This invention provides a method for determining the trajectory of a robotic arm, such as... Figure 1 As shown, the method includes the following steps:
[0069] S110, determine the target angle that each joint needs to rotate when the end effector of the robotic arm reaches the end pose;
[0070] The robotic arm in this invention has 6 degrees of freedom. In actual industrial production, the control of the robotic arm is generally point-to-point control. Therefore, before trajectory planning, it is necessary to determine the start and end points of the robotic arm end effector and the target angles that each joint needs to rotate when the end effector reaches the end pose. Then, using the target angles that each joint needs to rotate as known conditions, the motion trajectory of the robotic arm is planned so that each key point of the robotic arm reaches the corresponding target angle.
[0071] Specifically, a DH parameter table is established for the robotic arm based on its structural parameters, as shown in Table 1:
[0072] Table 1
[0073] Linki <![CDATA[η i ]]> <![CDATA[δ i-1 ]]> <![CDATA[l i-1 ]]> <![CDATA[d i ]]> 1 0 -π / 2 0 0 2 π / 2 0 <![CDATA[l2]]> 0 3 0 π / 2 0 <![CDATA[d3]]> 4 0 π / 2 <![CDATA[l3]]> 0 5 0 π / 2 0 0 6 0 0 0 <![CDATA[d6]]>
[0074] To establish the base coordinate system, joint coordinate systems, and end effector coordinate system of the robotic arm, you can refer to [reference needed]. Figure 2 The forward kinematics of a robotic arm refers to determining the pose of the end effector relative to the base coordinate system given the parameters of each joint. It reflects the mapping relationship from joint space to workspace. Therefore, based on the established coordinate system and the DH parameter table, the homogeneous transformation matrix between the current coordinate system and the next coordinate system can be obtained.
[0075] Then, based on each homogeneous transformation matrix, the transformation matrix of the sixth link relative to the base coordinate system is determined. The transformation matrix of the sixth link relative to the base coordinate system is the product of each homogeneous transformation matrix.
[0076] If the pose of the end effector is known, determining the rotation angles required for each joint to reach that pose represents the inverse problem of pose motion, a mapping from Cartesian space to joint space. Based on this, in this embodiment, the target rotation angle for each joint can be solved by corresponding homogeneous transformation matrices and the transformation matrix of the sixth link relative to the base coordinate system. The solution process can refer to conventional methods in this field, and therefore will not be elaborated here.
[0077] S111, with the target angle that each joint needs to rotate as known conditions, the initial running trajectory of the robotic arm is determined by the starting point, the ending point, the preset first intermediate point and the second intermediate point; the initial running trajectory includes three segments: the first segment, the second segment and the third segment; the first segment is a fifth-degree polynomial, the second segment is a sixth-degree polynomial and the third segment is a seventh-degree polynomial.
[0078] Taking the process of a robotic arm grasping an object as an example, trajectory planning is performed. Assume that the robotic arm has 6 degrees of freedom and there are 2 intermediate points connecting the start and end points. In order to keep the position, velocity and acceleration of the trajectory continuous, and to allow the position, velocity and acceleration of the start and end points to be arbitrarily configured, at least a fifth-order polynomial curve fitting of the joint trajectory is required.
[0079] This invention discovers that a fifth-order polynomial curve cannot guarantee reduced impact and smoothness of the robotic arm joints, as this indicator is determined by changes in acceleration. Therefore, a seventh-order polynomial is used to fit the curve to ensure that the requirements are met. However, using a seventh-order polynomial for each trajectory segment increases the computational load, which is detrimental to real-time performance. Therefore, this invention uses a combination of fifth-order, sixth-order, and seventh-order polynomials, inserting two intermediate points (the first and second intermediate points) between the start and end points, resulting in three trajectory segments (the first, second, and third segments).
[0080] For the starting point, smooth velocity and acceleration are required, so a fifth-order polynomial is used to connect the starting point and the first intermediate point. For the intermediate point, smooth velocity is required, and a connection to the ending point is needed, while also considering performance and computational requirements. Therefore, a sixth-order polynomial is used to connect the first intermediate point and the second intermediate point. For the ending point, smooth velocity, acceleration, and changes in acceleration are required to reduce impact, decrease energy consumption, and improve the lifespan of the robotic arm. Therefore, a seventh-order polynomial is used to connect the second intermediate point and the ending point.
[0081] That is, the present invention uses the target angle that each joint needs to rotate as a known condition, and uses the starting point, the ending point, the preset first intermediate point and the second intermediate point to determine the initial running trajectory of the robotic arm; the initial running trajectory includes three segments: the first segment, the second segment and the third segment; the first segment is a fifth-order polynomial, the second segment is a sixth-order polynomial and the third segment is a seventh-order polynomial.
[0082] Since the joints of a multi-axis robotic arm can be controlled synchronously, knowing the trajectory of one joint allows us to know the trajectories of the others. Therefore, this invention uses the end effector of the robotic arm as an example to illustrate trajectory planning. Let the starting time be t0, the starting joint angle be θ0, the velocity at the starting point be 0, and the acceleration at the starting point be 0; the first intermediate point time is t1, with corresponding joint angles, velocities, and accelerations at the first intermediate point; the second intermediate point time is t2, with corresponding joint angles, velocities, and accelerations at the second intermediate point; the ending time is t... f At the endpoint, the velocity is 0, the acceleration is 0, the change in velocity is 0, and there is a corresponding endpoint joint angle.
[0083] It is understandable that when the end effector rotates a certain angle (radians), there is a corresponding trajectory length (radians multiplied by the arm length). That is, the joint angle of the first intermediate point corresponds to the length of the first trajectory segment, the joint angle of the second intermediate point corresponds to the length of the second trajectory segment, and the joint angle of the end point corresponds to the length of the third trajectory segment.
[0084] In this invention, the first trajectory segment is the trajectory connecting the starting point and the first intermediate point, and the first trajectory segment is represented as:
[0085]
[0086] The constraint equations satisfied by the quintic polynomial are:
[0087]
[0088] Let T1 = t1 - t0, then we have:
[0089]
[0090] At this moment, the rate of change of acceleration at the first intermediate point is:
[0091] θ″′1(t1)=6c 53 +24c 54 t1+60c 55 t1 2 ;in,
[0092] t0 is the starting time, t1 is the time of the first intermediate point, θ1(t) is the fifth-order polynomial corresponding to the first segment of the trajectory; T1 is the running time of the first segment of the trajectory, θ′1(t) is the first derivative of θ1(t), θ″1(t) is the second derivative of θ1(t), θ″′(t) is the third derivative of θ(t), θ1(t0) is the position of the starting point, θ′1(t0) is the velocity at the starting point, θ″1(t0) is the acceleration at the starting point, θ1(t1) is the position of the first intermediate point, θ′1(t1) is the velocity at the first intermediate point, and θ″1(t1) is the acceleration at the first intermediate point.
[0093] The second segment of the trajectory is the trajectory connecting the first intermediate point and the second intermediate point. The second segment of the trajectory is represented as follows:
[0094]
[0095] The constraint equations satisfied by the sixth-degree polynomial are:
[0096]
[0097] Let T2 = t2 - t1, then we have:
[0098]
[0099] At this point, the rate of change of acceleration at the second intermediate point is:
[0100] θ″′2(t2)=6c 63 +24c 64 t2+60c 65 t2 2 +120t2 3 ;in,
[0101] t1 is the time of the first intermediate point, t2 is the time of the second intermediate point, θ2(t) is the sixth-order polynomial corresponding to the second trajectory segment; T2 is the running time of the second trajectory segment, θ′2(t) is the first derivative of θ2(t), θ″2(t) is the second derivative of θ2(t), θ″′2(t2) is the third derivative of θ2(t), θ2(t1) is the position of the first intermediate point, θ′2(t1) is the velocity of the first intermediate point, θ″2(t1) is the acceleration of the first intermediate point, θ″′2(t1) is the rate of change of acceleration of the first intermediate point, θ′2(t2) is the velocity of the second intermediate point, θ″2(t2) is the acceleration of the second intermediate point, and θ″′2(t2) is the rate of change of acceleration of the second intermediate point.
[0102] The third segment of the trajectory is the trajectory connecting the second intermediate point and the endpoint, and the third segment of the trajectory is represented as follows:
[0103] θ3(t)=c 70 +c 71 t+c 72 t 2 +c 73 t 3 +c 74 t 4 +c 75 t 5 +c 76 t 6 +c 77 t 7
[0104] θ3′(t)=c 71 +2c 72 t+3c 73 t 2 +4c 74 t 3 +5c 75 t 4 +6c 76 t 5 +7c 77 t 6
[0105] θ3″(t)=2c 72 +6c 73 t+12c 74 t 2 +20c 75 t 3 +30c 76 t 4 +42c 77 t 5
[0106] θ3″′(t)=6c 73 +24c 74 t+60c 75 t 2 +120c 76 t 3 +210c 77 t 4
[0107] The constraint equations satisfied by the seventh-degree polynomial are:
[0108]
[0109] Let T3 = t f -t2, then:
[0110] in,
[0111] t2 is the second intermediate point time, tf The endpoint is θ3(t), which is the seventh-degree polynomial corresponding to the third trajectory segment; T3 is the running time of the third trajectory segment.
[0112] θ′3(t) is the first derivative of θ3(t), θ″3(t) is the second derivative of θ3(t), θ″′3(t) is the third derivative of θ3(t), θ3(t2) is the position of the second intermediate point, θ′3(t2) is the velocity of the second intermediate point, θ″3(t2) is the acceleration of the first intermediate point, θ″′3(t2) is the rate of change of acceleration of the second intermediate point, and θ′3(t) is the velocity of the second intermediate point. f ) is the velocity at the endpoint, θ″3(t f ) represents the acceleration at the endpoint, θ″′3(t f The rate of change of acceleration is the endpoint.
[0113] This determines the initial trajectory of the robotic arm. A diagram of the initial trajectory can be found here. Figure 3 As shown, in Figure 3 Point A is the starting point, point B is the first intermediate point, point C is the second intermediate point, and point D is the ending point.
[0114] S112, The improved adaptive quantum genetic algorithm is used to optimize the initial running trajectory of the robotic arm to obtain the optimal solution of the parameters to be optimized;
[0115] Understandably, the initial trajectory is a roughly determined trajectory. In order to minimize the movement time of the robotic arm, the spatial distance it moves, and the maximum torque set by the joint, and to minimize the impact on the joint, the initial trajectory needs to be optimized.
[0116] In this invention, an improved adaptive quantum genetic algorithm is used to optimize the initial trajectory of the robotic arm and obtain the optimal solution for the parameters to be optimized. The parameters to be optimized include: the length of the first trajectory segment θ1 = θ1(t1), the length of the second trajectory segment θ2 = θ2(t2) - θ1(t1), and the length of the third trajectory segment θ3 = θ3(t1). f The runtime of the first segment of the trajectory is T1 = t1 - t0, the runtime of the second segment is T2 = t2 - t1, and the runtime of the third segment is T2 = t2 - t0. f -t2, velocity at the first intermediate point θ′1(t1), velocity at the second intermediate point θ′2(t1), acceleration at the first intermediate point θ″1(t1), acceleration at the second intermediate point θ″2(t1), rate of change of acceleration at the first intermediate point θ″′1(t1), rate of change of acceleration at the second intermediate point θ″′2(t2).
[0117] To better understand the optimization strategy presented in this paper, we will first introduce the adaptive quantum genetic algorithm.
[0118] Quantum genetic algorithm is an intelligent optimization algorithm that combines quantum computing with genetic algorithm. It mainly includes: quantum bit encoding, quantum update, quantum crossover and mutation.
[0119] Specifically, the encoding of the quantum genetic algorithm consists of qubits, as shown in formula (1):
[0120] |ψ>=α|0>+β|1> (1)
[0121] |0> and |1> represent the two polarization states (ground states) of a qubit, which constitute a pair of orthogonal normalized bases in two-dimensional complex space; α and β are the probability amplitudes of the corresponding base states, which are complex coefficients and satisfy |α| 2 +|β| 2 =1; |ψ> represents the probability that the quantum state collapses to one of the two ground states mentioned above due to measurement.
[0122] The chromosome encoding form of n qubits is shown below:
[0123]
[0124] Wherein, vector [a j β j ] T The two components represent the probability amplitudes of the j-th qubit having two ground states, |0> and |1>. This vector is generally used to represent the j-th qubit, specifically referred to as the j-th qubit in the quantum chromosome encoding state; j takes values from 1 to n.
[0125] A qubit can represent not only two states, |0> and |1>, but all states between |0> and |1>, until it is measured and collapses into a specific state. When a system has n qubits, the maximum number of states it can represent is 2n. n .
[0126] The total number of states represented by n qubits, ψ, satisfies the following equation:
[0127]
[0128] In formula (3), C k State S k The probability amplitude, and satisfies the normalization condition.
[0129] A typical 3-qubit chromosome is as follows:
[0130]
[0131] They can represent a total of 8 states S k (represented in binary code) and its probability amplitude C k as follows:
[0132]
[0133] The squares of the norms of each probability amplitude are as follows:
[0134]
[0135] The above describes the encoding method for qubits. Next, we will introduce quantum updates.
[0136] The quantum genetic algorithm differs from the traditional genetic algorithm in its update method; it employs a quantum rotation gate for updating. The quantum rotation gate is used to apply the s-th vector [a] to the quantum chromosome. s β s ] T This causes the two components to interfere with each other, changing the phase and thus altering the distribution of their probability amplitudes. Quantum Rotation Gate U s As shown in formula (7):
[0137]
[0138] Where, γ j It is the quantum rotation angle.
[0139] The j-th qubit in the quantum chromosome coding state can be updated through a quantum rotation gate, as shown in equation (8):
[0140]
[0141] In formula (8), For the qubit updated through the rotation gate, The transpose matrix is [a j β j ] T ,therefore Let j be the j-th qubit in the quantum chromosome encoding state.
[0142] Combining formulas (7) and (8), the function of a revolving door can be schematically illustrated using... Figure 4 Indicated. By Figure 4 It is evident that the speed of qubit update is related to the rotation angle γ of the rotating gate. j If the rotation angle γ is too small, it will cause the qubits to update too slowly, resulting in a very low algorithm convergence speed; j If the rotation angle is too large, it will cause the qubits to update too quickly, leading to premature convergence of the algorithm. And the rotation angle γ...j The sign depends on the direction of rotation of the revolving door; when rotating counterclockwise, the rotation angle γ is... j When the value is positive, the probability that the qubit will collapse to "1" due to measurement will increase; when rotating clockwise, the rotation angle γ j If the value is negative, the probability that the quantum bit will collapse to "0" due to measurement will increase.
[0143] Therefore, to avoid premature convergence or slow convergence, this invention improves the quantum genetic algorithm, resulting in an adaptive quantum genetic algorithm. This algorithm primarily adjusts the rotation angle of the next generation population based on the rotation angle of the current generation, thus dynamically adjusting the rotation angle of the rotation gate based on actual conditions. This prevents the qubits from updating too slowly or too quickly, as shown below:
[0144] The next quantum rotation angle γ is determined according to formula (9). j+1 ;in,
[0145]
[0146] In formula (9), γ j Let f be the current quantum rotation angle, g be the number of iterations, and f be the current quantum rotation angle. j f is the fitness function value corresponding to the j-th solution in the current population. best This represents the optimal fitness function value in the current population.
[0147] The fitness function can be understood as an optimization metric when optimizing a trajectory. The fitness function will be explained in detail later, so it will not be repeated here.
[0148] Similar to traditional genetic algorithms, crossover plays a crucial role in quantum genetic algorithms, acting as a core component in the search and update process for optimal solutions. Crossover is used to generate new individuals and reduce the probability of disrupting effective patterns. While the crossover method itself is not significantly different from traditional genetic algorithms, the key difference lies in the fact that quantum crossover occurs between the encodings of two qubits. Conventional quantum genetic algorithms use a fixed mutation probability, making the mutation process largely similar to that in traditional genetic algorithms.
[0149] Therefore, in one implementation, an improved adaptive quantum genetic algorithm is used to optimize the initial trajectory of the robotic arm to obtain the optimal solution for the parameters to be optimized, including:
[0150] Obtain the initial population size, maximum number of iterations, quantum chromosome encoding length, and the type and value range of the parameters to be optimized;
[0151] In the current iteration, based on the initial population size, the quantum chromosome encoding length, and the value range of the parameters to be optimized, the improved adaptive quantum genetic algorithm is used to randomly generate the current generation population, which is the solution of each set of the parameters to be optimized.
[0152] Determine the fitness function and constraints corresponding to trajectory optimization. Under the constraints, with the fitness function as the optimization objective, substitute each set of solutions into the polynomial corresponding to the initial running trajectory to obtain the fitness function value corresponding to each set of solutions.
[0153] If it is determined that the current iteration meets the iteration termination condition, the set of solutions corresponding to the minimum fitness function value is determined as the optimal solution for the parameters to be optimized.
[0154] As described above, the types of parameters to be optimized in this invention include: the length of the first trajectory segment θ1 = θ1(t1), the length of the second trajectory segment θ2 = θ2(t2) - θ1(t1), and the length of the third trajectory segment θ3 = θ3(t1). f The runtime of the first segment of the trajectory is T1 = t1 - t0, the runtime of the second segment is T2 = t2 - t1, and the runtime of the third segment is T2 = t2 - t0. f -t2, the velocity at the first intermediate point θ′1(t1), the velocity at the second intermediate point θ′2(t1), the acceleration at the first intermediate point θ″1(t1), the acceleration at the second intermediate point θ″2(t1), the rate of change of acceleration at the first intermediate point θ″′1(t1), and the rate of change of acceleration at the second intermediate point θ″′2(t2). The range of values for each parameter to be optimized is known.
[0155] As can be seen, the parameters to be optimized in this invention include 12 parameters to be optimized. The initial population size refers to the number of solutions for the parameters to be optimized in the population. For example, when the initial population size is 50, there are 50 solutions for the parameters to be optimized in the first generation population, and each solution contains 12 values.
[0156] In each iteration, the quantum rotation angle is determined using formula (9). When the quantum rotation angle changes, the output qubit encoding also changes, and the qubit encoding is then decoded, resulting in a solution for the parameters to be optimized. Therefore, in each iteration, the improved adaptive quantum genetic algorithm can be used to randomly generate the current generation population, and each generation population contains a solution for the parameters to be optimized of a preset size.
[0157] Once the current generation population is determined, the fitness function and constraints corresponding to trajectory optimization are determined. Under the constraints, the fitness function is used as the optimization objective. The solutions are substituted into the polynomial corresponding to the initial running trajectory to obtain the fitness function value corresponding to each solution.
[0158] In one implementation, determining the fitness function corresponding to trajectory optimization includes:
[0159] According to the formula Determine the fitness function; J is the fitness function value, k is the runtime index, T1 is the runtime of the first running trajectory, T2 is the runtime of the second running trajectory, and T3 is the runtime of the third running trajectory.
[0160] Furthermore, the constraints of this invention include:
[0161] Positional constraints: |θ1(t)|, |θ2(t)|, |θ3(t)| ≤ θ max ;θ max This represents the maximum position that the robotic arm can move to.
[0162] Velocity constraints: |θ1′(t)|、|θ2′(t)|、|θ3′(t)|≤θ′ max ;θ′ max This represents the maximum speed of the robotic arm;
[0163] Acceleration constraints: |θ1″(t)|, |θ2″(t)|, |θ3″(t)| ≤ θ″ max ;θ″ max This represents the maximum acceleration of the robotic arm.
[0164] The acceleration rate of change constraint is: |θ1(t)|, |θ2(t)|, |θ3(t)| ≤ θ″ max ;θ″ max This represents the maximum rate of change of acceleration of the robotic arm.
[0165] To ensure the stability of the robotic arm and reduce the impact on the joints during startup and shutdown, the starting point constraints and ending point constraints are as follows:
[0166] Starting constraints: position θ1(t0) = 0, velocity θ′1(t0) = 0, acceleration θ″1(t0) = 0, rate of change of acceleration 0;
[0167] Endpoint constraint: Position θ3(t) f ) = 0, velocity θ3′(t f =0, acceleration θ″3(t) f =0, the rate of change of acceleration θ″′3(t)f ) = 0.
[0168] In another implementation, if it is determined that the current iteration does not meet the iteration termination condition, the method further includes:
[0169] Determine the current quantum rotation angle and quantum rotation direction for each parameter to be optimized in the current generation population;
[0170] Based on the adaptive quantum genetic algorithm, the next quantum rotation angle is determined using the current quantum rotation angle;
[0171] Based on the next quantum rotation angle and the quantum rotation direction, rotation is performed to generate the next generation of the current generation; each generation contains multiple solutions.
[0172] In one implementation, the next quantum rotation angle is determined using the current quantum rotation angle based on an adaptive quantum genetic algorithm, including:
[0173] According to the formula Determine the next quantum rotation angle γ j+1 ; where γ j Let f be the current quantum rotation angle, g be the number of iterations, and f be the current quantum rotation angle. j f is the fitness function value corresponding to the j-th solution in the current population. best This represents the optimal fitness function value in the current population.
[0174] Through continuous iteration, the optimal solution for the parameters to be optimized can eventually be found.
[0175] S113, determine the coefficients of the fifth-degree polynomial, the sixth-degree polynomial, and the seventh-degree polynomial based on the optimal solution of the parameters to be optimized, and obtain the target running trajectory.
[0176] Once the optimal solution for the parameters to be optimized is determined, the coefficients of the fifth, sixth, and seventh polynomials can be determined by substituting them into the coefficient equations of the fifth, sixth, and seventh polynomials mentioned above.
[0177] Then, the coefficients of the fifth, sixth, and seventh polynomials are substituted into the corresponding polynomials to obtain the target trajectory.
[0178] This invention divides the initial trajectory into three segments based on the different requirements of the starting point, intermediate point, and ending point. The initial trajectory is planned using fifth-order polynomials, sixth-order polynomials, and seventh-order polynomials respectively, ensuring smooth velocity, acceleration, and rate of change of acceleration. To optimize the initial trajectory, an adaptive quantum genetic algorithm is used to determine the optimal solution. The adaptive quantum genetic algorithm is characterized by its high speed, wide search range, and strong adaptability, thus it can quickly and accurately find the optimal solution, planning the best path for the robotic arm and improving cargo loading and unloading efficiency.
[0179] Based on the same inventive concept as in the foregoing embodiments, this embodiment also provides a device for determining the trajectory of a robotic arm, such as... Figure 5 As shown, the device includes:
[0180] The first determining unit 51 determines the target angle that each joint needs to rotate when the end effector of the robotic arm reaches the end pose.
[0181] The second determining unit 52 uses the target angle that each joint needs to rotate as a known condition, and determines the initial running trajectory of the robotic arm using the starting point, the ending point, and the preset first intermediate point and second intermediate point; the initial running trajectory includes three segments: the first segment, the second segment, and the third segment; the first segment is a fifth-order polynomial, the second segment is a sixth-order polynomial, and the third segment is a seventh-order polynomial.
[0182] The optimization unit 53 is used to optimize the initial running trajectory of the robotic arm using an improved adaptive quantum genetic algorithm to obtain the optimal solution for the parameters to be optimized. The parameters to be optimized include: the length of the first trajectory segment, the length of the second trajectory segment, the length of the third trajectory segment, the running time of the first trajectory segment, the running time of the second trajectory segment, the running time of the third trajectory segment, the velocity of the first intermediate point, the velocity of the second intermediate point, the acceleration of the first intermediate point, the acceleration of the second intermediate point, the rate of change of acceleration of the first intermediate point, and the rate of change of acceleration of the second intermediate point.
[0183] The third determining unit 54 is used to determine the coefficients of the fifth-degree polynomial, the sixth-degree polynomial, and the seventh-degree polynomial based on the optimal solution of the parameters to be optimized, so as to obtain the target running trajectory.
[0184] Since the apparatus described in the embodiments of this invention is a device for determining the trajectory of a robotic arm in implementing the embodiments of this invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the methods described in the embodiments of this invention, and therefore will not be described in detail here. All apparatuses used in the methods of the embodiments of this invention fall within the scope of protection of this invention.
[0185] Based on the same inventive concept, this embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any step of the method described above.
[0186] Through one or more embodiments of the present invention, the present invention has the following beneficial effects or advantages:
[0187] This invention provides a method, apparatus, and device for determining the trajectory of a robotic arm. The method includes: determining the target angles that each joint needs to rotate when the end effector of the robotic arm reaches its end pose; using the target angles that each joint needs to rotate as known conditions, determining the initial trajectory of the robotic arm using a start point, an end point, and a preset first and second intermediate point; the initial trajectory includes three segments: a first segment, a second segment, and a third segment; the first segment is a fifth-order polynomial, the second segment is a sixth-order polynomial, and the third segment is a seventh-order polynomial; optimizing the initial trajectory of the robotic arm using an improved adaptive quantum genetic algorithm to obtain the optimal solution for the parameters to be optimized; the parameters to be optimized include: the length of the first segment, the length of the second segment, the length of the third segment, the runtime of the first segment, the runtime of the second segment, the runtime of the third segment, the speed of the first intermediate point, and the second... The velocity at the intermediate point, the velocity at the third intermediate point, the acceleration at the first intermediate point, the acceleration at the second intermediate point, the acceleration at the third intermediate point, the rate of change of acceleration at the first intermediate point, the rate of change of acceleration at the second intermediate point, and the rate of change of acceleration at the third intermediate point are calculated. Based on the optimal solution of the parameters to be optimized, the coefficients of the fifth-order polynomial, the sixth-order polynomial, and the seventh-order polynomial are determined to obtain the target trajectory. Thus, according to the different requirements of the starting point, intermediate points, and ending point, the initial trajectory is divided into three segments, and the initial trajectory is planned using the fifth-order polynomial, the sixth-order polynomial, and the seventh-order polynomial respectively, ensuring that the velocity, acceleration, and rate of change of acceleration are smooth. To optimize the initial trajectory, an adaptive quantum genetic algorithm is used to determine the optimal solution. The adaptive quantum genetic algorithm has the characteristics of high speed, wide search range, and strong adaptability, thus it can quickly and accurately find the optimal solution, plan the optimal path for the robotic arm, and improve the efficiency of cargo loading and unloading.
[0188] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0189] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0190] Similarly, it should be understood that, in order to simplify this disclosure and aid in understanding one or more of the various aspects of the invention, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.
[0191] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0192] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0193] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components of the gateway, proxy server, or system according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing some or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0194] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0195] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0196] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for determining the trajectory of a robotic arm, characterized in that, The method includes: Determine the target angle that each joint needs to rotate when the end effector of the robotic arm reaches the end pose; Using the target angles that each joint needs to rotate as known conditions, the initial running trajectory of the robotic arm is determined by the starting point, the ending point, and the preset first and second intermediate points; the initial running trajectory includes three segments: the first segment, the second segment, and the third segment; the first segment is a fifth-degree polynomial, the second segment is a sixth-degree polynomial, and the third segment is a seventh-degree polynomial. An improved adaptive quantum genetic algorithm is used to optimize the initial trajectory of the robotic arm to obtain the optimal solution for the parameters to be optimized. The parameters to be optimized include: the length of the first trajectory segment, the length of the second trajectory segment, the length of the third trajectory segment, the runtime of the first trajectory segment, the runtime of the second trajectory segment, the runtime of the third trajectory segment, the velocity of the first intermediate point, the velocity of the second intermediate point, the acceleration of the first intermediate point, the acceleration of the second intermediate point, the rate of change of acceleration of the first intermediate point, and the rate of change of acceleration of the second intermediate point. Based on the optimal solution of the parameters to be optimized, the coefficients of the fifth-degree polynomial, the sixth-degree polynomial, and the seventh-degree polynomial are determined to obtain the target trajectory; wherein, The optimization of the initial trajectory of the robotic arm using an improved adaptive quantum genetic algorithm to obtain the optimal solution for the parameters to be optimized includes: Obtain the initial population size, maximum number of iterations, quantum chromosome encoding length, and the type and value range of the parameters to be optimized; In the current iteration, based on the initial population size, the quantum chromosome encoding length, and the value range of the parameters to be optimized, the improved adaptive quantum genetic algorithm is used to randomly generate the current generation population, which is the solution of each set of the parameters to be optimized. Determine the fitness function and constraints corresponding to trajectory optimization. Under the constraints, with the fitness function as the optimization objective, substitute each set of solutions into the polynomial corresponding to the initial running trajectory to obtain the fitness function value corresponding to each set of solutions. If it is determined that the current iteration satisfies the iteration termination condition, the set of solutions corresponding to the minimum fitness function value is determined as the optimal solution for the parameters to be optimized; wherein, If it is determined that the current iteration does not meet the iteration termination condition, the method further includes: Determine the current quantum rotation angle and quantum rotation direction for each parameter to be optimized in the current generation population; Based on the adaptive quantum genetic algorithm, the next quantum rotation angle is determined using the current quantum rotation angle; Based on the next quantum rotation angle and the quantum rotation direction, rotation is performed to generate the next generation of the current generation; each generation contains multiple solutions. Based on the aforementioned adaptive quantum genetic algorithm, determining the next quantum rotation angle using the current quantum rotation angle includes: According to the formula Determine the next quantum rotation angle ; wherein, the For the current quantum rotation angle, the g The number of iterations already performed, the The first in the contemporary population j The fitness function value corresponding to the solution set, the This represents the optimal fitness function value in the current population.
2. The method as described in claim 1, characterized in that, The first segment of the trajectory is the trajectory connecting the starting point and the first intermediate point, and the first segment of the trajectory is represented as follows: ; The constraint equations satisfied by the quintic polynomial are: ; make Then we have: ; At this moment, the rate of change of acceleration at the first intermediate point is: ;in, The At the starting time, the For the first intermediate point time, the The fifth-degree polynomial corresponding to the first segment of the trajectory; T 1 represents the runtime of the first trajectory segment. for The first derivative, for The second derivative, for The third derivative, the The starting point is the location of the point. The velocity at the starting point, the The acceleration at the starting point, the The position of the first midpoint. The velocity at the first intermediate point, This is the acceleration at the first intermediate point.
3. The method as described in claim 1, characterized in that, The second segment of the trajectory is the trajectory connecting the first intermediate point and the second intermediate point. The second segment of the trajectory is represented as follows: ; The constraint equations satisfied by the sixth-degree polynomial are: ; make Then we have: ; At this point, the rate of change of acceleration at the second intermediate point is: ;in, The For the first intermediate point time, the For the second intermediate point time, the The sixth-degree polynomial corresponding to the second segment of the trajectory; T 2 represents the runtime of the second trajectory segment. for The first derivative, for The second derivative, for The third derivative, the The position of the first midpoint. The velocity at the first intermediate point, The acceleration at the first midpoint, The rate of change of acceleration at the first intermediate point, The velocity at the second intermediate point, The acceleration at the second intermediate point, is the rate of change of acceleration at the second intermediate point.
4. The method as described in claim 1, characterized in that, The third segment of the trajectory is the trajectory connecting the second intermediate point and the endpoint, and the third segment of the trajectory is represented as follows: The constraint equations satisfied by the seventh-degree polynomial are: make Then we have: ;in, The For the second intermediate point time, the For the endpoint time, the stated The seventh-degree polynomial corresponding to the third segment of the trajectory; T 3 represents the runtime of the third trajectory segment. The for The first derivative, for The second derivative, for The third derivative, the The position of the second midpoint. The velocity at the second intermediate point, The acceleration at the first midpoint, The rate of change of acceleration at the second intermediate point. The speed at the destination, The acceleration at the endpoint, The rate of change of acceleration is the endpoint.
5. The method as described in claim 1, characterized in that, The fitness function corresponding to the determined trajectory optimization includes: According to the formula Determine the fitness function; J For the fitness function value, the k The sequence number of the runtime, the T 1 represents the runtime of the first segment of the running trajectory. T 2 represents the runtime of the second segment of the trajectory. T 3 represents the runtime of the third segment of the trajectory.
6. A device for determining the trajectory of a robotic arm, characterized in that, The device includes: The first determining unit is used to determine the target angle that each joint needs to rotate when the end effector of the robotic arm reaches the end pose. The second determining unit uses the target angle that each joint needs to rotate as a known condition, and determines the initial running trajectory of the robotic arm using the starting point, the ending point, and the preset first and second intermediate points; the initial running trajectory includes three segments: the first segment, the second segment, and the third segment; the first segment is a fifth-order polynomial, the second segment is a sixth-order polynomial, and the third segment is a seventh-order polynomial. An optimization unit is used to optimize the initial running trajectory of the robotic arm using an improved adaptive quantum genetic algorithm to obtain the optimal solution for the parameters to be optimized. The parameters to be optimized include: the length of the first trajectory segment, the length of the second trajectory segment, the length of the third trajectory segment, the running time of the first trajectory segment, the running time of the second trajectory segment, the running time of the third trajectory segment, the velocity of the first intermediate point, the velocity of the second intermediate point, the acceleration of the first intermediate point, the acceleration of the second intermediate point, the rate of change of acceleration of the first intermediate point, and the rate of change of acceleration of the second intermediate point. The third determining unit is used to determine the coefficients of the fifth-degree polynomial, the sixth-degree polynomial, and the seventh-degree polynomial based on the optimal solution of the parameters to be optimized, thereby obtaining the target trajectory; wherein, The optimization of the initial trajectory of the robotic arm using an improved adaptive quantum genetic algorithm to obtain the optimal solution for the parameters to be optimized includes: Obtain the initial population size, maximum number of iterations, quantum chromosome encoding length, and the type and value range of the parameters to be optimized; In the current iteration, based on the initial population size, the quantum chromosome encoding length, and the value range of the parameters to be optimized, the improved adaptive quantum genetic algorithm is used to randomly generate the current generation population, which is the solution of each set of the parameters to be optimized. Determine the fitness function and constraints corresponding to trajectory optimization. Under the constraints, with the fitness function as the optimization objective, substitute each set of solutions into the polynomial corresponding to the initial running trajectory to obtain the fitness function value corresponding to each set of solutions. If it is determined that the current iteration satisfies the iteration termination condition, the set of solutions corresponding to the minimum fitness function value is determined as the optimal solution for the parameters to be optimized; wherein, If it is determined that the current iteration does not meet the iteration termination condition, the current quantum rotation angle and quantum rotation direction of each parameter to be optimized in the current generation population are determined. Based on the adaptive quantum genetic algorithm, the next quantum rotation angle is determined using the current quantum rotation angle; Based on the next quantum rotation angle and the quantum rotation direction, rotation is performed to generate the next generation of the current generation; each generation contains multiple solutions. Based on the aforementioned adaptive quantum genetic algorithm, determining the next quantum rotation angle using the current quantum rotation angle includes: According to the formula Determine the next quantum rotation angle ; wherein, the For the current quantum rotation angle, the g The number of iterations already performed, the The first in the contemporary population j The fitness function value corresponding to the solution set, the This represents the optimal fitness function value in the current population.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Local guiding trajectory planning method and device for tractor automatic driving system
CN109933057A
Improved multi-target particle swarm optimization-based complicated well track optimization method
CN110134006A