Disclosure of Invention
The invention provides a torque feedforward compensation method of a collaborative robot, and aims to solve the problem that the robot is difficult to meet the operation requirement of high progress due to errors in the following of the motion of each joint of the robot caused by the influence of factors such as inertia, gravity and the like in the motion process of the robot.
The invention is realized in such a way that a torque feedforward compensation method of a cooperative robot comprises the following steps:
s1: establishing robot actions and establishing robot motion coordinates;
s2: determining the motion rated position coordinates of the robot, the motion rated speed and acceleration of the robot, calculating the motion rated torque vector of the robot joint, and generating the motion track of the robot joint;
s3: acquiring the actual position coordinates of the robot joint movement, the speed and the acceleration value of the actual movement, and calculating the moment vector of the robot joint movement;
s4: calculating the feedforward values of inertia change and output moment output of the robot joint in the whole motion process according to the mechanical constant and the values obtained in the S2 and the S3;
s5: and superposing the calculated feedforward value of the torque output and the control output of the set value of the controller in the current loop, and transmitting the superposed control output to a motor for driving the robot joint to move.
Preferably, the establishing of the robot motion coordinate in S1 includes the following steps:
s11: establishing x, y and z three-dimensional coordinates according to the up-down, front-back and left-right directions of the robot;
s12: from the coordinate values that create the x, y and z three-dimensional coordinates.
Preferably, the rated moment vector for calculating the robot joint motion in S2 is calculated by using a lagrange equation.
Preferably, the specific calculation formula of the Lagrangian equation is
Wherein
、
And
respectively representing the position, the speed and the acceleration vector of the robot,
is a matrix of the inertia, and the inertia matrix,
is the vector of the Ge-type force and the centrifugal force,
representing the moment vectors applied to the various joints of the robot,
is the gravity term.
Preferably, in S3, the actual position coordinates of the robot joint motion and the speed and acceleration values of the actual motion are acquired, and are detected and acquired by the position sensor, the speed sensor and the acceleration sensor when the robot joint moves.
Preferably, the moment vector selection for robot joint motion calculated in S4The Lagrange equation is calculated by the following specific formula
Wherein
、
And
respectively representing the actual position, speed and acceleration vector of the robot after movement,
is a matrix of the inertia, and the inertia matrix,
is the vector of the Ge-type force and the centrifugal force,
representing the moment vectors applied to the various joints of the robot,
is the gravity term.
Preferably, the superposition period in S5 is 0.8ms
Compared with the prior art, the invention has the beneficial effects that: the invention relates to a moment feedforward compensation method of a collaborative robot, which comprises the steps of establishing a motion coordinate for the robot, calculating a rated moment vector of the robot joint motion according to the rated speed and acceleration of the robot motion, then obtaining the actual position coordinate of the robot joint motion, the actual motion speed and acceleration value, calculating the moment vector of the robot joint motion, then calculating the inertia change of the robot joint in the whole motion process and the feedforward value of output moment according to the mechanical constant and the obtained numerical value, superposing the calculated feedforward value of the moment output and the control output of the controller given value in a current loop, transmitting the superposed values to a motor for driving the robot joint motion, refreshing the moment feedforward value to a driver in microsecond-level period, greatly reducing the following error of the system on the basis of the same PID parameter, thereby improving the control accuracy of the system.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1-3, the present invention provides a technical solution: a method of torque feedforward compensation for a collaborative robot, the method comprising the steps of:
s1: establishing robot actions and establishing robot motion coordinates;
s2: determining the motion rated position coordinates of the robot, the motion rated speed and acceleration of the robot, calculating the motion rated torque vector of the robot joint, and generating the motion track of the robot joint;
s3: acquiring the actual position coordinates of the robot joint movement, the speed and the acceleration value of the actual movement, and calculating the moment vector of the robot joint movement;
s4: calculating the feedforward values of inertia change and output moment output of the robot joint in the whole motion process according to the mechanical constant and the values obtained in the S2 and the S3;
s5: and superposing the calculated feedforward value of the torque output and the control output of the set value of the controller in the current loop, and transmitting the superposed control output to a motor for driving the robot joint to move.
In the embodiment, by establishing a motion coordinate for the robot, a rated moment vector of the robot joint motion is calculated according to the rated speed and acceleration of the robot motion, then obtaining the actual position coordinates of the robot joint movement, the speed and the acceleration value of the actual movement, calculating the moment vector of the robot joint movement, then calculating the inertia change of the whole motion process of the robot joint and the feedforward value output by the output moment according to the mechanical constant and the obtained value, and the calculated feedforward value of the torque output is superposed with the control output of the given value of the controller in the current loop, and the torque is transmitted to a motor for driving the robot joint to move, a torque feedforward value is refreshed to a driver in a microsecond-level period, on the basis of the same PID parameter, the following error of the system is greatly reduced, and therefore the control precision of the system is improved.
Further, the establishing of the robot motion coordinate in S1 includes the following steps:
s11: establishing x, y and z three-dimensional coordinates according to the up-down, front-back and left-right directions of the robot;
s12: from the coordinate values that create the x, y and z three-dimensional coordinates.
In the present embodiment, by establishing three-dimensional coordinates for the robot, it is more convenient to represent the positions of the robot joint motions in the form of a matrix.
Further, the specific calculation formula of the Lagrangian equation is
Wherein
、
And
respectively representing the position, velocity and acceleration vectors of the robot,
is a matrix of the inertia, and the inertia matrix,
is the vector of the Ge-type force and the centrifugal force,
representing the moment vectors applied to the various joints of the robot,
is a gravity term;
and calculating the moment vector Lagrange equation of the robot joint motion in the step S4, wherein the specific calculation formula is
Wherein
、
And
respectively representing the actual position, speed and acceleration vector of the robot after movement,
is a matrix of the inertia, and the inertia matrix,
is the vector of the Ge-type force and the centrifugal force,
representing the moment vectors applied to the various joints of the robot,
is the gravity term.
In the present embodiment, in the specific calculation
、
And
all the motion extremes of the same robot joint are constants, and only the consideration needs to be specifically considered in the calculation of feedforward moment compensation
、
And
numerical values.
Further, in S3, the actual position coordinates of the robot joint motion, and the speed and acceleration values of the actual motion are obtained, and are detected and obtained by the position sensor, the speed sensor and the acceleration sensor when the robot joint moves.
In the embodiment, the position, the speed and the acceleration of the actual motion of the robot joint can be conveniently known by the feedforward compensation system in real time through the position sensor, the speed sensor and the acceleration sensor, and then the moment compensation of the robot joint motion is performed in time.
Further, the superimposing period in S5 is 0.8 ms.
In the embodiment, the moment compensation is performed in a period of 0.8ms, so that the following error of each joint of the robot can be suppressed in time, and the tracking accuracy of the robot is improved.
The working principle and the using process of the invention are as follows: before the robot moves, the feedforward torque compensation system establishes x, y and z three-dimensional coordinates according to the up-down, front-back and left-right directions of the robot, then establishes coordinate values of the x, y and z three-dimensional coordinates, then determines the rated position coordinates of the robot movement, the rated speed and acceleration of the robot movement according to the established robot movement, calculates the rated torque vector of the robot joint movement, then obtains the actual position coordinates of the robot joint movement, the actual movement speed and acceleration value by corresponding sensors, calculates the torque vector of the robot joint movement, calculates the inertia change of the whole movement process of the robot joint and the feedforward value of output torque by mechanical constants and the obtained values, superposes the calculated feedforward value of the output torque and the control output of the given value of the controller in a current loop, and transmits the superposed feedforward value and the control output to a motor for driving the robot joint to move, thereby compensating the moment of the robot joint movement.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.