CN115366115B - Mechanical arm control method and control system thereof and computer readable storage medium - Google Patents
Mechanical arm control method and control system thereof and computer readable storage medium Download PDFInfo
- Publication number
- CN115366115B CN115366115B CN202211300005.7A CN202211300005A CN115366115B CN 115366115 B CN115366115 B CN 115366115B CN 202211300005 A CN202211300005 A CN 202211300005A CN 115366115 B CN115366115 B CN 115366115B
- Authority
- CN
- China
- Prior art keywords
- motion
- mechanical arm
- speed
- motor
- control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000008569 process Effects 0.000 claims abstract description 20
- 239000012636 effector Substances 0.000 claims description 24
- 150000001875 compounds Chemical class 0.000 claims description 14
- 238000006073 displacement reaction Methods 0.000 claims description 14
- 239000011159 matrix material Substances 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 8
- 230000006870 function Effects 0.000 claims description 7
- 241001517013 Calidris pugnax Species 0.000 claims description 4
- 239000013641 positive control Substances 0.000 claims 1
- 230000002265 prevention Effects 0.000 claims 1
- 239000000126 substance Substances 0.000 description 7
- 230000001133 acceleration Effects 0.000 description 6
- 230000004888 barrier function Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000009795 derivation Methods 0.000 description 2
- 238000012938 design process Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000005381 potential energy Methods 0.000 description 2
- 241001123248 Arma Species 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000003032 molecular docking Methods 0.000 description 1
- 238000001356 surgical procedure Methods 0.000 description 1
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1656—Programme controls characterised by programming, planning systems for manipulators
- B25J9/1664—Programme controls characterised by programming, planning systems for manipulators characterised by motion, path, trajectory planning
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J13/00—Controls for manipulators
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1602—Programme controls characterised by the control system, structure, architecture
- B25J9/161—Hardware, e.g. neural networks, fuzzy logic, interfaces, processor
Abstract
The invention relates to a mechanical arm control method, which comprises the following steps: acquiring the current state of each motor on the mechanical arm; step two: setting a motion track of the mechanical arm; step three: setting a motion instruction of the mechanical arm according to the motion track; step four: sending the set motion instruction to the mechanical arm, and enabling the mechanical arm to respond and move; step five: and setting a mechanical arm movement stopping condition, judging the condition, and stopping the movement of the mechanical arm after the condition is met. Also included are robotic arm control systems and computer-readable storage media that implement the methods. The method directly executes the control of original state constraint on the robot motion; and the compensation control is designed, so that the robot joint can follow the given set position track and set speed with gradual and stable errors, and meanwhile, all signals in a control closed loop are bounded, namely all joint states cannot exceed a limit boundary, so that the problem of overshoot of the mechanical arm in the motion process is avoided, and the positioning precision and the tracking precision are improved.
Description
Technical Field
The present invention relates to the field of robot arm control, and more particularly, to a robot arm control method, a robot arm control system, and a computer-readable storage medium.
Background
With the development of the robot industry, surgical robots are developed to solve the difficult problems of high-difficulty and high-precision surgery in the medical industry. Particularly, surgical operations such as ophthalmic operations, which require precise operations, can be performed more safely and stably by replacing a human hand with a robot arm. In the medical industry, there are various kinds of auxiliary equipment such as surgical robots. However, the movement control planning route of some devices becomes a difficult problem, for example, the ophthalmic surgical robot needs to move the robot to the vicinity of the ocular surface of the patient and then perform the next operation, and if manual operation is used, the operation precision is difficult to control, so that a replaceable mechanical arm and an internal corresponding structural algorithm are urgently needed, however, the movement of the mechanical arm on the current market on a plane is easy to be limited, and the problem that a large error exists between the actual movement track and the set movement track exists.
In order to solve the problem of motion errors, in the prior art, the motion trajectory or the motion speed is often adjusted by introducing error compensation. But the accuracy of the motion is improved even after compensating for motion errors. However, when the mechanical arm is applied to an operation, due to the limited range of the operation and other damages caused by the out-of-range, when the adjustment is performed by error compensation under a fine motion trajectory, due to the problem of the amplitude of the error, the mechanical arm is easy to generate an overshoot problem in the motion process, and the positioning accuracy and the tracking accuracy of the mechanical arm are affected.
Disclosure of Invention
In order to overcome the problem of overshoot in the operation process of the robot in the prior art, the invention provides the mechanical arm control method, and the problem that the mechanical arm cannot overshoot is avoided.
In order to solve the technical problems, the invention adopts the technical scheme that: the method for controlling the mechanical arm comprises the steps that the corresponding seven-axis mechanical arm comprises two displacement degrees of freedom and 5 rotation degrees of freedom, wherein the first axis and the seventh axis are displacement degrees of freedom, and the second axis, the third axis, the fourth axis, the fifth axis and the sixth axis are rotation degrees of freedom. The first shaft, the second shaft, the third shaft, the fourth shaft, the fifth shaft, the sixth shaft and the seventh shaft respectively correspond to motors No. 1, no. 2, no. 3, no. 4, no. 5, no. 6 and No. 7. Six connecting rod motion through 1 to 6 motors carry out motion control to the arm, place end effector on 7 motors. The established coordinate system is expressed, and the displacement of the No. 1 motor is taken as the origin of the coordinate systemThe axis direction of the No. 1 motor is taken as a z axis, and the positive direction is upward; the direction of the connecting rod when the No. 2 motor is at 0 degree is taken as an x axis, and the positive direction faces to the right; the direction of the connecting rod with the motor No. 2 at 90 degrees is the y axis, and the positive direction is forward.
The control method comprises the following steps:
the method comprises the following steps: acquiring the current state of each motor on the mechanical arm;
step two: setting the motion track of the mechanical arm and setting the position of each joint of the mechanical armPlacing trackAnd velocity trajectory(ii) a In the present invention, i is expressed as a numerical value of the corresponding motor No. 1-6, such as when i =1, the position trajectoryThe position track of No. 1 motor, that is, the position track of No. 1 docking corresponding shutdown.
Step three: setting a motion instruction of the mechanical arm according to the motion track;
the second order kinetic equation of the servo system model of the robot arm is expressed in the form:
wherein the content of the first and second substances,is a matrix of the quality of the system,is the term for the coriolis force,is a gravitational potential energy term.The system is subjected to all forces and moments;,andthe angular position vector, the angular velocity vector and the angular acceleration vector of the electric drive mechanical arm joint are respectively.
Wherein the content of the first and second substances,the position, velocity and acceleration of the mechanical arm joint 1 are respectively;the angular positions, angular velocities and angular accelerations of the mechanical arm joints 2 to 6, respectively;
defining joint state variablesDefining a normal vector for the joint state constraint boundarySo that。
Writing the mechanical arm servo system into the following state space form:
the error vector of the mechanical arm servo system is as follows:
wherein the content of the first and second substances,is the position track of the mechanical arm joint,the velocity trajectory of the mechanical arm joint is shown;in order to be able to track the error in position,is the velocity following error.
The integral barrier lyapunov function V is as follows:
wherein the content of the first and second substances,,is a tiny normal number;is a positively determined monotonically decreasing function and is continuously derivable fromAnd is andis satisfied with a first derivative ofWhereinAndthe position tracking error of the robot mechanical arm joint can be finally converged gradually and stably.
wherein, the first and the second end of the pipe are connected with each other,
the design process of the controller by a reverse pushing method is as follows:
wherein, the first and the second end of the pipe are connected with each other,
the following speed controllers were designed:
wherein, the first and the second end of the pipe are connected with each other,the speed control gain parameter in positive number form has
The following Lyapunov equation containing the velocity following error was designed:
therefore, the motion controller based on the mechanical arm servo system model comprises the following components:
wherein, the first and the second end of the pipe are connected with each other,the control rate can effectively stabilize position and speed following errors and obtain the index stability of the system;the speed follows the transposed matrix of the error.
The motion controller of the mechanical arm servo system model sets the position track of each joint of the mechanical arm in the second stepAnd velocity trajectory(ii) a Reading the actual position of each joint of the mechanical arm by utilizing an encoderCalculating position tracking errorUsing position tracking errorsFor velocity traceCorrecting, receiving the feedback of speed signal, and outputting speed following error(ii) a Feedback derived position tracking errorAnd speed following errorForm a control outputSpeed feedback outputLocation of the jointAnd speed statusAnd the speed output of the motion controller forms a model compensation control outputFinally, use inGet control inputAnd obtaining a motion instruction for controlling the motor to move. The motion instruction can directly execute the control of original state constraint, namely, each joint of the mechanical arm can follow the given set position track with asymptotic stable errorAnd setting a velocity profileAnd meanwhile, all signals in a control closed loop are guaranteed to be bounded, namely all joint states cannot exceed a limit boundary.
The concrete demonstration is as follows:
lyapull Ruff equation designed for this inventionIn a beltCan obtain the product. In a clear view of the above, it is known that,is positively defined and continuously conductive.
For is toDerivative and substitute speed controllerAnd a motion controllerThe following can be obtained:
wherein the content of the first and second substances,
wherein the content of the first and second substances,representing the minimum eigenvalue of the matrix. In conclusion, the system is gradually stable, i.e. the system can execute the original state constraint and the exponential convergence.
The output position and the output speed of each joint motor of arm follow the limited range of error, specifically as follows:
in the formula (I), the compound is shown in the specification,representation matrixIs determined by the maximum characteristic value of the image,expressed as the Lyapull Ruff functionValue at initial time t = 0;
step four: sending the set motion instruction to the mechanical arm, and enabling the mechanical arm to respond and move;
step five: and setting mechanical arm movement stopping conditions, judging the conditions in the mechanical arm movement process, and stopping the mechanical arm movement after the conditions are met.
The robotic arm may move in a position mode and/or a velocity mode. The position mode is that the mechanical arm automatically moves according to the set track under the control of a program according to the movement instruction. The speed mode is that an operator manually sends a motion command to the mechanical arm in a set motion command range so as to enable the mechanical arm to move.
Preferably, in the second step, in the position mode, the process of acquiring the position track of each motor is as follows:
s1.1: acquiring coordinate information of a current end effector;
s1.2: and setting the motion trail of the tail end, and reversely deducing the motion trail of each joint motor.
Preferably, the specific process of S1.1 is as follows:
s1.1.1, recording encoder information of motors from 1 to 6 of the current mechanical arm:
the encoder values of the S1.1.2:1 to No. 6 motors are converted into the current motion positions of the motors:
the method for calculating the numerical value rotation angle of the encoder comprises the following steps:
s1.1.3, calculating a position matrix of a current coordinate system by using positive kinematics, wherein the specific form is as follows:
in the formula (I), the compound is shown in the specification,the displacement of the No. 1 motor on the z axis;the rotation angles of motors No. 2, no. 3, no. 4, no. 5 and No. 6 are respectively;the distance between the No. 2 motor and the No. 3 motor, the distance between the No. 3 motor and the No. 4 motor and the distance between the No. 4 motor and the No. 5 motor are respectively;
setting pointMotor positions of No. 1, 2, 3, 4, 5, 6 and 7 respectivelyPosition of end RCM point, passing pointMaking a perpendicular line of the plane of the mechanical arm and intersecting the point. Connection pointAnd withTwo points, passing pointsMake the connecting linePerpendicular lines of (A) are intersected at the point,Is a pointAnd pointThe distance of (d); passing pointMake a connectionPerpendicular lines of (A) are intersected at the point,Is a pointAnd withThe distance of (d);is a pointAnd withOf the distance of (c).
Is the length of the tip;the length of No. 2, no. 3, no. 4 and No. 5 motors on the z axis respectively.
Preferably, the specific process of S1.2 is as follows:
let the end-next motion cartesian coordinate system position be:
wherein the content of the first and second substances,the coordinate values of the terminal RCM point in the coordinate system,respectively is the connection line of the origin of the coordinate system and the RCM point at the tail end on the planeAngle formed by the projection of (a).
According to the following calculation, the process is as follows,is a set position track vector of the mechanical arm joint,
firstly, the motion angles of No. 5 and No. 6 motors under the set end coordinates can be obtained through the position coordinates:
the motion angles of the motors No. 2, no. 3 and No. 4 under the set terminal coordinates are obtained as follows:
Preferably, in the second step, in the speed mode, the motion command can be issued by the operating lever, and the steps of each control cycle of issuing the motion command by the operating lever are as follows:
(1) Acquiring the motion direction of a six-connecting-rod of a first motor to a six motor; the degrees of freedom in the operating rod correspond to the coordinate directions one by one, the encoder offset of the degrees of freedom in the operating rod at the moment is obtained and compared, and the direction corresponding to the maximum offset is the motion coordinate direction of the six-connecting-rod to be controlled next;
(2) Setting the gear of the movement speed of the six-connecting-rod, and judging whether the operating rod is mistakenly touched; three sections are divided according to the numerical range of the encoder in the operating rod, namely a stop gear [0, low ], a low gear [ low, high ] and a high gear [ high, max ]. Respectively comparing the offset of the obtained numerical value of the encoder of the operating rod with low and high, and if the offset is in a range of a stop gear, not performing motion control on the mechanical arm in the current operation, wherein the gear is used for avoiding motion control errors caused by mistaken touch of the operating rod; if the speed is in the low-speed gear range, setting the linear speed of the next end effector to be low speed vlow; if the speed is within the high-speed gear range, setting the moving linear speed of the next end effector as a high speed vhigh; during the control process of the operating rod, the function loop continuously carries out speed filing comparison and judgment on the offset of the encoder. Every time comparison and judgment is carried out, counting is carried out on the judgment, and the next motion control is allowed to be carried out only when the counting value reaches a certain set value;
(3) According to linear velocity of end effectorCalculating angular velocity of movement of the end effectorThe concrete form is as follows:
wherein r is the position vector of the end effector;
calculating the movement speed of each motor of the six-connecting rod in the following manner:
in the formula (I), the compound is shown in the specification,respectively the linear speeds of the end effector moving in the directions of x, y and z axes;the angular velocities of motion in the xy, xz and yz axis planes respectively;the speed tracks from No. 1 motor to No. 6 motor are respectively, and the value is converted into the encoder value of the movement speed of each motor.
Preferably, in step three, in the position mode, according to the positionDifferential calculation of set speed;
Preferably, in step four, in the position mode, for the joint state constraint boundaries, normal vector is definedSatisfies the conditionsCan do sports in time.
Under the speed mode, after meeting the set movement condition, making the mechanical arm move according to the control instruction; the exercise conditions were specifically as follows:
the first condition is as follows: defining a normal vector for the joint velocity limit boundarySo that. Correcting the speed of each motor in the third stepWith a set speed thresholdComparing, and moving when the speed is less than a set speed threshold;
and a second condition: calculating the time required for the position of each joint to reach the boundary positionMotion may be enabled when time is greater than zero.
The benefits of setting this motion condition are two: firstly, frequent position reading communication is replaced by rapid calculation, and control delay is reduced; secondly, the movement of the mechanical arm is ensured not to exceed the set safety range on the basis of the first point.
Preferably, in the step five, in the position mode, each motor of the mechanical arm completes the preset motion track; in the speed mode, the mechanical arm needs to track the motion of each motor in real time, so the following motion stop conditions are set in the control of the speed mode, and the motion stop conditions are specifically as follows:
starting timing after the motion control command is sent, and stopping motion when the motion time is more than or equal to the time for moving to the boundary position;
or the offset of the encoder in the operating rod is in the stop gear range, the operating rod is considered to be released, and the motion is stopped.
The benefits of setting this motion stop condition are two: firstly, the mechanical arm is effectively prevented from exceeding a set safety range; and secondly, the quick stop motion is realized in the remote control, the mechanical arm cannot shake due to slight mistaken touch of the hand, and the stability of the operation is improved.
A mechanical arm control system comprises a mechanical arm and electronic equipment, wherein the electronic equipment is electrically connected with the mechanical arm; the electronic device comprises a memory for storing a computer program and a processor for executing the computer program to implement the robot arm control method as described above.
A computer-readable storage medium for storing a computer program; wherein the computer program when executed by the processor implements a robot arm control method as described above.
Compared with the prior art, the beneficial effects are that: directly executing the control of original state constraint on the robot motion; and the compensation control is designed, so that the robot joint can follow the given set position track and set speed with a gradually stable error, and meanwhile, all signals in a control closed loop are bounded, namely all joint states cannot exceed a limit boundary, so that the problem of overshoot of the mechanical arm in the motion process is avoided, and the positioning precision and the tracking precision of the mechanical arm are improved.
Drawings
FIG. 1 is a schematic structural view of a seven-axis robotic arm of the present invention;
fig. 2 is a flowchart of a robot control method of the present invention.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent; for the purpose of better illustrating the embodiments, certain features of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted. The positional relationships depicted in the drawings are for illustrative purposes only and are not to be construed as limiting the present patent.
The same or similar reference numerals in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "long", "short", etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the drawings, it is only for convenience of description and simplicity of description, but does not indicate or imply that the device or element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and therefore, the terms describing the positional relationships in the drawings are only used for illustrative purposes and are not to be construed as limitations of the present patent, and specific meanings of the terms may be understood by those skilled in the art according to specific situations.
The technical scheme of the invention is further described in detail by the following specific embodiments in combination with the attached drawings:
example 1
Fig. 1-2 show an embodiment 1 of a robot arm control method, in which a corresponding seven-axis robot arm, as shown in fig. 1, includes two degrees of freedom of displacement and 5 degrees of freedom of rotation, where the first axis and the seventh axis are degrees of freedom of displacement, and the second axis, the third axis, the fourth axis, the fifth axis, and the fourth axis are degrees of freedom of displacementSix axes are rotational degrees of freedom. The first shaft, the second shaft, the third shaft, the fourth shaft, the fifth shaft, the sixth shaft and the seventh shaft respectively correspond to motors No. 1, no. 2, no. 3, no. 4, no. 5, no. 6 and No. 7. The mechanical arm is controlled by the movement of the six connecting rods of the No. 1 to No. 6 motors, and the No. 7 motor is provided with an end effector. The coordinate system expression is expressed by taking the displacement of the No. 1 motor as 0 as the origin of the coordinate systemThe axis direction of the No. 1 motor is taken as the z axis, and the positive direction is upward; the direction of the connecting rod when the No. 2 motor is at 0 degree is taken as an x axis, and the positive direction faces to the right; the direction of the connecting rod with the motor No. 2 at 90 degrees is the y axis, and the positive direction is forward.
The control method comprises the following steps:
the method comprises the following steps: acquiring the current state of each motor on the mechanical arm;
step two: setting the motion track of the mechanical arm and setting the position track of each joint of the mechanical armAnd velocity trajectory;
Step three: setting a motion instruction of the mechanical arm according to the motion track;
the second order kinetic equation of the servo system model of the robot arm is expressed in the form:
wherein, the first and the second end of the pipe are connected with each other,is a matrix of the quality of the system,is the term for the coriolis force,is a gravitational potential energy term.The system is subjected to all forces and moments;,and withThe angular position vector, the angular velocity vector and the angular acceleration vector of the electric drive mechanical arm joint are respectively.
The position, velocity and acceleration of the mechanical arm joint 1 are respectively;the angular positions, angular velocities and angular accelerations of the robot joints 2 to 6, respectively;
defining joint state variablesDefining a normal vector for the joint state constraint boundarySo that。
Writing the robot servo system into the following state space form:
the error vector of the mechanical arm servo system is as follows:
wherein, the first and the second end of the pipe are connected with each other,is a position track vector of a mechanical arm joint,the velocity trajectory of the mechanical arm joint is defined;in order to be able to track the error in position,to speed follow error.
The integral barrier lyapunov function V is as follows:
wherein, the first and the second end of the pipe are connected with each other,,is a tiny normal number;is a positively determined monotonically decreasing function and is continuously derivable fromAnd is andis satisfied withIn whichAndthe position tracking error of the robot mechanical arm joint is a normal number, so that the position tracking error of the robot mechanical arm joint can be gradually and stably converged finally.
wherein, the first and the second end of the pipe are connected with each other,
the design process of the controller by a reverse pushing method is as follows:
wherein, the first and the second end of the pipe are connected with each other,
the following speed controllers were designed:
wherein, the first and the second end of the pipe are connected with each other,the speed control gain parameter, in positive form, then has:
the following Lyapunov equation containing the velocity following error was designed:
therefore, the motion controller based on the mechanical arm servo system model comprises the following components:
in the formula (I), the compound is shown in the specification,,is a tiny normal number;so that;A speed control gain parameter in the form of a positive number;the control rate can effectively stabilize position and speed following errors and obtain the exponential stability of the system;is the transposed matrix of the velocity following error.
The output position and the output speed of each joint motor of the mechanical arm are limited by following the error, and the method specifically comprises the following steps:
in the formula (I), the compound is shown in the specification,representation matrixIs determined by the maximum characteristic value of (a),expressed as Lyapunov FunctionsValue at initial time t = 0.
The motion controller of the mechanical arm servo system model sets the position track of each joint of the mechanical arm in the second stepAnd velocity trajectory(ii) a Reading the actual position of each joint of the mechanical arm by using an encoderCalculating position tracking errorUsing position tracking errorsFor velocity locusCorrecting, receiving the feedback of speed signal, and outputting speed following error(ii) a Feedback derived position tracking errorAnd speed following errorForm a control outputSpeed feedback outputLocation of the jointAnd speed stateAnd the speed output of the motion controller forms a model compensation control outputFinally, useGet control inputAnd obtaining a motion instruction for controlling the motor to move. The motion instruction can directly execute the control of original state constraint, namely, each joint of the mechanical arm can follow the given set position track with asymptotically stable errorAnd setting the speedAnd meanwhile, all signals in a control closed loop are guaranteed to be bounded, namely all joint states cannot exceed a limit boundary.
In the present embodiment, the robot arm moves in a position mode, and the position locus of each jointThe acquisition process comprises the following steps:
s1.1: acquiring coordinate information of a current end effector;
s1.1.1, recording encoder information of motors from 1 to 6 of the current mechanical arm:
the encoder values of the S1.1.2:1 to No. 6 motors are converted into the current motion positions of the motors:
in the formula (I), the compound is shown in the specification,is the displacement of the No. 1 motor;the rotation angles of motors No. 2, no. 3, no. 4, no. 5 and No. 6 are respectively;
the method for calculating the numerical value rotation angle of the encoder comprises the following steps:
s1.1.3, calculating a position matrix of a current coordinate system by using positive kinematics, wherein the specific form is as follows:
in the formula (I), the compound is shown in the specification,the displacement of the No. 1 motor moving on the z axis;the rotation angles of motors No. 2, no. 3, no. 4, no. 5 and No. 6 are respectively;the distance between the No. 2 motor and the No. 3 motor, the distance between the No. 3 motor and the No. 4 motor and the distance between the No. 4 motor and the No. 5 motor are respectively;
setting pointNumber 1, 2, 3, 4, 5, 6, 7 motor positions and points respectivelyPosition of end RCM point, passing pointMaking the perpendicular line of the mechanical arm plane and intersecting at the point. Connection pointAndtwo points, passing pointsMake the connecting linePerpendicular lines of (A) are intersected at the point,Is a pointAnd pointThe distance of (a); passing pointMake a connectionPerpendicular lines of (A) are intersected at the point,Is a pointAnd withThe distance of (d);is a pointAnd withThe distance of (a);
is the length of the tip;the lengths of No. 2, no. 3, no. 4 and No. 5 motors on the z axis are respectively.
S1.2: setting a motion track of the tail end, and reversely deducing the motion track of each joint motor;
let the end-next motion cartesian coordinate system positions be:
firstly, the motion angles of No. 5 and No. 6 motors under the set end coordinates can be obtained through the position coordinates:
the motion angles of the motors No. 2, no. 3 and No. 4 under the set terminal coordinates are obtained as follows:
Step four: sending the set motion instruction to the mechanical arm, and enabling the mechanical arm to respond and move; in this embodiment, after the mechanical arm is judged to meet the set motion condition after meeting the motion condition, the mechanical arm is made to move according to the motion instruction; the motion conditions are as follows: defining normal vector for limiting boundary of joint stateSatisfies the conditionsThe mechanical arm can move.
Step five: and setting mechanical arm movement stopping conditions, judging the conditions in the mechanical arm movement process, and stopping the mechanical arm movement after the conditions are met. The stop condition of the mechanical arm is that each motor completes the motion track set in advance.
The beneficial effects of the embodiment: the mechanical arm can automatically move along the set motion track and motion instruction, and the motion of the robot is directly controlled by the original state constraint; and the compensation control is designed, so that the robot joint can follow the given set position track and set speed with gradual and stable errors, and meanwhile, all signals in a control closed loop are bounded, namely all joint states cannot exceed a limit boundary, so that the problem of overshoot of the mechanical arm in the motion process is avoided, and the positioning precision and the tracking precision of the mechanical arm are improved.
Example 2
Embodiment 2 of a robot arm control method, wherein the corresponding seven-axis robot armAs shown in fig. 1, the two degrees of freedom displacement and 5 degrees of freedom rotation are included, wherein the first axis and the seventh axis are degrees of freedom displacement, and the second axis, the third axis, the fourth axis, the fifth axis and the sixth axis are degrees of freedom rotation. The first shaft, the second shaft, the third shaft, the fourth shaft, the fifth shaft, the sixth shaft and the seventh shaft respectively correspond to motors No. 1, no. 2, no. 3, no. 4, no. 5, no. 6 and No. 7. The mechanical arm is controlled by the movement of the six connecting rods of the No. 1 to No. 6 motors, and the No. 7 motor is provided with an end effector. The established coordinate system is expressed, and the displacement of the No. 1 motor is taken as the origin of the coordinate systemThe axis direction of the No. 1 motor is taken as the z axis, and the positive direction is upward; the direction of the connecting rod when the No. 2 motor is at 0 degree is taken as an x axis, and the positive direction faces to the right; the direction of the connecting rod with the motor No. 2 at 90 degrees is the y axis, and the positive direction is forward.
The control method comprises the following steps:
the method comprises the following steps: acquiring the current state of each motor on the mechanical arm;
step two: setting the motion track of the mechanical arm and setting the position track of each joint of the mechanical armAnd velocity trajectory;
Step three: setting a motion instruction of the mechanical arm according to the motion track;
the motion controller based on the mechanical arm servo system model comprises the following components:
wherein, the first and the second end of the pipe are connected with each other,,is a tiny normal number;so that; A speed control gain parameter in positive form;the control rate can effectively stabilize position and speed following errors and obtain the index stability of the system;is the velocity following error.
The output position and the output speed of each joint motor of the mechanical arm are limited by following the error, and the method comprises the following steps:
in the formula (I), the compound is shown in the specification,representation matrixIs determined by the maximum characteristic value of the image,expressed as the Lyapull Ruff functionValue at initial time t = 0.
The operation of the mechanical arm servo system modelThe controller sets the position track of each joint of the mechanical arm in the second stepAnd velocity trajectory(ii) a Reading the actual position of each joint of the mechanical arm by utilizing an encoderCalculating position tracking errorUsing position tracking errorsFor velocity locusCorrecting, receiving the feedback of speed signal, and outputting speed following error(ii) a Feedback derived position tracking errorAnd speed following errorForm a control outputSpeed feedback outputLocation of the jointAnd speed statusAnd the speed output of the motion controller forms a model compensation control outputFinally, useGet control inputAnd obtaining a motion instruction for controlling the motor to move. The motion instruction can directly execute the control of original state constraint, namely, each joint of the mechanical arm can follow the given set position track with asymptotic stable errorAnd setting the speedAnd meanwhile, all signals in a control closed loop are guaranteed to be bounded, namely all joint states cannot exceed a limit boundary.
Specifically, in the speed mode, the motion command may be issued by the operation lever, and the steps of each control cycle of issuing the motion command by the operation lever are as follows:
(1) Acquiring the motion direction of a six-connecting-rod of a first motor to a sixth motor; the degrees of freedom in the operating rod correspond to the coordinate directions one by one, the encoder offset of the degrees of freedom in the operating rod at the moment is obtained and compared, and the direction corresponding to the maximum offset is the motion coordinate direction of the six-connecting-rod to be controlled next;
(2) Setting the gear of the movement speed of the six-connecting-rod, and judging whether the operating rod is mistakenly touched; three sections are divided according to the numerical range of the encoder in the operating rod, namely a stop gear [0, low ], a low gear [ low, high ] and a high gear [ high, max ]. Respectively comparing the offset of the acquired numerical value of the encoder of the operating rod with low and high, and if the numerical value is in a range of stopping a gear, not performing motion control on the mechanical arm on the current operation, wherein the gear is used for avoiding motion control errors caused by mistaken touch of the operating rod; if the speed is in the low-speed gear range, setting the linear speed of the next end effector to be low speed vlow; if the speed is within the high-speed gear range, setting the moving linear speed of the next end effector as a high speed vhigh; during the control process of the operating rod, the function loop continuously carries out speed filing comparison and judgment on the offset of the encoder. Every time a comparison judgment is carried out, counting is carried out on the judgment, and the next motion control is allowed to be carried out only when the counting value reaches a certain set value;
(3) According to linear velocity of end effectorCalculating the angular velocity of the movement of the end effectorThe concrete form is as follows:
wherein r is a position vector of the end effector;
calculating the movement speed of each motor of the six-connecting rod in the following manner:
in the formula (I), the compound is shown in the specification,respectively the linear speeds of the end effector moving in the directions of x, y and z axes;the angular velocities of motion in the xy, xz, yz axis planes, respectively;the speed tracks from No. 1 motor to No. 6 motor are respectively, and the value is converted into the encoder value of the movement speed of each motor.
Step four: sending the set motion instruction to the mechanical arm, and enabling the mechanical arm to respond and move; in this embodiment, after the mechanical arm is judged to meet the set motion condition after meeting the motion condition, the mechanical arm is made to move according to the motion instruction; the motion conditions are as follows: the first condition is as follows: defining a normal vector for the joint velocity limit boundarySo that. Correcting the speeds of the motors in the third stepWith a set speed thresholdComparing, and moving when the speed is less than a set speed threshold;
and (2) carrying out a second condition: calculating the position of each jointReach the boundary positionTime requiredMotion may be enabled when time is greater than zero.
The benefits of setting this motion condition are two: firstly, frequent position reading communication is replaced by rapid calculation, and control delay is reduced; secondly, the movement of the mechanical arm is ensured not to exceed the set safety range on the basis of the first point.
Step five: and setting a mechanical arm movement stopping condition, judging the condition in the mechanical arm movement process, and stopping the movement of the mechanical arm after the condition is met. The stopping conditions of the robot arm are specifically as follows:
starting timing after the motion control instruction is sent, and stopping motion when the motion time is more than or equal to the time of moving to the boundary position;
or the offset of the encoder in the operating rod is in the stop gear range, the operating rod is considered to be released, and the motion is stopped.
The benefits of setting this motion stop condition are two: firstly, the mechanical arm is effectively prevented from exceeding a set safety range; and secondly, quick stop motion is realized in remote control, the mechanical arm cannot shake due to slight mistaken touch of a hand, and the stability of operation is improved.
Compared with embodiment 1, the mechanical arm of the present embodiment adopts a speed mode to move, and the speed mode is that an operator manually sends a motion instruction to the mechanical arm in a set motion instruction range so as to make the mechanical arm move, so that a flexible operation mode is provided for a user.
Example 3
An embodiment 3 of a robot arm control method is based on embodiments 1 and 2, and combines embodiments 1 and 1, and the robot arm control method can adopt a position mode or can be switched to a speed mode.
Compared with embodiment 1 or embodiment 2, this embodiment has two motion modes, and a user can select a corresponding motion mode to control the robot arm according to actual conditions, so that the actual use is more flexible.
Example 4
An embodiment of a robotic arm control system includes a robotic arm and an electronic device electrically connected to the robotic arm; the electronic device comprises a memory for storing a computer program and a processor for executing the computer program to implement the robot arm control method of any of the above embodiments.
Example 5
A computer-readable storage medium for storing a computer program; wherein the computer program when executed by the processor implements the robot arm control method of any of the above embodiments.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.
Claims (10)
1. A mechanical arm control method is characterized by comprising the following steps:
the method comprises the following steps: acquiring the current state of each motor on the mechanical arm;
step two: setting the motion track of the mechanical arm, and setting the position track of each joint of the mechanical armAnd velocity trajectory;
Step three: setting a motion instruction of the mechanical arm according to the motion track; according to the position trackAnd velocity trajectoryReading the actual position of each joint of the mechanical arm by using an encoderCalculating the bitError of position trackingUsing position tracking errorsFor velocity traceCorrecting, receiving feedback of speed signal, and outputting speed following error(ii) a Feedback derived position tracking errorAnd speed following errorForm a control outputSpeed feedback outputLocation of the jointAnd speed stateAnd the speed output of the motion controller forms a model compensation control outputFinally, use inGet control inputAnd obtaining a motion command for controlling the motor to move, wherein the specific representation form is as follows:
in the formula (I), the compound is shown in the specification,is a tiny normal number;so thatA speed control gain parameter in the form of a positive number; the method is a set of positive control gain parameters, and can effectively stabilize position and speed following errors and obtain the index stability of the system;is the transposed matrix of the velocity following error;
the output position and the output speed of each joint motor of the mechanical arm are limited by following the error, and the method comprises the following steps:
in the formula (I), the compound is shown in the specification,representation matrixIs determined by the maximum characteristic value of (a),expressed as the Lyapull Ruff functionValue at initial time t = 0;
step four: sending the set motion instruction to the mechanical arm, and enabling the mechanical arm to respond and move;
step five: and setting mechanical arm movement stopping conditions, judging the conditions in the mechanical arm movement process, and stopping the mechanical arm movement after the conditions are met.
2. The method according to claim 1, wherein in said second step, the robot arm moves in a position mode, and the locus of the position of each joint is determinedThe acquisition process comprises the following steps:
s1.1: acquiring coordinate information of a current end effector;
s1.2: and setting the motion trail of the tail end, and reversely pushing the motion trail of each joint motor.
3. The method for controlling the mechanical arm according to claim 2, wherein the specific process of S1.1 is as follows:
s1.1.1, recording encoder information of motors from 1 to 6 of the current mechanical arm:
the encoder values of the No. S1.1.2:1 to No. 6 motors are converted into the current motion positions of the motors:
in the formula (I), the compound is shown in the specification,the displacement of the No. 1 motor on the z axis;the rotation angles of No. 2, no. 3, no. 4, no. 5 and No. 6 motors respectively;
the method for calculating the numerical value rotation angle of the encoder comprises the following steps:
s1.1.3, calculating a position matrix of a current coordinate system by using positive kinematics, wherein the specific form is as follows:
in the formula (I), the compound is shown in the specification,the displacement of the No. 1 motor moving on the z axis;the rotation angles of No. 2, no. 3, no. 4, no. 5 and No. 6 motors respectively;the distance between the No. 2 motor and the No. 3 motor, the distance between the No. 3 motor and the No. 4 motor and the distance between the No. 4 motor and the No. 5 motor are respectively;
setting pointMotor positions of No. 1, 2, 3, 4, 5, 6 and 7 respectivelyPosition of end RCM point, passing pointMaking the perpendicular line of the mechanical arm plane and intersecting at the point(ii) a Connection pointAnd withTwo points, passing pointsMake a connectionPerpendicular lines of (A) are intersected at the point,Is a pointAnd pointThe distance of (a); passing pointMake a connectionPerpendicular lines of (A) are intersected at the point,Is a pointAndthe distance of (a);is a pointAndthe distance of (d);
4. The method for controlling a robot arm according to claim 3, wherein the specific process of S1.2 is as follows:
let the end-next motion cartesian coordinate system position be:
firstly, the motion angles of No. 5 and No. 6 motors under the set terminal coordinates can be obtained through the position coordinates:
the motion angles of the motors No. 2, no. 3 and No. 4 under the set terminal coordinates are obtained as follows:
5. The robot control method according to claim 4, wherein in the case where the robot arm moves in the position mode, in the fourth step, the robot arm is moved in accordance with the movement instruction after the set movement condition is satisfied; the motion conditions are as follows: defining normal vector for limiting boundary of joint stateSatisfies the conditionsThe mechanical arm can move.
6. The robot arm control method according to any one of claims 1 to 5, wherein in the second step, the robot arm is moved in a velocity mode, the set movement command is performed by the operation lever, and the step of performing each control cycle of the movement command by the operation lever is as follows:
(1) Acquiring the motion direction of a six-connecting-rod of a first motor to a six motor; the degrees of freedom in the operating rod correspond to the coordinate directions one by one, the encoder offset of the degrees of freedom in the operating rod at the moment is obtained and compared, and the direction corresponding to the maximum offset is the motion coordinate direction of the six-connecting-rod to be controlled next;
(2) Setting the gear of the movement speed of the six connecting rods, and judging the mistaken touch prevention of the operating rod; dividing three intervals into stop gears [0, low ], low-speed gears [ low, high ] and high-speed gears [ high, max ] according to the numerical range of the encoder in the operating rod; respectively comparing the offset of the obtained numerical value of the encoder of the operating rod with low and high, and if the offset is in a range of a stop gear, not performing motion control on the mechanical arm in the current operation, wherein the gear is used for avoiding motion control errors caused by mistaken touch of the operating rod; if the speed is in the low-speed gear range, setting the linear speed of the next end effector to be low speed vlow; if the speed is in the high-speed gear interval, setting the motion linear speed of the next end effector to be high-speed vhigh; in the control process of the operating rod, the offset of the encoder is continuously compared and judged by speed filing in the function cycle; every time comparison and judgment is carried out, counting is carried out on the judgment, and the next motion control is allowed to be carried out only when the counting value reaches a certain set value;
(3) According to linear velocity of end effectorCalculating the angular velocity of the movement of the end effectorThe concrete form is as follows:
wherein r is the position vector of the end effector;
calculating the movement speed of each motor of the six-connecting rod in the following manner:
in the formula (I), the compound is shown in the specification,the linear velocities of the end effector moving in the directions of the x axis, the y axis and the z axis respectively;the angular velocities of motion in the xy, xz and yz axis planes respectively;the speed tracks from No. 1 motor to No. 6 motor are respectively, and the value is converted into the encoder value of the movement speed of each motor.
7. The method according to claim 6, wherein in the third step, in a case where the robot arm moves in the speed mode, the robot arm is moved in accordance with the movement instruction after a predetermined movement condition is satisfied; the exercise conditions were specifically as follows:
the first condition is as follows: defining a normal vector for the joint velocity limit boundarySo that(ii) a Correcting the speeds of the motors in the third stepAnd a set speed thresholdTo carry outComparing, and performing movement when the speed is less than a set speed threshold;
8. The robot arm control method according to claim 6, wherein the motion stop conditions are as follows:
starting timing after the motion control command is sent, and stopping motion when the motion time is more than or equal to the time for moving to the boundary position;
or the offset of the encoder in the operating rod is in the stop gear range, the operating rod is considered to be released, and the motion is stopped.
9. The mechanical arm control system is characterized by comprising a mechanical arm and electronic equipment, wherein the electronic equipment is electrically connected with the mechanical arm; the electronic device comprises a memory for storing a computer program and a processor for executing the computer program to implement the robot arm control method according to any of claims 1-8.
10. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by the processor, implements the robot arm control method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211300005.7A CN115366115B (en) | 2022-10-24 | 2022-10-24 | Mechanical arm control method and control system thereof and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211300005.7A CN115366115B (en) | 2022-10-24 | 2022-10-24 | Mechanical arm control method and control system thereof and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115366115A CN115366115A (en) | 2022-11-22 |
CN115366115B true CN115366115B (en) | 2023-01-13 |
Family
ID=84074395
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211300005.7A Active CN115366115B (en) | 2022-10-24 | 2022-10-24 | Mechanical arm control method and control system thereof and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115366115B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117549316B (en) * | 2024-01-12 | 2024-03-12 | 唐山先河智能机器有限公司 | Multi-axis mechanical arm control method and master-slave control system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111152225A (en) * | 2020-01-15 | 2020-05-15 | 北京科技大学 | Uncertain mechanical arm fixed time trajectory tracking control method with input saturation |
CN114310914A (en) * | 2022-02-15 | 2022-04-12 | 南开大学 | Fuzzy self-adaptive iterative trajectory tracking control method and system for multi-degree-of-freedom mechanical arm |
CN114986498A (en) * | 2022-05-18 | 2022-09-02 | 佛山汇真科技有限公司 | Mobile operation arm cooperative control method |
CN115202216A (en) * | 2022-09-14 | 2022-10-18 | 沈阳工业大学 | Anti-interference finite time control method of mechanical arm considering input constraint |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6347595B2 (en) * | 2013-11-25 | 2018-06-27 | キヤノン株式会社 | Robot control method and robot control apparatus |
-
2022
- 2022-10-24 CN CN202211300005.7A patent/CN115366115B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111152225A (en) * | 2020-01-15 | 2020-05-15 | 北京科技大学 | Uncertain mechanical arm fixed time trajectory tracking control method with input saturation |
CN114310914A (en) * | 2022-02-15 | 2022-04-12 | 南开大学 | Fuzzy self-adaptive iterative trajectory tracking control method and system for multi-degree-of-freedom mechanical arm |
CN114986498A (en) * | 2022-05-18 | 2022-09-02 | 佛山汇真科技有限公司 | Mobile operation arm cooperative control method |
CN115202216A (en) * | 2022-09-14 | 2022-10-18 | 沈阳工业大学 | Anti-interference finite time control method of mechanical arm considering input constraint |
Also Published As
Publication number | Publication date |
---|---|
CN115366115A (en) | 2022-11-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109159151B (en) | Mechanical arm space trajectory tracking dynamic compensation method and system | |
US9764462B2 (en) | Robot apparatus and robot controlling method | |
EP0086950B1 (en) | Method of controlling an industrial robot | |
US8600554B2 (en) | System and method for robot trajectory generation with continuous accelerations | |
CN110900612B (en) | Pose-synchronous six-axis industrial robot track smoothing method | |
CN113601512B (en) | General avoidance method and system for singular points of mechanical arm | |
CN108908347B (en) | Fault-tolerant repetitive motion planning method for redundant mobile mechanical arm | |
CN108189034B (en) | Method for realizing continuous track of robot | |
CN115366115B (en) | Mechanical arm control method and control system thereof and computer readable storage medium | |
CN111775145B (en) | Control system of serial-parallel robot | |
US20180250816A1 (en) | Control system, setting device, setting method, and storage device | |
JPWO2002066210A1 (en) | Robot controller | |
CN111515928B (en) | Mechanical arm motion control system | |
CN115723137A (en) | Compliant task control method based on plane constant force | |
CN112405531B (en) | Position domain impedance control method and device, storage medium and operation robot | |
CN114131617A (en) | Intelligent compliance control method and device for industrial robot | |
CN116494250A (en) | Mechanical arm control method, controller, medium and system based on speed compensation | |
JP2020171989A (en) | Robot teaching system | |
CN114260896B (en) | Flexible force control method and system for cooperative robot | |
CN110039511B (en) | 8-axis linkage robot and control system and control method thereof | |
CN115808904A (en) | Industrial robot arc auxiliary point passing track planning method | |
CN116276995B (en) | Impedance control-based man-machine cooperation method with zero-space obstacle avoidance capability | |
CN117506937B (en) | Weldment autonomous placement method based on multi-stage visual servo control | |
CN111687822B (en) | Double-robot guiding track multi-space self-adaptive interpolation method | |
WO2020145403A1 (en) | Control device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A robotic arm control method and its control system and computer-readable storage medium Effective date of registration: 20231011 Granted publication date: 20230113 Pledgee: Bank of China Co.,Ltd. Nansha Branch of Guangdong Free Trade Pilot Area Pledgor: Guangzhou Weimou Medical Instrument Co.,Ltd. Registration number: Y2023980060743 |