Inverse kinematics method of mobile loading robot based on multi-population grey wolf algorithm
The inverse kinematics solution is improved through a variety of pack gray wolf algorithms, which solves the multiple solution and local optimal problems in the inverse kinematics solution of the robotic arm, improves the solution accuracy and efficiency, and achieves more efficient robotic arm kinematics modeling.
Patent Information
- Application Number
- CN202210489631.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-07
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-05-07
AI Technical Summary
There are multiple solutions to the inverse kinematics solution of the manipulator. In particular, the GWO algorithm has limitations in solution accuracy and convergence speed, and it is easy to fall into local optimality.
A multi-pack gray wolf algorithm is used to improve the inverse kinematics solution process. By constructing a fitness function and initializing population individuals, the hierarchy and hunting behavior of the wolves are used to update the position, avoid local optimality, and improve the convergence speed and efficiency of the iterative process.
It improves the efficiency and accuracy of solving the inverse kinematics of the robotic arm, avoids the problem of falling into local optimality, and improves the accuracy of the kinematic modeling of the robotic arm.
Smart Images

Figure CN115256369B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of kinematics of mobile loading mechanical arms. Background Art
[0002] Robot kinematics is an important part of robot research, and the inverse kinematics solution is the basis for subsequent trajectory planning and control research. There are multiple solutions to the inverse kinematics of the robot arm, and there are also many ways to solve it. The versatility, robustness, and efficiency of the solution are all criteria for judging whether it is excellent.
[0003] Compared with forward kinematics, the study of inverse kinematics of manipulators, that is, calculating a series of joint angles that can meet the expectations when the desired position of the end effector is known, is more difficult. Solving this equation is a nonlinear problem, so there is no universal solution algorithm.
[0004] There are usually two types of methods for solving inverse kinematics: analytical method and numerical method. Among them, the analytical method can be divided into algebraic method and geometric method. After completing the kinematic modeling of the target robot and obtaining the analytical expression, the solution is completed through geometric analysis, trigonometric transformation, etc. However, the analytical method can only be used for robotic arms that meet the Pieper criterion and lacks versatility.
[0005] With the development of intelligent optimization algorithms, various algorithms have also been applied to the inverse kinematics of manipulators, proposing new solutions for solving inverse kinematics problems. Group intelligence algorithms such as particle swarm optimization, sparrow search algorithm, fruit fly optimization algorithm, and their improved algorithms are applied to inverse kinematics problems. The GWO algorithm has the characteristics of simple structure, few parameters to adjust, and easy implementation. It has good performance in both solution accuracy and convergence speed in specific problems. But at the same time, the GWO algorithm has poor population diversity and is prone to falling into local optimality. Summary of the invention
[0006] The purpose of the present invention is to improve the algorithm for solving the inverse kinematics of a manipulator based on a multi-group grey wolf algorithm to improve the inverse kinematics solution process of a mobile loading manipulator based on the GWO algorithm.
[0007] The steps of the present invention are:
[0008] S1. Coordinate establishment and parameter definition:
[0009] Step 1.1: The structure of the mobile loading robot is as follows:
[0010] The base has one degree of freedom for rotation around the z-axis, two degrees of freedom for rotation joints 2 and 3, three-section telescopic arms with degrees of freedom 4, 5 and 6, one degree of freedom for wrist joints 7, and one degree of freedom for adjusting the end posture 8;
[0011] Step 1.2: Specify z i Axis is the axis direction of connecting rod i, x i The axis is perpendicular to z i In the direction of the y axis, i The axis is x i oz i The normal direction of the plane satisfies the right-hand rule; the reference coordinate system is defined as the coordinate system {0}, which is fixed on the base of the mobile loading robot. When the first joint variable value (θ1) is 0, the coordinate system {0} coincides with the coordinate system {1}, and the z0 axis coincides with the axis of the connecting rod 1. The coordinate system at each joint is gradually established according to the right-hand rule;
[0012] Step 1.3: Define variables:
[0013] l1 and l2 are the lengths of connecting rods 1 and 2; l3 is the length of the telescopic rod base arm; l4 is the length of the sling; d i is the extension length of the telescopic rod, where i = 4, 5, 6, D4 is the total extension of the telescopic rod, where D4 = d4 + d5 + d6; θ j is the rotation angle of joint j, where j = 1, 2, 3, 7, 8, c1 = cosθ1, s1 = sinθ1, s 23 = sin(θ2+θ3), c 23 =cos(θ2+θ3),s 237 = sin(θ2+θ3+θ7), c 237 =cos(θ2+θ3+θ7); i-1 T i is the homogeneous transformation matrix of the i-th joint coordinate system relative to the i-1-th coordinate system;
[0014] in,
[0015] S2. Construct the forward kinematics model of the mobile loading robot:
[0016] Step 2.1: The pose transformation matrix is as follows: Counterclockwise is positive
[0017]
[0018]
[0019]
[0020]
[0021] Step 2.2: According to each transformation matrix, the forward kinematic simplified model of the mobile loading robot is obtained:
[0022]
[0023]
[0024] Among them, T is the transformation matrix of the coordinate system of the end of the mobile loading robot arm relative to the base coordinates, R is the posture matrix of the end of the mobile loading robot arm, and P is the position vector of the end of the mobile loading robot arm;
[0025] S3, mobile loading robot with sling. From its mechanism motion mode, it can be known that its end position is determined by θ1, θ2, θ3, D4, and the end posture is determined by θ7, θ8. To control the posture of the sling grabbing the object, let β = 0°, where β = θ1 + θ8; the telescopic length d i , where i=4,5,6 adopts synchronous expansion and contraction
[0026] Therefore,
[0027] sin(θ2+θ3+θ7)=sin180°=0,
[0028] cos(θ2+θ3+θ7)=cos180°=-1,
[0029] θ1=-θ8, where “-” means that θ1 and θ8 rotate in opposite directions;
[0030] Convert 8 degrees of freedom to 4 degrees of freedom. At this time, the position vector and attitude transformation matrix of the end effector are:
[0031]
[0032]
[0033] According to formula (1.3), the base swivel joint 1 and the connecting rod 2, connecting rod 3 and telescopic connecting rod are not in the same motion plane. The base swivel joint moves in the xoy plane to control the spatial orientation of the transfer packaging box; the connecting rod 2, connecting rod 3 and telescopic rod move in the zox plane. The spatial orientation of the mobile loading robot during the movement is uniquely determined by the two-variable tangent function, and its inverse solution is θ1=atan2(p x ,p y );
[0034] According to the kinematic equations obtained by simplifying the model, the following set of equations can be obtained:
[0035]
[0036] S4. Construct fitness function and specify constraints:
[0037] Assume that the desired position of the end of the mobile loading robot arm is T * for:
[0038]
[0039] Substituting the candidate inverse solution into the forward kinematics equation (1.1) can obtain the actual end position T. If T * =T, then the candidate inverse solution is the solution of inverse kinematics;
[0040] Design a fitness function to judge the quality of each solution after each iteration. The smaller the function value, the closer the inverse kinematics solution is to the desired posture solution.
[0041]
[0042] Where μ is the adjustment factor between the two errors of position and attitude;
[0043] Convert the homogeneous matrix T into Euler angles, denoted as σ, τ, simplify the optimization objective function:
[0044]
[0045] In the formula, represents the attitude error, represents the position error, μ is the adjustment factor between the position and attitude errors;
[0046] S5. Design a multi-group grey wolf algorithm to solve the inverse kinematics:
[0047] There are four levels in the wolf pack, from high to low, they are α, β, δ, ω. The common wolf individual ω determines its movement position according to the three alpha wolves α, β, δ. Since there are eight unknown parameters θ1, θ2, θ3, d4, d5, d6, θ7, θ8 in the system, and the joints are coupled with each other, the specific process is as follows:
[0048] Step 5.1: According to the model simplification in step 3, the system is converted from an 8-DOF problem to a 4-DOF problem θ1, θ2, θ3, D4;
[0049] Step 5.2: Initialize the population individuals X = {x1, x2, ..., x n}, where x i ={θ1,θ2,θ3,D4},i=1,2,…n, and set the initialization parameters. Then, split X into N populations: X1,X2,…X N ; Step 5.3: Calculate the fitness values of all individuals in each population according to the fitness function, and evaluate three alpha, beta, and delta alphas for each population;
[0050] Step 5.4: Set the evolutionary generation;
[0051] Step 5.5: Each population updates its position according to the first three individuals in its population. The update formula is:
[0052]
[0053]
[0054] Among them, formula (5.5.1) represents the distance between the individual and the prey, formula (5.5.2) is the position update formula of the gray wolf, t is the current iteration number, and is the coefficient vector, and are the position vector of the prey and the position vector of the gray wolf respectively;
[0055]
[0056]
[0057] in, and The modulus of gets a random number between [0,1], The convergence factor decreases linearly from 2 to 0 with the number of iterations;
[0058] Step 5.6: Calculate the fitness value of the alpha wolf in each population according to the fitness function, generate wolf king groups α', β', δ' from the alpha wolf in each population, α' is the wolf king, and the individuals in the population update their positions according to the leadership of the wolf king group. The formula for updating the position is the same as step 5.5;
[0059] Step 5.7: Set the random recombination threshold R to monitor the wolf pack; if the wolf king changes, the mark is cleared and the counting starts again; if the wolf king does not change, the mark is accumulated and added by 1;
[0060] Step 5.8: When the cumulative number of marks reaches the random recombination threshold R, the inferior individuals are randomly re-selected. If the random recombination threshold R is not reached, if the evolutionary generation is reached, the fitness value of the α wolf of the optimal wolf pack is output, otherwise execute step 5.6.
[0061] The present invention is easy to apply and improves the convergence speed of the fitness function during the iteration process, thereby also improving the efficiency of solving the inverse kinematics of the robot arm. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a schematic diagram of the hydraulic drive system of the robotic arm;
[0063] Figure 2 This is a schematic diagram of the robotic arm model;
[0064] Figure 3 Convert rigid-flexible mechanisms from rigid to flexible;
[0065] Figure 4 It is the coordinate system of each joint of the mobile loading robot arm;
[0066] Figure 5 It is a three-dimensional diagram of the mobile loading robot arm model and its slider control diagram;
[0067] Figure 6 This is a diagram to introduce the wolf pack hierarchy in the gray wolf algorithm;
[0068] Figure 7 Map of hunting behavior for wolves;
[0069] Figure 8 It is the decision diagram of the convergence process of the Grey Wolf Algorithm;
[0070] Fig. 9 The schematic diagram of the process of solving the inverse kinematics of the mobile loading robot arm based on the multi-group grey wolf algorithm;
[0071] Fig.10 The search process for joint parameters θ1, θ2, θ3, and D4;
[0072] Fig.11 Fitness value-algebraic curve for solving the inverse kinematics of the manipulator based on the multi-population grey wolf algorithm;
[0073] Fig.12 This is a comparison chart of the application effects of the gray wolf algorithm and the multi-group gray wolf algorithm. DETAILED DESCRIPTION
[0074] The specific steps of the present invention are as follows:
[0075] Step 1: Coordinate establishment and parameter definition:
[0076] Step 1.1: For the mobile loading robot under study, its structure is as follows:
[0077] The mobile loading robot arm is installed at the rear of the vehicle. It is mainly used to lift large load objects and complete the task of transferring objects between the vehicle and the transport vehicle. Its control system adopts hydraulic drive mode and consists of a quantitative pump, outrigger cylinder, luffing cylinder, folding cylinder and telescopic cylinder. The luffing cylinder, folding cylinder and telescopic cylinder use built-in magnetostrictive sensors to achieve precise telescopic control and feedback, such as Figure 1 shown.
[0078] It consists of a rotating joint and three telescopic joints. Its simplified structure is as follows Figure 2As shown. The base of the mobile loading robot arm is a degree of freedom that rotates around the z-axis, and its purpose is to adjust the spatial position of the mobile loading robot arm to grab the packaging box, that is, to control the transfer angle; in order to enable the mobile loading robot arm to reach a farther target position, the mobile loading robot arm not only needs two rotating joints (degrees of freedom 2 and 3), but also adds a three-section telescopic arm (degrees of freedom 4, 5 and 6) to expand the working range; because the grasped object is a large load, in order to reduce the additional torque generated by the end weight during the handling process, a wrist joint degree of freedom 7 is added to ensure that it is always vertically downward; the sling grasps (or puts) the box to ensure its directionality, so a degree of freedom 8 is also required to adjust the end posture.
[0079] Among them, the entire operation process of the mobile loading robot arm hoist does not require the use of auxiliary components and is a purely mechanical operation mechanism. At the same time, in order to avoid rigid collision of the robot arm when grabbing objects, the hoist adopts a rigid-flexible coupling mechanism design, and its simplified structure is as follows Figure 3 As shown. When the robot arm grabs the packaging box, when the lifting device approaches the top of the box, the rigid-flexible conversion mechanism changes from rigid to flexible, the bottom mechanism 3 slides into the box slot, and the mechanism 4 performs a locking operation; when the box is lifted, the rigid-flexible conversion mechanism changes from flexible back to rigid, and then the lifting operation is performed. Figure 3 It can be seen that when mechanism 1 is separated from mechanism 2, it is in a flexible state; when mechanism 1 falls into mechanism 2, it is in a rigid state.
[0080] Step 1.2: Specify z i Axis is the axis direction of connecting rod i, x i The axis is perpendicular to z i In the direction of the y axis, i The axis is x i oz i The normal direction of the plane satisfies the right-hand rule. The reference coordinate system is defined as the coordinate system {0}, which is fixed on the base of the mobile loading robot. When the first joint variable value (θ1) is 0, the coordinate system {0} coincides with the coordinate system {1}, and the z0 axis coincides with the axis of the connecting rod 1. The coordinate system at each joint is gradually established according to the right-hand rule;
[0081] Step 1.3: Define variables
[0082] l1 and l2 are the lengths of connecting rods 1 and 2; l3 is the length of the telescopic rod base arm; l4 is the length of the sling; d i is the extension length of the telescopic rod (i = 4, 5, 6), D4 is the total extension of the telescopic rod (D4 = d4 + d5 + d6); θ j is the rotation angle of joint j (j = 1, 2, 3, 7, 8), c1 = cosθ1, s1 = sinθ1, s 23 = sin(θ2+θ3), c23 =cos(θ2+θ3),s 237 = sin(θ2+θ3+θ7), c 237 =cos(θ2+θ3+θ7). i-1 T i is the homogeneous transformation matrix of the i-th joint coordinate system relative to the i-1-th coordinate system.
[0083] in,
[0084] Step 2: Construct the forward kinematics model of the mobile loading robot:
[0085] Step 2.1: Determine the Figure 4 The coordinate systems of each joint shown are based on the homogeneous transformation method, and the corresponding posture transformation matrix is obtained as follows: (counterclockwise is positive)
[0086]
[0087]
[0088]
[0089]
[0090] Step 2.2: According to each transformation matrix, the forward kinematics simplified model of the mobile loading robot is obtained as follows:
[0091]
[0092]
[0093] Among them, T is the transformation matrix of the coordinate system of the end of the mobile loading robot arm relative to the base coordinates, R is the posture matrix of the end of the mobile loading robot arm, and P is the position vector of the end of the mobile loading robot arm.
[0094] The Robotic Toolbox was used in MATLAB to simulate the model of the mobile loading robot arm, and the three-dimensional model diagram and slider control diagram shown in Figure 5 were obtained. The parameters of each joint angle can be changed through the slider teaching module on the left, and the changes are reflected in real time on the right.
[0095] Step 3: For the mobile loading robot with a sling, based on the analysis of its mechanism movement mode, its end position is determined by θ1, θ2, θ3, and D4, and its end posture is determined by θ7 and θ8.
[0096] The terminal posture of the mobile loading robot arm when grabbing the packaging box is fixed, which requires the sling rod to be perpendicular to the horizontal position, that is, α = 180° (α = θ2 + θ3 + θ7); the axis of the sling should be kept horizontal relative to the x-axis; because θ8 is only related to the posture of the robot arm, in order to control the posture of the sling grabbing the object, let β = 0° (β = θ1 + θ8); the telescopic length d i (i=4,5,6) adopts synchronous expansion and contraction method.
[0097] Therefore,
[0098] sin(θ2+θ3+θ7)=sin180 ° =0,
[0099] cos(θ2+θ3+θ7)=cos180°=-1,
[0100] θ1=-θ8, where “-” means that θ1 and θ8 rotate in opposite directions;
[0101] The 8-DOF problem can be converted into a 4-DOF (θ1, θ2, θ3, D4) problem. At this time, the position vector and attitude transformation matrix of the end effector are:
[0102]
[0103]
[0104] According to formula (1.3), the base swivel joint 1 and the connecting rod 2, connecting rod 3 and telescopic connecting rod are not in the same motion plane. The base swivel joint moves in the xoy plane to control the spatial orientation of the transport packaging box; the connecting rod 2, connecting rod 3 and telescopic rod move in the zox plane, and their main task is to grab the packaging box. Therefore, the spatial orientation of the mobile loading robot during the movement can be uniquely determined by the two-variable tangent function, and its inverse solution is θ1=atan2(p x ,p y ).
[0105] According to the kinematic equations obtained by simplifying the model, the following set of equations can be obtained:
[0106]
[0107] Step 4: Construct a fitness function and specify constraints:
[0108] Assume that the desired position of the end of the mobile loading robot arm is T * for:
[0109]
[0110] Substituting the candidate inverse solution into the forward kinematics equation (1.1) can obtain the actual end position T. If T * =T, then the candidate inverse solution is the solution of inverse kinematics.
[0111] This paper designs a fitness function as shown in the formula to judge the quality of each solution after each iteration. The smaller the function value, the closer the obtained inverse kinematics solution is to the solution of the desired posture.
[0112]
[0113] Where μ is the adjustment factor between the position and attitude errors.
[0114] In fact, in addition to the rotation matrix R, the posture can also be represented by the Euler angle, which only requires three variables. Therefore, when using MATLAB to solve the end-of-arm posture, the homogeneous matrix T is converted into the Euler angle (denoted as σ, τ) to reduce variables, so that the optimization objective function can be simplified:
[0115]
[0116] In the formula, represents the attitude error, represents the position error, and μ is the adjustment factor between the position and attitude errors.
[0117] After completing the construction of the fitness function, in the specific work of the mobile loading robot, the working range of each joint must conform to the definition range of the joint angle variable in step 1.3.
[0118] Step 5: Design a multi-group gray wolf algorithm to solve the inverse kinematics:
[0119] The multi-population gray wolf algorithm is an improved algorithm based on the gray wolf algorithm. Figure 6 As shown, there are four levels in the wolf pack, from high to low, they are α, β, δ, ω. The common wolf individual ω determines its movement position according to the three alpha wolves, β, δ. The specific hunting behavior is as follows Figure 7 At the same time, in order to avoid falling into the local optimum, the gray wolf algorithm will Figure 8 By judging the distance between the gray wolf and the prey, the wolf can adjust the position of approaching or moving away from the prey.
[0120] Since there are eight unknown parameters (θ1, θ2, θ3, d4, d5, d6, θ7, θ8) in the system and the joints are coupled with each other, the inverse kinematics solution of the mobile loading manipulator cannot be directly obtained by the traditional inverse transformation method. The multi-group grey wolf algorithm is selected to analyze the inverse kinematics problem of the mobile loading manipulator, and then the only inverse kinematics solution is obtained. Fig. 9 The algorithm flow chart of the solution process is as follows. While the wolf population is increasing, when the overall wolf king does not change after multiple iterations and the accumulation reaches the set threshold R, the inferior individuals will be randomly selected again. The specific solution process is as follows:
[0121] Step 5.1: Based on the model simplification in step 3, convert the system from an 8-DOF problem to a 4-DOF (θ1, θ2, θ3, D4) problem;
[0122] Step 5.2: Initialize the population individuals X = {x1, x2, ..., x n}, where x i ={θ1,θ2,θ3,D4},i=1,2,…n, and set the initialization parameters of the algorithm. Then, split X into N populations: X1,X2,…X N ;
[0123] Step 5.3: Calculate the fitness values of all individuals in each population according to the fitness function, and evaluate three alpha, beta, and delta alphas for each population;
[0124] Step 5.4: Set the evolutionary generation;
[0125] Step 5.5: Each population updates its position according to the first three individuals in its population. The update formula is:
[0126]
[0127]
[0128] The first formula above represents the distance between the individual and the prey, and the second formula above is the position update formula of the gray wolf. t is the current iteration number, and is the coefficient vector, and are the position vector of the prey and the position vector of the gray wolf respectively.
[0129]
[0130]
[0131] in, and The modulus of gets a random number between [0,1], The convergence factor decreases linearly from 2 to 0 with the number of iterations.
[0132] Step 5.6: Calculate the fitness value of the alpha wolf in each population according to the fitness function, generate wolf king groups α', β', δ' from the alpha wolf in each population, α' is the wolf king, and the individuals in the population update their positions according to the leadership of the wolf king group. The formula for updating the position is the same as step 5.5;
[0133] Step 5.7: Set the random recombination threshold R to monitor the wolf pack; if the wolf king changes, the mark is cleared and the counting starts again; if the wolf king does not change, the mark is accumulated and added by 1;
[0134] Step 5.8: When the cumulative number of marks reaches the random recombination threshold R, the inferior individuals are randomly re-selected. If the random recombination threshold R is not reached, if the evolutionary generation is reached, the fitness value of the α wolf of the optimal wolf pack is output, otherwise execute step 5.6.
[0135] Inverse kinematics simulation process of mobile loading robot
[0136] Step 6.1: Set the expected position of the mobile loading robot, perform position initialization of the multi-group gray wolf algorithm in the robot workspace, set the number of iterations, etc. Specifically, set the expected position to the position of the mobile loading robot when q = [1.3 0.5 1.5 0.5], so the search result should also converge to q, and set the number of iterations to 200.
[0137] Step 6.2: Perform specific simulation of the problem according to step 5.
[0138] Step 6.3: The simulation results are as follows Figure 10-12 As shown, Fig.10 is the process of searching for θ1, θ2, θ3, and D4. The red dotted line is the reference line, which is set according to q in step 6.1; Fig.11 The parameter search and fitness function convergence with the iteration number for solving the inverse kinematics problem; Fig.12 This is a comparison of the convergence of the fitness function between the gray wolf algorithm and the multi-population gray wolf algorithm when solving the problem. It can be seen that the improved multi-population gray wolf algorithm improves the degree of convergence and the accuracy of the final solution.
[0139] Step 6.4: After obtaining the optimal solutions of θ1, θ2, θ3, and D4, the complete inverse solution of 8 degrees of freedom (θ1, θ2, θ3, d4, d5, d6, θ7, θ8) can be obtained through the inverse analysis of the simplified model.
[0140] After completing the kinematic modeling of the mobile loading robot arm, the method of the present invention needs to use the kinematic modeling results to construct the fitness function of the problem, and finally use the multi-group gray wolf algorithm to search for the inverse kinematic solution of the mobile loading robot arm. The method introduces a new intelligent group algorithm, an improved algorithm of the gray wolf algorithm, to solve the inverse kinematics problem of the robot arm, and effectively avoids the common problem of falling into the local optimum through the improvement.
[0141] Explanation of symbols:
[0142] l1, l2 are the lengths of connecting rods 1 and 2
[0143] l3 is the length of the telescopic rod base arm
[0144] l4 is the length of the sling
[0145] d i is the extension length of the telescopic rod (i=4,5,6)
[0146] D4 is the total extension of the telescopic rod (D4 = d4 + d5 + d6)
[0147] θ j is the rotation angle of joint j (j=1,2,3,7,8)
[0148] c1,s1,s 23 , c 23 ,s 237 , c 237 They are the abbreviations of cosθ1, sinθ1, sin(θ2+θ3), cos(θ2+θ3), sin(θ2+θ3+θ7), and cos(θ2+θ3+θ7) respectively.
[0149] i-1 T i is the homogeneous transformation matrix of the i-th joint coordinate system relative to the i-1-th coordinate system
[0150] T is the transformation matrix of the coordinate system of the end of the mobile loading robot relative to the base coordinates
[0151] R is the posture matrix of the end of the mobile loading robot arm
[0152] P is the position vector of the end of the mobile loading robot arm
[0153] T * Expected position of the mobile loading robot
[0154] μ is the adjustment factor between the position and attitude errors
[0155] σ and τ are the Euler angles of the robot end posture, and the symbol * in the upper right corner is the expected value of the quantity
[0156] X i , i=1,2,…,N is the gray wolf population
[0157] is the distance between the individual and the prey
[0158] t is the current iteration number
[0159] and is the coefficient vector
[0160] and are the position vector of the prey and the position vector of the gray wolf respectively
[0161] and A random number modulo [0,1]
[0162] is the convergence factor, which decreases linearly from 2 to 0 as the number of iterations increases.
[0163] α', β', and δ' are the wolf king groups selected from the best wolves in each population. α' is the wolf king
[0164] R is the random recombination threshold, which is the maximum number of iterations allowed without the wolf king changing.
Claims
1. A method for inverse kinematics of a mobile loading robot based on a multi-group grey wolf algorithm. Features: The steps are: S1. Coordinate establishment and parameter definition: Step 1.1: The structure of the mobile loading robot is as follows: The base has one degree of freedom for rotation around the z-axis, two degrees of freedom for rotational joints 2 and 3, three-section telescopic arms with degrees of freedom 4, 5 and 6, one degree of freedom for wrist joints 7, and one degree of freedom for adjusting the end posture 8; Step 1.2: Specify z i Axis is the axis direction of connecting rod i, x i The axis is perpendicular to z i In the direction of the y axis, i The axis is x i oz i The normal direction of the plane satisfies the right-hand rule; the reference coordinate system is defined as the coordinate system {0}, which is fixed on the base of the mobile loading robot. When the first joint variable value (θ 1 ) is 0, the coordinate system {0} coincides with the coordinate system {1}, and z 0 The axis coincides with the axis of connecting rod 1, and the coordinate system at each joint is gradually established according to the right-hand rule; Step 1.3: Define variables: l 1 , l 2 is the length of connecting rods 1 and 2; l 3 is the length of the telescopic arm; l 4 is the length of the spreader; d i is the extension length of the telescopic rod, where i = 4, 5, 6, D 4 is the total extension of the telescopic rod, where D 4 =d 4 +d 5 +d 6 θ j is the rotation angle of joint j, where j = 1, 2, 3, 7, 8, c 1 = cosθ 1 ,s 1 = sinθ 1 ,s 23 = sin(θ 2 +θ 3 ), c 23 =cos(θ 2 +θ 3 ), s 237 = sin(θ 2 +θ 3 +θ 7 ), c 237 =cos(θ 2 +θ 3 +θ 7 ); i-1 T i is the homogeneous transformation matrix of the i-th joint coordinate system relative to the i-1-th coordinate system; in, S2. Construct the forward kinematics model of the mobile loading robot: Step 2.1: The pose transformation matrix is as follows: Counterclockwise is positive Step 2.2: According to each transformation matrix, the forward kinematic simplified model of the mobile loading robot is obtained: Among them, T is the transformation matrix of the coordinate system of the end of the mobile loading robot arm relative to the base coordinates, R is the posture matrix of the end of the mobile loading robot arm, and P is the position vector of the end of the mobile loading robot arm; S3, mobile loading robot with sling, from its mechanism motion mode, its end position is determined by θ 1 ,θ 2 ,θ 3 , D 4 The terminal posture is determined by θ 7 ,θ 8 Determine; To control the posture of the sling grabbing the object, let β = 0°, where β = θ 1 +θ 8 ; Telescopic length d i , where i=4,5,6 adopts synchronous expansion and contraction Therefore, sin(θ 2 +θ 3 +θ 7 )=sin180°=0, cos(θ 2 +θ 3 +θ 7 )=cos180°=-1, θ 1 =-θ 8 , where "-" refers to θ 1 and θ 8 The direction of rotation is opposite; Convert 8 degrees of freedom to 4 degrees of freedom. At this time, the position vector and attitude transformation matrix of the end effector are: According to formula (1.3), the base swivel joint 1 and the connecting rod 2, connecting rod 3 and telescopic connecting rod are not in the same motion plane. The base swivel joint moves in the xoy plane to control the spatial orientation of the transfer packaging box; the connecting rod 2, connecting rod 3 and telescopic rod move in the zox plane. The spatial orientation of the mobile loading robot during the movement is uniquely determined by the two-variable tangent function, and its inverse solution is θ 1 = atan2(p x ,p y ); According to the kinematic equations obtained by simplifying the model, the following set of equations can be obtained: S4. Construct fitness function and specify constraints: Assume that the desired position of the end of the mobile loading robot arm is T * for: Substituting the candidate inverse solution into the forward kinematics equation (1.1) can obtain the actual end position T. If T * =T, then the candidate inverse solution is the solution of inverse kinematics; Design a fitness function to judge the quality of each solution after each iteration. The smaller the function value, the closer the inverse kinematics solution is to the desired posture solution. Where μ is the adjustment factor between the two errors of position and attitude; Convert the homogeneous matrix T into Euler angles, denoted as σ, τ, simplify the optimization objective function: In the formula, represents the attitude error, represents the position error, μ is the adjustment factor between the position and attitude errors; S5. Design a multi-group grey wolf algorithm to solve the inverse kinematics: There are four levels in the wolf pack, from high to low, they are α, β, δ, ω. The common wolf individual ω determines its movement position according to the three alpha wolves, β, δ. Since there are eight unknown parameters θ in the system 1 ,θ 2 ,θ 3 , d 4 , d 5 , d 6 ,θ 7 ,θ 8 , and the joints are coupled with each other. The specific process is as follows: Step 5.1: Based on the model simplification in step 3, convert the system from an 8-DOF problem to a 4-DOF θ 1 ,θ 2 ,θ 3 , D 4 ; Step 5.2: Initialize the population individuals X = {x 1 ,x 2 ,…,x n }, where x i ={θ 1 ,θ 2 ,θ 3 ,D 4 }, i = 1, 2, ... n, and set the initialization parameters. Then, split X into N populations: X 1 ,X 2 ,…X N ; Step 5.3: Calculate the fitness values of all individuals in each population according to the fitness function, and evaluate three alpha, beta, and delta alphas for each population; Step 5.4: Set the evolutionary generation; Step 5.5: Each population updates its position according to the first three individuals in its population. The update formula is: Among them, formula (5.5.1) represents the distance between the individual and the prey, formula (5.5.2) is the position update formula of the gray wolf, t is the current iteration number, and is the coefficient vector, and are the position vector of the prey and the position vector of the gray wolf respectively; in, and The modulus of gets a random number between [0,1], The convergence factor decreases linearly from 2 to 0 with the number of iterations; Step 5.6: Calculate the fitness value of the alpha wolf in each population according to the fitness function, generate wolf king groups α', β', δ' from the alpha wolf in each population, α' is the wolf king, and the individuals in the population update their positions according to the leadership of the wolf king group. The formula for updating the position is the same as step 5.5; Step 5.7: Set the random recombination threshold R to monitor the wolf pack; if the wolf king changes, the mark is cleared and the counting starts again; if the wolf king does not change, the mark is accumulated and added by 1; Step 5.8: When the cumulative number of marks reaches the random recombination threshold R, the inferior individuals are randomly re-selected. If the random recombination threshold R is not reached, if the evolutionary generation is reached, the fitness value of the α wolf of the optimal wolf pack is output, otherwise execute step 5.6.
