Mechanical arm control method, mechanical arm, robot, and storage medium

CN116117813BActive Publication Date: 2026-08-11CHONGQING UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-28
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]有鉴于此,本申请实施例的目的在于提供一种机械臂控制方法、机械臂、机器人及存储介质,能够改善因人工经验的方式对机械臂的运动进行规划而导致机械臂的工作效率与稳定性低的问题

Benefits of technology

[0064] The invention employing the above technical solution has the following advantages:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116117813B_ABST
    Figure CN116117813B_ABST
Patent Text Reader

Abstract

This application provides a robotic arm control method, a robotic arm, a robot, and a storage medium. The method includes: establishing a kinematic model of the robotic arm based on improved D-H parameters corresponding to a six-degree-of-freedom robotic arm; obtaining the joint angles corresponding to the critical path points in Cartesian space by inverse kinematics; interpolating and fitting the joint angles using a fifth-order polynomial to determine the parameters to be optimized during trajectory planning; determining the time parameters of each joint of the robotic arm during motion according to a preset custom strategy; optimizing the parameters to be optimized and the time parameters using a preset genetic algorithm; and controlling the corresponding joint movements of the robotic arm according to the optimized time and velocity parameters to move the robotic arm to the target pose. This helps to shorten the duration of robotic arm movement, improve the working efficiency of the robotic arm, and enhance the stability of the robotic arm's movement while reducing motion impact.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automation control technology, and more specifically, to a robotic arm control method, a robotic arm, a robot, and a storage medium. Background Technology

[0002] With the development of industrial production, robotic arms are being applied to increasingly diverse work scenarios, and correspondingly, the industry's requirements for the working capabilities of robotic arms are also becoming higher and higher. Trajectory planning and optimization are the foundation of robotic arm control and are key factors that directly affect the working quality of robotic arms. It involves planning a smooth and continuous time series of dependent variables such as displacement, velocity, acceleration, and impact of the robot's end effector along a given path, taking into account task requirements, robot performance, and boundary constraints.

[0003] Current industrial robotic arm trajectory planning processes mostly involve manually setting parameters such as joint angles and speeds of the robotic arm after a given trajectory has been established, and then planning using a teach pendant. This method, based on human experience, cannot achieve the shortest running time, and the final planned trajectory may contain impacts, affecting the working efficiency and stability of the robotic arm. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a robotic arm control method, a robotic arm, a robot, and a storage medium, which can improve the problem of low working efficiency and stability of the robotic arm caused by planning the movement of the robotic arm in a way that relies on human experience.

[0005] To achieve the above technical objectives, the technical solution adopted in this application is as follows:

[0006] In a first aspect, embodiments of this application provide a robotic arm control method, the method comprising:

[0007] Based on the improved DH parameters corresponding to the six-degree-of-freedom robotic arm, a kinematic model of the robotic arm is established.

[0008] Based on the kinematic model, the inverse kinematics is used to solve the critical path points of the robotic arm in Cartesian space to obtain the joint angles corresponding to the critical path points.

[0009] The joint angles are interpolated and fitted using a fifth-order polynomial to determine the parameters to be optimized for the robotic arm during trajectory planning.

[0010] Based on a preset custom strategy, the time parameters of each joint of the robotic arm during movement are determined;

[0011] The optimization parameters and time parameters are optimized according to a preset genetic algorithm until a preset iteration termination condition is met, and the optimized optimization parameters and time parameters are obtained as target parameters.

[0012] Based on the optimized time and speed parameters in the target parameters, a given path is planned, and the corresponding joint movements of the robotic arm are controlled to move the robotic arm to the target pose.

[0013] In conjunction with the first aspect, in some optional implementations, a kinematic model of the robotic arm is established based on the improved DH parameters corresponding to the six-degree-of-freedom robotic arm, including:

[0014] Based on the DH parameters corresponding to the robotic arm, a DH parameter model is established, and the positional relationship between adjacent levers in the robotic arm is converted into four parameters, namely the distance 'a' between the common normals. i Perpendicular to a i The angle α between the two axes in the plane i The relative position d of the two connecting rods i The angle θ between the two connecting rods and the common perpendicular line i And determine the homogeneous transformation matrix from joint i-1 to joint i in the robotic arm:

[0015]

[0016] Multiplying the homogeneous transformation matrices between adjacent joints in the robotic arm yields the homogeneous transformation matrix of the actuator at the end effector in the base coordinate system. This matrix serves as the kinematic model of the six-degree-of-freedom robotic arm, expressed as follows:

[0017] In conjunction with the first aspect, in some optional implementations, based on the kinematic model, the inverse kinematics is used to solve for the critical path points of the robotic arm in Cartesian space to obtain the joint angles corresponding to the critical path points, including:

[0018] Using a pre-defined Pieper algorithm, the joint variables of the robotic arm are extracted from the kinematic model, and the joint angles of the robotic arm in the target pose are determined. The formula for calculating the joint angles in the target pose is as follows:

[0019]

[0020]

[0021]

[0022] Based on the calculation formula of the joint angle under the target pose, the expressions of the joint angles θ1 to θ6 of the robotic arm are determined. The number of inverse kinematic solutions of the robotic arm is multiple sets, and the set of solutions with the smallest difference from the previous joint angle is selected as the joint angle corresponding to the critical path point.

[0023] In conjunction with the first aspect, in some optional implementations, a fifth-order polynomial is used to interpolate and fit the joint angles to determine the parameters to be optimized for the robotic arm during trajectory planning, including:

[0024] The joint angles of the robotic arm are described using a fifth-order polynomial, yielding the joint angle function s(t), angular velocity function v(t), and angular acceleration function a(t) under the interpolation of the fifth-order polynomial. The fifth-order polynomial is expressed as:

[0025] θ(t)=k0+k1t+k2t 2 +k3t 3 +k4t 4 +k5t 5

[0026] The expressions for the joint angle function s(t), the angular velocity function v(t), and the angular acceleration function a(t) are as follows:

[0027]

[0028] In the formula, k0, k1, k2, k3, k4, and k5 are the coefficients to be determined, and t refers to time.

[0029] Let θ be the joint angle of joint i in the robotic arm. i The joint angle of joint i+1 is denoted as θ. i+1 And determine the motion data corresponding to joint i and joint i+1, wherein the motion data includes the initial joint position, the initial joint velocity, and the initial joint angular acceleration, wherein the initial joint position is:

[0030]

[0031] The initial velocity of the joint is:

[0032]

[0033] The initial angular acceleration of the joint is:

[0034]

[0035] Based on the initial position of the joint, the initial velocity of the joint, and the initial angular acceleration of the joint, the following equations are obtained by solving them simultaneously:

[0036]

[0037] Based on the equations obtained from the simultaneous equations, and according to the preset optimization objective function and the first constraint condition, the parameters to be optimized by the robotic arm in the trajectory planning process are determined, wherein the optimization objective function and the first constraint condition are:

[0038]

[0039]

[0040] The parameter to be optimized is:

[0041]

[0042] Where n refers to the number of planned path points in the robotic arm; t n-1 The motion time of the (n-1)th segment of the trajectory; Let q be the velocity of joint j at the (n-2)th intermediate point, where j takes values ​​from 1 to 6. The intermediate point refers to any path point in the planned path, excluding the first and last path points. imax The maximum joint angle of finger joint i; v imax The maximum angular velocity of finger joint i; a imax The maximum angular acceleration of finger joint i.

[0043] In conjunction with the first aspect, in some optional implementations, the time parameters of each joint of the robotic arm during motion are determined according to a preset custom strategy, including:

[0044] When the robot arm reaches a path point on the given path, and both the angular velocity and angular acceleration of the joints are zero, for each of the six joints of the robot arm, the shortest time t for trajectory movement under maximum velocity and maximum acceleration constraints is calculated using the expressions for the angular velocity function v(t) and angular acceleration function a(t) fitted by the fifth-order polynomial interpolation. min_v and t min_a and take t min_v and t min_a The larger value in the range is taken as the shortest time for the corresponding joint trajectory movement, and is expressed as:

[0045] t n-1,min =max(t) min_a ,t min_v )

[0046] The time parameters of the robotic arm during the entire trajectory movement are determined based on the maximum value of the shortest time for each segment of the trajectory of the six joints.

[0047] In conjunction with the first aspect, in some optional implementations, the time parameters of the robotic arm during the entire trajectory movement are determined based on the maximum value of the shortest time for each segment of the trajectory of the six joints, including:

[0048] Based on the maximum value of the shortest time for each segment of the trajectory of the six joints, the shortest time T of the robotic arm in the entire trajectory movement is determined;

[0049] The shortest time T is expanded to a specified multiple to obtain the range of motion time values ​​for each trajectory segment, which is used as the time parameter and expressed as follows:

[0050]

[0051] Wherein, λ is the specified multiple, and the value of λ is greater than 1 and less than or equal to 2; J n-1 For the angle change of segment n-1; J sum This represents the overall change in angle.

[0052] In conjunction with the first aspect, in some optional implementations, the parameters to be optimized and the time parameters are optimized according to a preset genetic algorithm until a preset iteration termination condition is met, and the optimized parameters to be optimized and the time parameters are obtained as target parameters, including:

[0053] Obtain algorithm parameters and preset robotic arm parameters. The algorithm parameters include population size, iteration number, parent selection operator, initial crossover operator Cross0, and initial mutation operator Variation0. The members of the population are the parameters to be optimized and the time parameters.

[0054] The population individuals are initialized based on real number encoding, where individuals that do not satisfy the second constraint are replaced by new individuals;

[0055] The elite selection strategy sorts the individuals in the encoded population by fitness value, and selects individuals that meet preset conditions from the population according to the selection operator Parent to form the parent population for inheritance. Among them, the individual with the lowest fitness value in each generation is directly inherited.

[0056] Crossover and mutation are performed on the parent population to generate new individuals, thus forming a new population; let X and Y be the individuals undergoing crossover, Z be the individuals undergoing mutation, and C be the individual undergoing mutation. p For the crossover operator, V p If the variable is a variable factor, then the new individual inherited is:

[0057]

[0058] Where p refers to the number of iterations, and C p Vp for:

[0059]

[0060] Determine whether the maximum number of iterations has been reached or whether the variance of the elite fitness in the specified generation is less than a set value. If the maximum number of iterations has been reached or the variance of the elite fitness in the specified generation is less than the set value, then the optimization terminates and the target parameters are obtained.

[0061] Secondly, embodiments of this application also provide a robotic arm, which includes joints with six degrees of freedom, and a processor and a memory coupled to each other. The memory stores a computer program, and when the computer program is executed by the processor, the robotic arm performs the above-described method.

[0062] Thirdly, embodiments of this application also provide a robot, including a robot body and the aforementioned robotic arm, wherein the robotic arm is disposed on the robot body.

[0063] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the methods described above.

[0064] The invention employing the above technical solution has the following advantages:

[0065] In the technical solution provided in this application, during the trajectory planning process of the robotic arm, a fifth-order polynomial is used to interpolate and fit the joint angles to determine the parameters to be optimized during the trajectory planning process. Then, according to a preset custom strategy, the time parameters of each joint of the robotic arm during movement are determined. A preset genetic algorithm is then used to optimize the parameters to be optimized and the time parameters until a preset iteration termination condition is met, resulting in optimized parameters to be optimized and time parameters used as target parameters. Finally, based on the optimized time and velocity parameters in the target parameters, a given path is planned, and the corresponding joint movements of the robotic arm are controlled to move the robotic arm to the target pose. This approach helps to shorten the duration of the robotic arm's movement, improve its working efficiency, enhance the stability of its movement, reduce impact, and mitigate the impact problems inherent in trajectories planned using human experience. Attached Figure Description

[0066] This application can be further illustrated by the non-limiting embodiments given in the accompanying drawings. It should be understood that the following drawings only illustrate some embodiments of this application and should not be considered as limiting the scope. For those skilled in the art, other related drawings can be obtained from these drawings without any inventive effort.

[0067] Figure 1 This is a flowchart illustrating the robotic arm control method provided in an embodiment of this application. Detailed Implementation

[0068] The present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that similar or identical parts are referred to by the same reference numerals in the drawings or description. Implementations not shown or described in the drawings are forms known to those skilled in the art. In the description of this application, terms such as "first" and "second" are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0069] This application provides a robotic arm. The robotic arm includes joints with six degrees of freedom, a processing module, and a storage module. The storage module stores a computer program, which, when executed by the processing module, enables the robotic arm to perform corresponding steps in the robotic arm control method described below.

[0070] In this embodiment, the robotic arm is a six-axis robotic arm with six degrees of freedom. Each joint of the robotic arm can be equipped with a motor, and the motion control of the six degrees of freedom of the robotic arm is achieved by controlling each motor.

[0071] This application also provides a robot, which may include a robot body and the aforementioned robotic arms. One or more robotic arms may be mounted on the robot body, and each robotic arm can be independently controlled.

[0072] Please refer to Figure 1 This application also provides a robotic arm control method that can be applied to the aforementioned robotic arm or robot.

[0073] The robotic arm control method may include the following steps:

[0074] Step 110: Based on the improved DH parameters corresponding to the six-degree-of-freedom robotic arm, establish the kinematic model of the robotic arm;

[0075] Step 120: Based on the kinematic model, the inverse kinematics is used to solve the critical path points of the robotic arm in Cartesian space to obtain the joint angles corresponding to the critical path points.

[0076] Step 130: The joint angles are interpolated and fitted using a fifth-order polynomial to determine the parameters to be optimized for the robotic arm during the trajectory planning process.

[0077] Step 140: Determine the time parameters of each joint of the robotic arm during movement according to a preset custom strategy;

[0078] Step 150: Optimize the parameters to be optimized and the time parameters according to the preset genetic algorithm until the preset iteration termination condition is met, and obtain the optimized parameters to be optimized and the time parameters as the target parameters.

[0079] Step 160: Based on the optimized time and speed parameters in the target parameters, plan the given path and control the corresponding joint movements of the robotic arm to move the robotic arm to the target pose.

[0080] The steps of the robotic arm control method will be explained in detail below:

[0081] In step 110, the improved DH parameters for the robotic arm are obtained in a conventional manner, which will not be described in detail here. For example, the improved DH parameters for a six-axis robotic arm can be shown in Table 1 below.

[0082] Table 1:

[0083]

[0084] In this embodiment, step 110 may include:

[0085] Based on the DH parameters corresponding to the robotic arm, a DH parameter model is established, and the positional relationship between adjacent levers in the robotic arm is converted into four parameters, namely the distance 'a' between the common normals. i Perpendicular to a i The angle α between the two axes in the plane i The relative position d of the two connecting rods i The angle θ between the two connecting rods and the common perpendicular line i And determine the homogeneous transformation matrix from joint i-1 to joint i in the robotic arm, where i takes integer values ​​from 1 to 6. The homogeneous transformation matrix is:

[0086]

[0087] Multiplying the homogeneous transformation matrices between adjacent joints in the robotic arm yields the homogeneous transformation matrix of the actuator at the end effector in the base coordinate system. This matrix serves as the kinematic model of the six-degree-of-freedom robotic arm, expressed as follows:

[0088]

[0089] Understandably, the kinematic model of the robotic arm is the kinematic equation, which can be described by the above formula (2). The actuator at the end of the robotic arm can be understood as the part at the end of the robotic arm used to grasp objects.

[0090] Step 120 may include:

[0091] Using a pre-defined Pieper algorithm, the joint variables of the robotic arm are extracted from the kinematic model, and the joint angles of the robotic arm in the target pose are determined. The formula for calculating the joint angles in the target pose is as follows:

[0092]

[0093] According to the calculation formula (3) for the joint angles under the target pose, the expressions for the joint angles θ1 to θ6 of the robotic arm are determined. The number of inverse kinematic solutions of the robotic arm is multiple sets, and the set of solutions with the smallest difference from the previous joint angle is selected as the joint angle corresponding to the critical path point.

[0094] Understandably, using Pieper's method, joint variables can be extracted from the kinematic equations, thereby solving for the joint angles in the target pose. In other words, the inverse kinematics of the critical path points of the robotic arm in Cartesian space can be obtained. The target pose can be understood as the posture of the robotic arm when its end effector is in the desired specified spatial position. The target pose can be flexibly determined according to the actual situation, and will not be elaborated further here. Critical path points can be understood as points on the trajectory formed by the robotic arm's nodes or other reference points (such as the center point of a link) during its movement, and can be flexibly determined according to the actual situation.

[0095] In this embodiment, by utilizing the principle that the values ​​of the corresponding elements in the left and right matrices of the three equations in formula (3) are equal, the expressions for the joint angles θ1 to θ6 of the six-axis robotic arm can be solved. Since there are 8 sets of inverse kinematic solutions for the six-axis robotic arm, the solution with the smallest difference from the previous joint angle can be selected as the final solution, which can be used as the joint angle corresponding to the critical path point. This helps to reduce errors.

[0096] In this embodiment, step 130 may include:

[0097] The joint angles of the robotic arm are described using a fifth-order polynomial, yielding the joint angle function s(t), angular velocity function v(t), and angular acceleration function a(t) under the interpolation of the fifth-order polynomial. The fifth-order polynomial is expressed as:

[0098] θ(t)=k0+k1t+k2t 2 +k3t 3 +k4t 4 +k5t5 (4)

[0099] The expressions for the joint angle function s(t), the angular velocity function v(t), and the angular acceleration function a(t) are as follows:

[0100]

[0101] In the formula, k0, k1, k2, k3, k4, and k5 are the coefficients to be determined, and t refers to the time of movement of the robotic arm joints;

[0102] Let θ be the joint angle of joint i in the robotic arm. i The joint angle of joint i+1 is denoted as θ. i+1 And determine the motion data corresponding to joint i and joint i+1, wherein the motion data includes the initial joint position, the initial joint velocity, and the initial joint angular acceleration, wherein the initial joint position is:

[0103]

[0104] The initial velocity of the joint is:

[0105]

[0106] The initial angular acceleration of the joint is:

[0107]

[0108] Based on the initial position of the joint, the initial velocity of the joint, and the initial angular acceleration of the joint, the following equations are obtained by solving them simultaneously:

[0109]

[0110] Based on the equations obtained from the simultaneous equations, and according to the preset optimization objective function and the first constraint condition, the parameters to be optimized by the robotic arm in the trajectory planning process are determined, wherein the optimization objective function is:

[0111]

[0112] The first constraint is:

[0113]

[0114] The parameter to be optimized is:

[0115]

[0116] Where n refers to the number of planned path points in the robotic arm, and these planned path points can be used as critical path points; t n-1The motion time of the (n-1)th segment of the trajectory; Let be the velocity of joint j at the (n-2)th intermediate point, where j takes values ​​from 1 to 6. The intermediate point refers to any path point in the planned path, excluding the first and last path points. There are a total of 7n-13 parameters to be optimized. imax The maximum joint angle of finger joint i; v imax The maximum angular velocity of finger joint i; a imax The maximum angular acceleration of finger joint i.

[0117] Step 140 may include:

[0118] Assuming that the angular velocity and angular acceleration of the robotic arm's joints are both zero at the moment of reaching a path point on the given path, for each of the six joints of the robotic arm, the shortest time t for trajectory motion under maximum velocity and maximum acceleration constraints is calculated using the expressions for the angular velocity function v(t) and angular acceleration function a(t) fitted by the fifth-order polynomial interpolation. min_v and t min_a and take t min_v and t min_a The larger value in the range is taken as the shortest time for the corresponding joint trajectory movement, and is expressed as:

[0119] t n-1,min =max(t) min_a ,t min_v (12)

[0120] The time parameters of the robotic arm during the entire trajectory movement are determined based on the maximum value of the shortest time for each segment of the trajectory of the six joints.

[0121] Specifically, the time parameters of the robotic arm during the entire trajectory movement are determined based on the maximum value of the shortest time for each segment of the trajectory of the six joints, including:

[0122] Based on the maximum value of the shortest time for each segment of the trajectory of the six joints, the shortest time T of the robotic arm in the entire trajectory movement is determined;

[0123] The shortest time T is expanded to a specified multiple to obtain the range of motion time values ​​for each trajectory segment, which is used as the time parameter and expressed as follows:

[0124]

[0125] Wherein, λ is the specified multiple, and the value of λ is greater than 1 and less than or equal to 2; J n-1 For the angle change of segment n-1; J sum This represents the overall change in angle.

[0126] For example, to prevent the algorithm optimization from failing due to an excessively short time setting, the shortest calculated time T can be increased by a factor of 1.5, meaning the value of λ is 1.5. Therefore, the range of values ​​for the motion time of each trajectory segment is:

[0127]

[0128] Step 150 may include:

[0129] Obtain algorithm parameters and preset robotic arm parameters. The algorithm parameters include population size, iteration number, parent selection operator, initial crossover operator Cross0, and initial mutation operator Variation0. The members of the population are the parameters to be optimized and the time parameters. The robotic arm parameters refer to the corresponding parameters when the robotic arm leaves the factory, which can be determined according to the actual situation.

[0130] The population individuals are initialized based on real number encoding, where individuals that do not satisfy the second constraint are replaced by new individuals;

[0131] The elite selection strategy sorts the individuals in the encoded population by fitness value, and selects individuals that meet preset conditions from the population according to the selection operator Parent to form the parent population for inheritance. Among them, the individual with the lowest fitness value in each generation is directly inherited.

[0132] Crossover and mutation are performed on the parent population to generate new individuals, thus forming a new population; let X and Y be the individuals undergoing crossover, Z be the individuals undergoing mutation, and C be the individual undergoing mutation. p For the crossover operator, V p If the variable is a variable factor, then the new individual inherited is:

[0133]

[0134] Where p refers to the number of iterations, and C p V p for:

[0135]

[0136] Determine whether the maximum number of iterations has been reached or whether the variance of the elite fitness in the specified generation is less than a set value. If the maximum number of iterations has been reached or the variance of the elite fitness in the specified generation is less than the set value, then the optimization terminates and the target parameters are obtained.

[0137] In this embodiment, the second constraint can be understood as follows: the optimized angular acceleration of the corresponding joint on the robotic arm cannot exceed the maximum permissible angular acceleration. If the optimized angular acceleration exceeds the maximum angular acceleration, it is considered that the second constraint is not satisfied.

[0138] Understandably, if the initial individual or the mutated individual does not satisfy the second constraint, a new individual that satisfies the second constraint can be randomly generated to replace the individual that does not satisfy the second constraint.

[0139] In this embodiment, the method of selecting individuals that meet the preset conditions to form the parent population for heredity can be as follows: select a specified number of individuals with high fitness values ​​from the population, and the individuals with the lowest fitness values ​​in each generation to form the parent population for heredity. The specified number can be flexibly determined according to the actual situation.

[0140] The iteration termination condition is as follows: determine whether the maximum number of iterations has been reached or whether the variance of elite fitness in a specified generation is less than a set value. If the maximum number of iterations has been reached or the variance of elite fitness in a specified generation is less than the set value, then the optimization terminates; if the maximum number of iterations has not been reached and the variance of elite fitness in a specified generation is less than the set value, then the optimization continues. The specific values ​​of the specified generation and the set value can be flexibly determined according to the actual situation. For example, the specified generation can be 5 generations.

[0141] For example, based on the DH parameter table in Table 2, assume the coordinates (in mm) of the path point (i.e., the given path or critical path point) at the end of the robotic arm are:

[0142] A(390, 0, -299)

[0143] B(-108, 188, -16)

[0144] C(-103, -123, -46)

[0145] The joint angles (in rad) corresponding to each path point are obtained through inverse kinematics:

[0146] A'(-0.3556,-1.6919,-2.4463,-2.3252,1.5707,1.9263)

[0147] B'(-1.8816,0.3226,-1.7302,-0.4821,-1.5707,0.3108)

[0148] C'(0.6214,0.7147,-1.4891,0.7964,-1.5708,-2.1922)

[0149] A fifth-order polynomial is used to interpolate and fit the joint angles, abstracting a mathematical description of the objective optimization problem. Since there are 3 planned path points, there are a total of 8 parameters to be optimized, namely:

[0150]

[0151] The sum of the motion trajectories of the six joints in the first segment is 10.8566 rad; the sum of the motion trajectories of the six joints in the second segment is 6.9178 rad. The time parameter (unit: s) for each segment is as follows:

[0152] t1∈(0,4.5257],t2∈(0,2.9063]

[0153] Obtain the algorithm parameters and preset robotic arm parameters, such as setting the population size (Population) to 50, the number of iterations (Generation) to 1000, the selection operator (Parent) to 30, the initial crossover operator (Cross0) to 0.5, and the initial mutation operator (Variation0) to 0.2. Sort the individuals in the population by fitness value. Based on the selection operator (Parent), select individuals that meet the requirements from the population to form a heritable parent population. The individual with the lowest fitness value in each generation is directly inherited. Then, perform crossover and mutation on the parent population to generate new individuals, forming a new population. Determine if the maximum number of iterations has been reached or if the variance of the elite fitness of the last 5 generations is less than a set value. If so, the optimization terminates, and the optimized target parameters are obtained.

[0154] Finally, the optimized time and velocity parameters from the target parameters are used to plan the given path to complete the six-degree-of-freedom robotic arm motion. The given path includes multiple pre-planned path points and can be flexibly set according to actual conditions.

[0155] Based on the above design, by applying a genetic algorithm to optimize the robot arm's trajectory, and improving the selection and crossover mutation factors according to the robot's joint constraints, the optimal running time can be obtained by optimizing the adjustment time interval and speed, thus improving the robot's work efficiency. Furthermore, interpolation fitting based on a fifth-order polynomial helps reduce unnecessary impacts on the robot arm during movement, protecting it. This avoids the impacts that can easily occur with manually planned trajectories, shortening the robot arm's lifespan and increasing maintenance costs.

[0156] In this embodiment, the processing module can be an integrated circuit chip with signal processing capabilities. The processing module can be a general-purpose processor. For example, the processor can be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0157] The storage module can be, but is not limited to, random access memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, etc. In this embodiment, the storage module can be used to store improved DH parameters, preset custom strategies, preset genetic algorithms, given paths, etc. Of course, the storage module can also be used to store programs, which the processing module executes after receiving execution instructions.

[0158] It should be noted that, for the sake of convenience and brevity, the specific working process of the robotic arm described above can be referred to the corresponding steps in the aforementioned method, and will not be elaborated further here.

[0159] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to execute the robotic arm control method described in the above embodiments.

[0160] Based on the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, robotic arm, or network device, etc.) to execute the methods described in various implementation scenarios of this application.

[0161] In summary, this application provides a robotic arm control method, a robotic arm, a robot, and a storage medium. In this solution, a fifth-order polynomial is used to interpolate and fit the joint angles to determine the parameters to be optimized during the trajectory planning process of the robotic arm. Then, according to a preset custom strategy, the time parameters of each joint of the robotic arm during motion are determined. A preset genetic algorithm is used to optimize the parameters to be optimized and the time parameters until a preset iteration termination condition is met, resulting in optimized parameters to be optimized and time parameters as target parameters. Finally, based on the optimized time and velocity parameters in the target parameters, a given path is planned, and the corresponding joint movements of the robotic arm are controlled to move the robotic arm to the target pose. This helps to shorten the duration of the robotic arm's movement, improve its working efficiency, enhance the stability of its movement, reduce motion impact, and mitigate the impact problem that trajectories planned using human experience are prone to.

[0162] In the embodiments provided in this application, it should be understood that the disclosed apparatus, systems, and methods can also be implemented in other ways. The apparatus, systems, and methods embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which includes one or more executable instructions for implementing a specified logical function. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0163] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A robotic arm control method, characterized in that, The method includes: Based on the improved DH parameters corresponding to the six-degree-of-freedom robotic arm, a kinematic model of the robotic arm is established. Based on the kinematic model, the inverse kinematics is used to solve the critical path points of the robotic arm in Cartesian space to obtain the joint angles corresponding to the critical path points. The joint angles are interpolated and fitted using a fifth-order polynomial to determine the parameters to be optimized for the robotic arm during trajectory planning. Based on a preset custom strategy, the time parameters of each joint of the robotic arm during movement are determined; The optimization parameters and time parameters are optimized according to a preset genetic algorithm until a preset iteration termination condition is met, and the optimized optimization parameters and time parameters are obtained as target parameters. Based on the optimized time and speed parameters in the target parameters, a given path is planned, and the corresponding joint movements of the robotic arm are controlled to move the robotic arm to the target pose. Based on a preset custom strategy, the time parameters of each joint of the robotic arm during motion are determined, including: When the robot arm reaches a path point on the given path, and both the angular velocity and angular acceleration of its joints are zero, the angular velocity function fitted by the fifth-order polynomial interpolation is used for each of the six joints of the robot arm. and angular acceleration function The expressions calculate the shortest time for the trajectory motion of each joint under the maximum velocity constraint and the maximum acceleration constraint, respectively. and and take and The larger value in the range is taken as the shortest time for the corresponding joint trajectory movement, and is expressed as: ; Based on the maximum value of the shortest time for each segment of the trajectory of the six joints, the time parameters of the robotic arm during the entire trajectory movement are determined, including: Based on the maximum value of the shortest time for each segment of the trajectory of the six joints, the shortest time T of the robotic arm in the entire trajectory movement is determined; The shortest time T is expanded to a specified multiple to obtain the range of motion time values ​​for each trajectory segment, which is used as the time parameter and expressed as follows: ; in, For the specified multiple, The value of is greater than 1 and less than or equal to 2; for The angle of the segment changes; This represents the overall change in angle.

2. The method according to claim 1, characterized in that, Based on the improved DH parameters corresponding to the six-degree-of-freedom robotic arm, a kinematic model of the robotic arm is established, including: Based on the DH parameters corresponding to the robotic arm, a DH parameter model is established, and the positional relationship between adjacent levers in the robotic arm is converted into four parameters, namely the distance between common normals. Perpendicular to The angle between the two axes in the plane The relative position of the two connecting rods The angle between the two connecting rods and the common perpendicular. And determine the joints in the robotic arm. To the joint Homogeneous transformation matrix: ; Multiplying the homogeneous transformation matrices between adjacent joints in the robotic arm yields the homogeneous transformation matrix of the actuator at the end effector in the base coordinate system. This matrix serves as the kinematic model of the six-degree-of-freedom robotic arm, expressed as follows: .

3. The method according to claim 2, characterized in that, Based on the kinematic model, the inverse kinematics is used to solve for the critical path points of the robotic arm in Cartesian space, yielding the joint angles corresponding to the critical path points, including: Using a pre-defined Pieper algorithm, the joint variables of the robotic arm are extracted from the kinematic model, and the joint angles of the robotic arm in the target pose are determined. The formula for calculating the joint angles in the target pose is as follows: ; The joint angles of the robotic arm are determined according to the formula for calculating joint angles under the target pose. to The expression is given by the expression, where the number of inverse kinematic solutions of the robotic arm is multiple sets, and the set of solutions with the smallest difference from the previous joint angle is selected as the joint angle corresponding to the critical path point.

4. The method according to claim 1, characterized in that, A fifth-order polynomial is used to interpolate and fit the joint angles to determine the parameters to be optimized for the robotic arm during trajectory planning, including: The joint angles of the robotic arm are described using a fifth-order polynomial, yielding the joint angle function under the interpolation of the fifth-order polynomial. Angular velocity function and angular acceleration function The fifth-degree polynomial is expressed as: ; The joint angle function The angular velocity function and the angular acceleration function The expression is: ; In the formula, , , , , , Here, t represents the coefficient value to be determined; The joints in the robotic arm The joint angle is denoted as ,joint The joint angle is denoted as and determine the joint and the joint The corresponding motion data includes the initial joint position, initial joint velocity, and initial joint angular acceleration, wherein the initial joint position is: ; The initial velocity of the joint is: ; The initial angular acceleration of the joint is: ; Based on the initial position of the joint, the initial velocity of the joint, and the initial angular acceleration of the joint, the following equations are obtained by solving them simultaneously: ; Based on the equations obtained from the simultaneous equations, and according to the preset optimization objective function and the first constraint condition, the parameters to be optimized by the robotic arm in the trajectory planning process are determined, wherein the optimization objective function and the first constraint condition are: ; The parameter to be optimized is: ; Where n refers to the number of planned path points in the robotic arm; For the first Time of motion of the segment trajectory; For joints In the The speed of each intermediate point, j takes values ​​from 1 to 6 in sequence, where intermediate points refer to path points in the planned path points excluding the first and last path points; The maximum joint angle of finger joint i; The maximum angular velocity of finger joint i; The maximum angular acceleration of finger joint i.

5. The method according to claim 1, characterized in that, The optimization parameters and time parameters are optimized according to a preset genetic algorithm until a preset iteration termination condition is met, and the optimized optimization parameters and time parameters are obtained as target parameters, including: Obtain algorithm parameters and preset robotic arm parameters. The algorithm parameters include population size, iteration number, parent selection operator, initial crossover operator Cross0, and initial mutation operator Variation0. The members of the population are the parameters to be optimized and the time parameters. The population individuals are initialized based on real number encoding, where individuals that do not satisfy the second constraint are replaced by new individuals; The elite selection strategy sorts the individuals in the encoded population by fitness value, and selects individuals that meet preset conditions from the population according to the selection operator Parent to form the parent population for inheritance. Among them, the individual with the lowest fitness value in each generation is directly inherited. Crossover and mutation are performed on the parent population to generate new individuals, thus forming a new population; let X and Y be the individuals undergoing crossover, and Z be the individuals undergoing mutation. For the crossover operator, If the variable is a variable factor, then the new individual inherited is: ; Where p refers to the number of iterations. for: ; Determine whether the maximum number of iterations has been reached or whether the variance of the elite fitness in the specified generation is less than a set value. If the maximum number of iterations has been reached or the variance of the elite fitness in the specified generation is less than the set value, then the optimization terminates and the target parameters are obtained.

6. A robotic arm, characterized in that, The robotic arm includes joints with six degrees of freedom, and a processor and a memory coupled to each other. The memory stores a computer program that, when executed by the processor, causes the robotic arm to perform the method as described in any one of claims 1-5.

7. A robot, characterized in that, It includes a robot body and a robotic arm as described in claim 6, wherein the robotic arm is mounted on the robot body.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Industrial robot trajectory optimization method based on improved genetic algorithm

    CN112692826A