Mechanical arm joint gravity compensation system based on current optimization

Through the gravity compensation system of the robotic arm joint based on current optimization, the particle swarm algorithm and interpolation current calculation are used to achieve high-precision gravity compensation of the robotic arm joint, which solves the problem of low compensation accuracy in the existing technology and improves the accuracy of the robotic arm. Operational stability and efficiency.

CN118721279AActive Publication Date: 2024-10-01JIANGSU UNIV

Patent Information

Application Number
CN202410979580.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-10-01
Estimated Expiration
2044-07-22

AI Technical Summary

Technical Problem

The compensation accuracy of existing robotic arm gravity compensation methods is not high, and the compensation data cannot be effectively adjusted when the load changes or the external environment changes, resulting in unstable and low efficiency of the robotic arm.

Method used

The robotic arm joint gravity compensation system based on current optimization is adopted, through the first and second angle sensors, matrix transformation module, position sensor, center of mass vector module, gravity compensation calculation module, gravity vector module, initial compensation module, current sensor, and interpolation current It is composed of a calculation module and a particle optimization module, which measures and calculates the optimal current compensation and adjusts joint gravity compensation in real time.

Benefits of technology

It improves the running stability and work efficiency of the robotic arm, enhances the compensation accuracy, and can adjust the compensation data in time when the load changes or the external environment changes, ensuring the smooth operation of the robotic arm and efficient task execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118721279A_ABST
    Figure CN118721279A_ABST
Patent Text Reader

Abstract

The invention discloses a mechanical arm joint gravity compensation system based on current optimization, which consists of a first angle sensor, a second angle sensor, a matrix transformation module, a position sensor, a centroid vector module, a gravity compensation calculation module, a gravity vector module, an initial compensation module, a first current sensor, a second current sensor, an interpolation current calculation module and a particle optimization module, a D-H parameter table is established according to structural parameters of the mechanical arm, a coordinate transformation matrix is obtained, gravity vectors and gravity moments of all joints on the mechanical arm are obtained through the coordinate transformation matrix and physical parameters of the mechanical arm, a current initial value is obtained through the gravity vectors and the gravity moments, and then real-time optimal compensation current is obtained through improved particle swarm optimization. Data correction is carried out on the gravity compensation value of each joint, the problem of compensation value deviation is solved, compensation data can be adjusted in time when the load changes or the external environment changes, the operation of the mechanical arm is more stable, and the working efficiency of the mechanical arm is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of robot compensation, and in particular relates to a system capable of realizing robot arm gravity compensation by optimizing electric current. Background Art

[0002] A robot is an intelligent mechanical device designed and manufactured based on human actions. From its initial industrial applications, robots have expanded to various fields, from manufacturing, agriculture, industry to the service industry. Robots are present in all walks of life and have gradually become an indispensable part of modern society. The robot's arm is usually composed of multiple joints and connectors. The load may change in different positions and postures, which causes the center of gravity position and force of the robot arm to change accordingly. Due to the gravity of the earth, the load of the robot arm will be affected by gravity, which causes the robot arm to have posture deviation, instability or fail to accurately reach the target position during movement.

[0003] In the control and operation of the robot system, gravity compensation is a very important technology. Gravity compensation can significantly reduce the load of the robot's joints, connecting rods and loads on the robot's motor and structure, help the robot overcome the influence of gravity, and enable it to perform the required tasks and trajectories more accurately, thereby improving production efficiency and product quality. In addition, gravity compensation can also reduce energy consumption during the movement of the robot, extend the service life of the equipment, and reduce maintenance costs. For example, a gravity compensation method based on Kalman filtering and zero gravity compensation of a robot is proposed in the document with Chinese Patent Publication No. CN116922399. This method obtains the optimal torque state and the optimal gravity compensation variance through the Kalman filter gain, but its gravity compensation current data is only obtained through interpolation, and the result obtained is not necessarily the optimal current compensation. Therefore, the compensation accuracy is not high. Summary of the invention

[0004] The purpose of the present invention is to solve the problems existing in the existing mechanical arm gravity compensation and to provide a mechanical arm joint gravity compensation system based on current optimization using optimal current compensation, which has high compensation accuracy and improves the running stability of the mechanical arm.

[0005] The technical solution adopted by the mechanical arm joint gravity compensation system based on current optimization described in the present invention is: it is composed of a first and a second angle sensor, a matrix transformation module, a position sensor, a centroid vector module, a gravity compensation calculation module, a gravity vector module, an initial compensation module, a first and a second current sensor, an interpolation current calculation module and a particle optimization module. The basic mechanical parameters of the mechanical arm in the initial state are obtained by measuring and collecting the first angle sensor, and the basic mechanical parameters are input into the matrix transformation module to obtain a transformation matrix The center of mass coordinate X of each connecting rod is obtained by the position sensori , Y i , Z i And the horizontal coordinate X of the position where gravity acts g(i) and the ordinate Y g(i) , i is the number of links or joints in the robot; the center of mass coordinates of each link X i , Y i , Z i Input into the centroid vector module to get the relative centroid vector P i ; Mass of each connecting rod m i With the transformation matrix Relative center of mass vector P i Input into the gravity compensation calculation module to obtain the gravity moment ME i ; The horizontal coordinate X of the gravity position g(i) , vertical coordinate Y g(i) and gravity moment ME i Input into the gravity compensation module to get the gravity vector The real-time current I is detected by the first current sensor in The second angle sensor detects the real-time working angle of each joint of the robot arm i , the gravity vector Real-time current I in 、Real-time working angle φ i As well as the inertia matrix M(r) and the Coriolis force and centrifugal force matrices Input into the initial compensation module to obtain the initial compensation current I com The second current sensor detects the first, second and fourth joint measurement currents I1, I2 and I4, and inputs the corresponding joint selection angles Ai, Bj, Ck and working angle ranges A, B and C as input signals into the interpolation current calculation module to obtain the initial current value I org , the initial current value I org With the set running current I set As the input of the particle optimization module, the optimal current compensation I g , the optimal current compensation I g and the initial compensation current I com Add together to get the final compensation current I final , to compensate for the gravity of the robot arm joints.

[0006] The beneficial effects of the present invention are:

[0007] 1. The gravity compensation method provided by the present invention performs gravity compensation on the robotic arm through current optimization and improved particle swarm algorithm, thereby solving the problem of compensation value deviation of the existing gravity compensation method. The compensation data can be adjusted in time when the load changes or the external environment changes, so that the operation of the robotic arm is more stable and the working efficiency of the robotic arm is improved.

[0008] 2. The particle swarm optimization in the present invention continuously reduces the inertia weight and introduces a shrinkage factor as the number of iterations increases, so that the algorithm has a strong global convergence ability in the early iteration and a strong local convergence ability in the late iteration. It is a real-time optimization that can ensure the smooth operation and operation accuracy of the robot arm and improve the working efficiency of the robot arm.

[0009] 3. The present invention adopts a particle swarm algorithm to obtain the global optimal current compensation, but the inertia weights of most particle swarm algorithms are constant values, so the global and local convergence capabilities of the particles need to be improved.

[0010] 4. The interpolation current calculation in the present invention is a real-time calculation by interpolating the current sampling points. It improves the resolution of the data without increasing the sampling frequency, and effectively enhances the accuracy of the current data.

[0011] 5. The present invention constructs DH coordinates and establishes a DH parameter table according to the structural parameters of the robot arm, obtains the coordinate transformation matrix from the DH parameter table, obtains the gravity vector and gravity torque of all joints on the robot arm from the coordinate transformation matrix and the physical parameters of the robot arm, obtains the initial current value from the gravity vector and gravity torque, and then obtains the real-time optimal compensation current through improved particle swarm optimization, and performs data correction on the gravity compensation value of each joint. Therefore, the compensation and correction have high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments;

[0013] Figure 1 A schematic diagram of a six-axis robotic arm structure and its spatial coordinate system controlled by the robotic arm joint gravity compensation system of the present invention;

[0014] Figure 2 It is a structural block diagram of the mechanical arm joint gravity compensation system of the present invention;

[0015] Figure 3 yes Figure 2 The control flow chart of the mechanical arm joint gravity compensation system shown;

[0016] In the figure: 31. first angle sensor; 32. matrix transformation module; 33. position sensor; 34. centroid vector module; 35. gravity compensation calculation module; 36. gravity vector module; 37. initial compensation module; 38. first current sensor; 39. interpolation current calculation module; 40. second current sensor; 41. particle optimization module; 42. second angle sensor. DETAILED DESCRIPTION

[0017] like Figure 1 The six-axis robot arm shown in FIG. 1 has a base and six connecting rods 1, 2, 3, 4, 5, and 6 connected in sequence, and six joints are provided between the base and the connection between the six connecting rods. In the initial state of the six-axis robot arm, the spatial coordinate systems of the base and each robot arm are established in sequence, which are O i (x i ,y i ,z i), the number of links or joints in the robot arm is i = 0, 1, 2…6. Among them, the first joint connects the first link 1 and the base, the origin of the spatial coordinate system O0 is at the geometric center of the horizontal plane of the base, the z0 axis is the axial direction of the first joint and points to the center of the first link 1, and the x0 axis and y0 axis are on the horizontal bottom surface of the base; the second joint connects the first link 1 and the second link 2, the z1 axis of the spatial coordinate system O1 is the axial direction of the second joint and points to the direction of the second link 2, the origin is the intersection of the horizontal plane where the center of mass of the first link 1 is located and the z0 axis, the direction of the x1 axis is the same as the direction of the x0 axis, and the direction of the y1 axis is the same as the direction of the z0 axis; the third joint connects the second link 2 and the third link 3, the origin of the spatial coordinate system O2 is the intersection of the plane x0Oy0 formed by the coordinate axes x0 and z0 and the axis of the third joint, the direction of the z2 axis is the axial direction of the third joint pointing to the direction of the second link 2, the direction of the y2 axis is the same as the direction of the x1 axis, and the direction of the x2 axis is opposite to the direction of the y1 axis; the fourth joint connects the third link 3 and the fourth link 4, the origin of the spatial coordinate system O3 is the intersection of the plane x0Oy0 formed by the coordinate axes x0 and z0 and the axis of the fourth joint, and the direction of the O3 coordinate axis is the same as that of the O2 coordinate axis; the origin of the spatial coordinate system O4 is the geometric center of the fourth link 4, the direction of the y4 axis is the same as that of the z3 axis, the direction of the x4 axis is opposite to that of the y3 axis, the direction of the z4 axis is the axial direction of the fifth joint and points to the direction of the fifth link 5; the fifth joint connects the fourth link 4 and the fifth link 5, the origin of the spatial coordinate system O5 is the intersection of the z4 axis and the horizontal plane passing through the axis of the sixth joint, the direction of the z5 axis is the axial direction of the sixth joint and points to the direction of the sixth link 6, the direction of the x5 axis is the same as that of the x4 axis, and the direction of the y5 axis is opposite to that of the z4 axis; the sixth joint connects the fifth link 5 and the sixth link 6, the origin of the spatial coordinate system O6 is the intersection of the end plane of the sixth link 6 and the z5 axis, and the direction of the O6 coordinate axis is the same as that of the O5 coordinate axis.

[0018] The present invention Figure 1 Taking the six-axis robot arm shown in the figure as an example, the performance parameters of the robot arm can be obtained by consulting the relevant manual of the robot arm, including the mass m of each connecting rod. i (i=1,2…6), the operating current of the robot arm I set The robot manufacturer calculates the robot inertia matrix M(r) and the Coriolis force and centrifugal force matrix based on the CAD design. The working angle range of the first joint of the robot arm is A, the working angle range of the second joint is B, and the working angle range of the fourth joint is C. The basic parameters of the two robot arms can be obtained by measurement. i and d i , that is, in the initial state of the six-axis robot, the origin O of the two adjacent space coordinate systems i (x i ,y i,z i ), the horizontal or vertical distance between the coordinate axis z i-1 With coordinate axis z i Along the x axis i The distance is a i , coordinate axis x i-1 With coordinate axis x i Along the coordinate axis z i-1 The distance is d i .

[0019] like Figure 2 As shown, the mechanical arm joint gravity compensation system of the present invention is composed of angle sensors 31, 42, matrix transformation module 32, position sensor 33, centroid vector module 34, gravity compensation calculation module 35, gravity vector module 36, initial compensation module 37, current sensors 38, 40, interpolation current calculation module 39 and particle optimization module 41. Among them, the first angle sensor 31, matrix transformation module 32 and gravity compensation calculation module 35 are connected in sequence, the position sensor 33, centroid vector module 34 and gravity compensation calculation module 35 are connected in sequence, the output end of the position sensor 33 is also connected to the input end of the gravity vector module 36, the output end of the gravity compensation calculation module 35 is connected to the gravity vector module 36 and the initial compensation module 37 in sequence, the second current sensor 40, interpolation current calculation module 39 and particle optimization module 4 are connected in sequence, and the output ends of the first current sensor 38 and the second angle sensor 42 are connected to the initial compensation module 37. The basic mechanical parameters of the mechanical arm are input into the matrix transformation module 32 to obtain the transformation matrix The centroid vector module 34 calculates the position parameter X according to the sensor input. i , Y i and Z i Get the relative center of mass vector P i , the transformation matrix Relative center of mass vector P i and connecting rod mass m i Input to the gravity compensation calculation module 35 to output the gravity moment ME i , the coordinate X g(i) , Y g(i) , X i , Y i and gravity moment ME i Input to the gravity compensation module 36 to obtain the gravity vector The gravity vector Real-time current I in , inertia matrix M(r) and Coriolis force and centrifugal force matrix The initial compensation current I is obtained by inputting it into the initial compensation module 37. comThe first, second and fourth joint measurement currents I1, I2, I4, joint selection angles Ai, Bj, Ck, and the first, second and fourth joint working angle ranges A, B, C are input as input signals to the interpolation current calculation module 39 to calculate the initial current value I org , and compare it with the set running current I set As an input signal, it is input into the particle optimization module 41 to obtain the optimal current compensation I g , the optimal current compensation I g and the initial compensation current I com The final compensation current I can be obtained by adding final , to compensate for the gravity of the robot arm joints. Specifically:

[0020] The first angle sensor 31 is used to obtain the basic parameters of the other two robotic arms of the six-axis robotic arm in the initial state, that is, the coordinate axes z and z of the two adjacent spatial coordinate systems between the base and each robotic arm. i-1 With coordinate axis z i The angle α i , and get the coordinate axis x i-1 With coordinate axis x i The angle θ i .

[0021] The distance a i ,d i and angle α i ,θ i The four signals are input as input signals to the matrix transformation module 32, and the output signal of the matrix transformation module 32 is the previous coordinate system of two adjacent spatial coordinate systems. i-1 (x i-1 ,y i-1 , z i-1 ) to the next coordinate system O i (x i ,y i , z i ) Here i≠0.

[0022] Recombination Figure 3 As shown, the matrix transformation module 32 establishes a DH coordinate system according to the input parameter signal. The DH parameter table is shown in Table 1 below:

[0023] Table 1

[0024] i <![CDATA[a i ]]> <![CDATA[d i ]]> <![CDATA[α i ]]> <![CDATA[θ i ]]> 1 0 <![CDATA[d1]]> -90° <![CDATA[θ1]]> 2 <![CDATA[a2]]> 0 0 <![CDATA[θ2]]> 3 <![CDATA[a3]]> 0 0 <![CDATA[θ3]]> 4 0 0 90° <![CDATA[θ4]]> 5 0 <![CDATA[d5]]> -90° <![CDATA[θ5]]> 6 0 <![CDATA[d6]]> 0 <![CDATA[θ6]]>

[0025] From the table of the standard DH parameter method, it can be obtained that from the coordinate system O i-1 (x i-1 ,y i-1 , z i-1) to coordinate system O i (x i ,y i , z i ) Transformation Matrix It can be obtained from formula (1):

[0026]

[0027] in, are the transformation matrices of the six axes, and their values ​​are obtained from equations (2)-(7):

[0028]

[0029] The position sensor 33 detects the position of each connecting rod, that is, the centroid coordinate X i , Y i , Z i , and also detect the horizontal coordinate X of the gravity position of each connecting rod g(i) and the ordinate Y g(i) The center of mass coordinates of each connecting rod are input into the center of mass vector module 34, and the center of mass vector module 34 calculates the relative center of mass vector P i , P i From formula (8), we can get:

[0030] P i =[X i Y i Z i 1] T (i=1,2…6) (8)

[0031] Among them, X i represents the horizontal coordinate of the center of mass of the ith connecting rod, Y i represents the ordinate of the center of mass of the i-th connecting rod, Z i represents the vertical coordinate of the center of mass of the i-th connecting rod, and T is the matrix transpose.

[0032] The transformation matrix output by the matrix transformation module 32 The mass of each connecting rod is m i (i=1, 2...6) and the relative centroid vector P output by the centroid vector module 34 i The gravity compensation calculation module 35 calculates the gravity moment ME of each link acting on the joint according to the input signal. ij , M.E. ij represents the gravity torque acting on the i-th joint by the j-th link, and its value is obtained by formulas (9)-(14).

[0033]

[0034] ME 66 =0 (14)

[0035] Where g is the acceleration due to gravity.

[0036] The gravity moment ME acting on each joint from the first link to the sixth link 6 ij Add together to get the total gravity moment ME of each joint i , for example, ME1 represents the total gravity torque on the first joint, and its value can be obtained by formula (15):

[0037]

[0038] The total gravitational moment ME on each joint i , the horizontal coordinate of the center of mass of the i-th connecting rod is X i and the ordinate Y i , the horizontal coordinate of the gravity position X g(i) and the ordinate Y g(i) As an input signal, it is input into the gravity vector module 36, where the horizontal coordinate X of the center of mass of the i-th link i and the ordinate Y i , the horizontal coordinate of the gravity position X g(i) and the ordinate Y g(i) It is collected by the position sensor 33.

[0039] The gravity vector module 36 first calculates the vertical vector from the center of mass to the point of gravity, that is, the force arm R, which is obtained by formula (16):

[0040]

[0041] Based on the lever arm R and the total gravity moment ME i Get the gravity vector of each joint From formula (17), we get:

[0042]

[0043] Finally, according to the gravity vector of each joint Get the gravity vector Its value is obtained from formula (18):

[0044]

[0045] in, is the gravity vector for each joint.

[0046] The second angle sensor 42 detects the real-time working angle φ of each joint of the robot arm. i(i=1,2…6), the first current sensor 38 detects the real-time current I of each joint in , the gravity vector Inertia matrix M(r), real-time working angle of each joint φ i (i=1,2…6), Coriolis force and centrifugal force matrix Real-time current of each joint I in As an input signal, it is input into the initial compensation module 37. The initial compensation module 37 calculates the joint torque vector according to formula (19), which is also the dynamic equation of the output torque:

[0047]

[0048] Where τ is the joint torque vector, r is the joint position vector, and the joint position vector r can be obtained by formula (20): is the joint velocity vector, is the joint acceleration vector, and T is the matrix transpose:

[0049] r=[φ1 φ2 φ3 φ4 φ5 φ6] T (18)

[0050] Output torque of the robot arm, torque constant K α The relationship between the motor input current and the motor input current can be obtained by formula (21):

[0051]

[0052] By gravity vector and torque constant K α The initial compensation current I of the robot arm can be obtained com , its value can be obtained by formula (22):

[0053]

[0054] The measured currents I1, I2, I4 of the first joint, the second joint, and the fourth joint are collected by the current sensor 40. At this time, the joint selection angle is Ai, Bj, Ck (i, j, k∈{1,2,3}). The measured currents I1, I2, I4, the joint selection angles Ai, Bj, Ck, and the joint working range angles A, B, C are input as input signals into the interpolation current calculation module 39, where I1, I2, I4 are the measured currents of the first, second, and fourth joints, respectively, collected by the current sensor 40, and the joint selection angles Ai, Bj, Ck are all within the value ranges of the corresponding joint working range angles A, B, C.

[0055] Use the first, second, and fourth joints for interpolation calculation. Within the working angle range of A, B, and C of the first, second, and fourth joints, select three angle values ​​at each joint as the selected angles, which are recorded as A1-A3, B1-B3, and C1-C3. A1-A3 represents the selected position angle of the first joint, B1-B3 represents the selected position angle of the second joint, and C1-C3 represents the selected position angle of the fourth joint. The measurement position combination of the three joints can combine a total of 27 measurement positions P Ai,Bj,Ck , measuring position P Ai,Bj,Ck It can be obtained from formula (23):

[0056] P Ai,Bj,Ck =(Ai,Bj,Ck)(i,j,k∈{1,2,3}) (21)

[0057] At 27 measurement positions, the current data I is obtained by collecting data from the current sensors of the motors of each axis. i,j,k , its value can be obtained by formula (24):

[0058]

[0059] For current data I i,j,k Interpolation is performed to obtain the initial current value I org , its value can be obtained by formula (25):

[0060]

[0061] Among them, μ1 is the first-order interpolation quotient and μ2 is the second-order interpolation quotient.

[0062] Set the initial current value I org And the set running current I set As an input signal, it is input to the particle optimization module 41. The particle optimization module 41 performs particle swarm (PSO) optimization algorithm processing, specifically:

[0063] 1. Define the basic parameters of the particle swarm:

[0064] Define the number of particles num = 50; the number of iterations nums is 100; the maximum inertia weight is ω max =1.5, the minimum inertia weight is ω min =0.9, the inertia weight is ω; the acceleration factor 1 is C1, the acceleration factor 2 is C2; the parameter dimension is 1 dimension.

[0065] The inertia weight ω in the traditional PSO algorithm is a fixed value, and the constant inertia weight will have disadvantages in global search. If ω is not large enough, it cannot jump out of the local extreme value and will fall into the local optimal solution; and if ω is too large in local search, it cannot converge quickly to the optimal solution. To address this problem, the ω value in the present invention adopts an adaptive adjustment strategy, that is, the value of ω is linearly reduced with the number of iterations. As the number of iterations increases, the inertia weight ω continues to decrease linearly, so that the particle swarm algorithm has a stronger global convergence ability in the early stage and a stronger local convergence ability in the later stage. The adjustment strategy of ω is derived from formula (26):

[0066]

[0067] Among them, nums k Represents the current iteration number.

[0068] 2. Initialize the particle speed and position information

[0069] a) The number of particle swarms defined by position information is 50 and the dimension is 1;

[0070] b) Speed ​​information: The speed is initialized to a random value (i.e., the moving direction and speed are both random).

[0071] 3. Initialize the optimal position and optimal fitness of the particle swarm

[0072] a) Set the initial position of the particle to the individual optimal position P BEST ;

[0073] b) setting the initial best fitness of the particle to the zero vector;

[0074] 4. Initialize the global optimal position and fitness of the particle swarm

[0075] a) The global optimal position G of the particle BEST Initially, it is a zero vector;

[0076] b) The global optimal fitness is set to ∞;

[0077] 5. Evaluate the initial fitness of the particle swarm.

[0078] a) Traverse all particles;

[0079] b) After calculating the fitness of the current particle by the fitness function, update the best fitness of each particle (i.e. record the best fitness that each particle can achieve). The fitness function is defined in step 8;

[0080] c) Compare the fitness of the current particle with the global optimal fitness;

[0081] d) If the fitness of the current particle is better than the global best fitness, the best fitness is updated to the fitness of the current particle and the global best position is updated to the current position of the particle;

[0082] Through this method, particles can be gradually gathered to the global optimal position to search for the optimization target.

[0083] 6. Particle swarm optimization main program:

[0084] Outer loop: control the number of iterations to 100;

[0085] Inner loop: loop through all particles, the number of particles is 50;

[0086] Update particle speed: mainly consists of the following three parts.

[0087] 1) Inertia part: keeps particles in their current motion trend.

[0088] 2) Individual part: guide particles to approach the optimal position of individual particles.

[0089] 3) Group part: guide particles to approach the global optimal position of particles.

[0090] The velocity V of particles in the traditional PSO particle swarm algorithm k and position P k It can be obtained from formula (27):

[0091]

[0092] Among them, V k represents the particle velocity after k iterations; C1 and C2 represent acceleration factors; r1 and r2 represent random numbers, ranging from 0 to 1; P k represents the particle position after k iterations; represents the historical optimal position of particle τ in the kth iteration, that is, the optimal solution searched by the τth particle after the kth iteration; Represents the historical optimal position of the group in the kth iteration, that is, the optimal solution in the entire particle group after the kth iteration.

[0093] The particle speed update is usually affected by the inertia weight and acceleration factor, which may cause the speed to be too large or too small during the search process, thus affecting the balance between global search and local search capabilities.

[0094] Based on the traditional PSO, the present invention adds a contraction factor Used to improve the search performance and convergence characteristics of the algorithm. It can be obtained from formula (28), and the particle velocity of the improved PSO algorithm can be obtained from formula (29):

[0095]

[0096] Among them, C=C1+C2.

[0097]

[0098] Boundary settings: limit the particle position to not be less than 0. If it is less than 0, reset its value to 0;

[0099] Calculate fitness: Use the evaluate_fitness function, which receives the current particle position and speed as parameters and returns the corresponding fitness value.

[0100] Update individual best fitness and best position: If the currently calculated fitness value is better (smaller) than the individual best fitness value previously recorded by the particle, then update the individual best fitness value and the corresponding position.

[0101] Update the global best fitness and best position: If the currently calculated fitness value is better than the global best fitness value (smaller value), then update the global best fitness value and the corresponding position.

[0102] 7. Display the best fitness of the current iteration: update the information of the current iteration after each iteration and display the optimal parameters And output optimal current compensation I g .

[0103] 8. Define the fitness function: The fitness function fitness is defined by formula (30):

[0104] g(P k ,V k ,I org )=fitness+I set (28)

[0105] Among them, g(P k ,V k ,I org ) is the current model function, which is generally obtained from the parameters of the working robot arm and empirical formulas.

[0106] After the particle swarm algorithm, the optimal fitness can be obtained, and the optimal current compensation I can be obtained after calculation. g , the optimal current compensation is obtained by formula (31):

[0107] I g =g(Pk ,V k ,I org )-I set (29)

[0108] The final compensation current I can be obtained by the initial compensation current and the optimal current compensation. final , its value can be obtained by formula (32):

[0109] I final =I com +I g (30)

[0110] The calculated final compensation current I final It is fed into the current loop as a feedforward input, increasing the accuracy and stability of the robot's operation.

[0111] The above are only preferred embodiments of the present invention, and the scope of the present invention is not limited thereto. Any equivalent structures or equivalent process transformations made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the protection scope of the present invention.

Claims

1. A robotic arm joint gravity compensation system based on current optimization, Its characteristics are: The system is composed of a first and a second angle sensor (31, 42), a matrix transformation module (32), a position sensor (33), a centroid vector module (34), a gravity compensation calculation module (35), a gravity vector module (36), an initial compensation module (37), a first and a second current sensor (38, 40), an interpolation current calculation module (39) and a particle optimization module (41). The basic mechanical parameters of the mechanical arm in the initial state are obtained by measuring and collecting with the first angle sensor (31), and the basic mechanical parameters are input into the matrix transformation module (32) to obtain the transformation matrix The center of mass coordinate X of each connecting rod is obtained by the position sensor (33). i , Y i , Z i And the horizontal coordinate X of the position where gravity acts g(i) and the ordinate Y g(i) , i is the number of links or joints in the robot; the center of mass coordinates of each link X i , Y i , Z i Input into the centroid vector module (34) to obtain the relative centroid vector P i ; Mass of each connecting rod m i With the transformation matrix Relative center of mass vector P i Input into the gravity compensation calculation module (35) to obtain the gravity moment ME i ; The horizontal coordinate X of the gravity position g(i) , vertical coordinate Y g(i) and gravity moment ME i Input into the gravity compensation module (36) to obtain the gravity vector The real-time current I is detected by the first current sensor (38). in The second angle sensor (42) detects the real-time working angle φ of each joint of the robot arm. i , the gravity vector Real-time current I in 、Real-time working angle φ i As well as the inertia matrix M(r) and the Coriolis force and centrifugal force matrices Input into the initial compensation module (37) to obtain the initial compensation current I com The second current sensor (40) detects the first, second and fourth joint measurement currents I 1 , I 2 , I 4 The corresponding joint selection angles Ai, Bj, Ck and working angle ranges A, B, C are input as input signals to the interpolation current calculation module (39) to obtain the initial current value I org , the initial current value I org With the set running current I set As the input of the particle optimization module (41), the optimal current compensation I g , the optimal current compensation I g and the initial compensation current I com Add together to get the final compensation current I final , to compensate for the gravity of the robot arm joints.

2. A mechanical arm joint gravity compensation system based on current optimization according to claim 1, Its characteristics are: The spatial coordinate systems of the base and each robotic arm are established respectively. The basic mechanical parameters include the coordinate axis z of the two adjacent spatial coordinate systems from the base to each robotic arm in the initial state of the robotic arm. i-1 With coordinate axis z i The angle α i , coordinate axis x i-1 With coordinate axis x i The angle θ i , coordinate axis z i-1 With coordinate axis z i Along the x axis i The distance a i , coordinate axis x i-1 With coordinate axis x i Along the coordinate axis z i-1 The distance d i ; The matrix transformation module (32) establishes the DH coordinate system and obtains the coordinate system O i-1 (x i-1 ,y i-1 ,z i-1 ) to coordinate system O i (x i ,y i ,z i ) 3. A mechanical arm joint gravity compensation system based on current optimization according to claim 1, Its characteristics are: The centroid vector module (34) is based on the formula P i =[X i Y i Z i 1] T Get the relative center of mass vector P i , T is the matrix transpose.

4. The mechanical arm joint gravity compensation system based on current optimization according to claim 3, Its characteristics are: gravity The vector module (36) first calculates the force arm Then calculate the gravity vector of each joint Finally, we get the gravity vector is the gravity vector for each joint.

5. The mechanical arm joint gravity compensation system based on current optimization according to claim 4, Its characteristics are: The initial compensation module (37) is based on the formula Calculate the joint torque vector τ, joint position vector r = [φ 1 φ 2 φ 3 φ 4 φ 5 φ 6 ] T , is the joint velocity vector, is the joint acceleration vector, T is the matrix transpose: According to the formula Calculate the torque constant K α , get the initial compensation current of the robot arm 6. The mechanical arm joint gravity compensation system based on current optimization according to claim 1, Its characteristics are: Within the working angle ranges A, B, and C of the first, second, and fourth joints, three angle values ​​are selected at each joint as the selected angles. The measurement positions of the three joints are combined into 27 measurement positions. The current data I is obtained after the current sensors of the motors of each axis are collected at the 27 measurement positions. i,j,k , for current data I i,j,k Interpolation is performed to obtain the initial current value I org .

7. The mechanical arm joint gravity compensation system based on current optimization according to any one of claims 1 to 6, Its characteristics are: The particle optimization module (41) calculates the initial current value I org With the set running current I set The particle swarm optimization algorithm is used for processing. The inertia weight in the particle swarm optimization algorithm is nums k Represents the current number of iterations, nums is the number of iterations, ω max The maximum inertia weight is, ω min is the minimum inertia weight.

8. The mechanical arm joint gravity compensation system based on current optimization according to claim 7, Its characteristics are: The velocity of the particles in the particle swarm optimization algorithm V k is the particle velocity after k iterations, C 1 , C 2 is the acceleration factor, r 1 and r 2 is a random number between 0 and 1; P k is the particle position after k iterations, is the historical optimal position of particle τ in the kth iteration, is the historical optimal position of the group in the kth iteration, and the shrinkage factor C=C 1 +C 2 .

9. The mechanical arm joint gravity compensation system based on current optimization according to claim 8, Its characteristics are: Use the evaluate_fitness function to calculate the fitness in the particle swarm optimization algorithm. The fitness function fitness is g(P k ,V k ,I org )=fitness+I set , g(P k ,V k ,I org ) is the current model function, which is obtained from the parameters of the working robot arm and the empirical formula.

10. The mechanical arm joint gravity compensation system based on current optimization according to claim 9, Its characteristics are: Optimum current I g = g(P k ,V k ,I org )-I set ,The last line of electricity I final =I com +I g .

Citation Information

Patent Citations

  • Electric current force control system and method for flexible multi-joint robot

    CN109202889A

  • Mechanical arm gravity compensation method and device, electronic equipment and storage medium

    CN116922399A

  • Method of controlling articulated robot

    JP2009061519A

Cited By

  • Robot control method and device, robot and storage medium

    CN121670691A