CN111037560B - A collaborative robot compliance force control method and system - Google Patents
A collaborative robot compliance force control method and system Download PDFInfo
- Publication number
- CN111037560B CN111037560B CN201911358551.4A CN201911358551A CN111037560B CN 111037560 B CN111037560 B CN 111037560B CN 201911358551 A CN201911358551 A CN 201911358551A CN 111037560 B CN111037560 B CN 111037560B
- Authority
- CN
- China
- Prior art keywords
- robot
- coordinate system
- joint
- force
- representing
- 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 56
- 239000011159 matrix material Substances 0.000 claims abstract description 104
- 238000005457 optimization Methods 0.000 claims abstract description 41
- 238000003062 neural network model Methods 0.000 claims abstract description 15
- 239000012636 effector Substances 0.000 claims description 24
- 238000006073 displacement reaction Methods 0.000 claims description 14
- 239000013641 positive control Substances 0.000 claims description 14
- 238000009795 derivation Methods 0.000 claims description 10
- 238000011217 control strategy Methods 0.000 claims description 7
- 230000001133 acceleration Effects 0.000 claims description 5
- 230000009977 dual effect Effects 0.000 claims description 5
- 238000010606 normalization Methods 0.000 claims description 5
- 230000006870 function Effects 0.000 description 47
- 238000004364 calculation method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 239000003607 modifier Substances 0.000 description 3
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 2
- 238000005094 computer simulation Methods 0.000 description 2
- 238000005265 energy consumption Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000003860 storage Methods 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 1
- 230000005021 gait Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 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/1628—Programme controls characterised by the control loop
- B25J9/1633—Programme controls characterised by the control loop compliant, force, torque control, e.g. combined with position control
-
- 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/1605—Simulation of manipulator lay-out, design, modelling of manipulator
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Robotics (AREA)
- Mechanical Engineering (AREA)
- Automation & Control Theory (AREA)
- Manipulator (AREA)
Abstract
本发明公开了一种协作机器人柔顺力控制方法及系统,其中,所述方法包括:获得机器人的状态变量并进行初始化;基于初始化状态变量获得当前旋转矩阵;基于当前旋转矩阵读取所述机器人的当前状态反馈信息;基于当前状态反馈信息构建实现柔顺力控制的等式约束以及机器人系统内的关节角度、关节角速度与关节力矩的不等式约束;对关节力矩函数进行改写,并获得最终的约束优化模型;基于动态神经网络模型更新最终的约束优化模型中的状态变量和控制力矩;判断当前时间是否大于任务时间,若是,结束柔顺力控制,反之,返回获得当前旋转矩阵。在本发明实施例中,能够同时实现接触力方向的高精度力控制以及自由运动方向上的运动控制。
The invention discloses a compliance force control method and system for a collaborative robot, wherein the method includes: obtaining a state variable of a robot and initializing it; obtaining a current rotation matrix based on the initialization state variable; reading the robot's state variable based on the current rotation matrix Current state feedback information; based on the current state feedback information, construct the equality constraints to realize compliance force control and the inequality constraints of joint angle, joint angular velocity and joint torque in the robot system; rewrite the joint torque function and obtain the final constraint optimization model ; Update the state variables and control torque in the final constrained optimization model based on the dynamic neural network model; judge whether the current time is greater than the task time, if so, end the compliance force control, otherwise, return to obtain the current rotation matrix. In the embodiment of the present invention, high-precision force control in the direction of the contact force and motion control in the direction of free movement can be simultaneously achieved.
Description
技术领域technical field
本发明涉及机器人的智能控制技术领域,尤其涉及一种协作机器人柔顺力控制方法及系统。The invention relates to the technical field of intelligent control of robots, in particular to a method and system for controlling the compliance force of a collaborative robot.
背景技术Background technique
协作机器人是一种能够与人类在共同工作空间内协同工作的机器人。协作机器人能够直接和人类员工一起并肩工作而无需使用安全围栏进行隔离,且具有产线部署快速、任务切换简单、人机友好性好等特点,在医疗护理、轻工装配、电子信息以及家庭服务等领域有广阔的应用前景,被认为是实现“工业4.0”与“智能制造2025”的重要载体。A collaborative robot is a robot that can work together with humans in a co-working space. Collaborative robots can directly work side by side with human employees without using safety fences for isolation, and have the characteristics of rapid production line deployment, simple task switching, and good human-machine friendliness. It has broad application prospects in other fields, and is considered to be an important carrier for the realization of "Industry 4.0" and "Intelligent Manufacturing 2025".
协作机器人进入实际应用最重要的前提是实现“人机共融”,其中提高系统的柔顺性尤为重要。力控制可以提升系统的柔顺性,增强人机交互,提供智能响应,使机器人在弱结构化、非结构化环境中自主操作。因此其应用领域更加广泛,例如柔性装配、双臂协调操作、人机交互、灵巧手抓取物体、足式机器人步态控制等。针对冗余机器人力控制的研究具有极强的应用价值与现实意义。The most important prerequisite for collaborative robots to enter practical applications is to achieve "human-machine integration", in which it is particularly important to improve the flexibility of the system. Force control can improve the flexibility of the system, enhance human-robot interaction, provide intelligent responses, and enable robots to operate autonomously in weakly structured and unstructured environments. Therefore, its application fields are more extensive, such as flexible assembly, coordinated operation of two arms, human-computer interaction, grasping objects with dexterous hands, and gait control of footed robots. The research on redundant robot force control has strong application value and practical significance.
现有针对具有冗余自由度的协作机器人的力控制方法,主要是基于机器人雅克比矩阵的伪逆计算实现;但是这种方法普遍存在以下问题:1)对雅克比矩阵的伪逆计算导致计算成本过高;2)难以处理系统的物理约束。The existing force control methods for collaborative robots with redundant degrees of freedom are mainly based on the pseudo-inverse calculation of the Jacobian matrix of the robot; however, this method generally has the following problems: 1) The pseudo-inverse calculation of the Jacobian matrix leads to the calculation of Excessive cost; 2) Difficult to deal with the physical constraints of the system.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于克服现有技术的不足,本发明提供了一种协作机器人柔顺力控制方法及系统,能够同时实现接触力方向的高精度力控制以及自由运动方向上的运动控制,能够实现对关节力矩的在线优化,能够在柔顺力控制过程中保证机器人不超过其物理约束。The purpose of the present invention is to overcome the deficiencies of the prior art. The present invention provides a method and system for controlling the compliance force of a collaborative robot, which can simultaneously realize high-precision force control in the direction of contact force and motion control in the direction of free movement, and can realize the The online optimization of joint torque can ensure that the robot does not exceed its physical constraints during the compliance force control process.
为了解决上述技术问题,本发明实施例提供了一种协作机器人柔顺力控制方法,所述方法包括:In order to solve the above technical problems, an embodiment of the present invention provides a method for controlling the compliance force of a collaborative robot, the method comprising:
获得机器人的状态变量并进行初始化;Get the state variables of the robot and initialize them;
基于初始化状态变量获得当前旋转矩阵;Obtain the current rotation matrix based on the initialized state variable;
基于所述当前旋转矩阵读取所述机器人的当前状态反馈信息;Read the current state feedback information of the robot based on the current rotation matrix;
基于所述当前状态反馈信息构建实现柔顺力控制的等式约束以及机器人系统内的关节角度、关节角速度与关节力矩的不等式约束;Constructing equality constraints to realize compliance force control and inequality constraints of joint angles, joint angular velocities and joint moments in the robot system based on the current state feedback information;
对关节力矩函数进行改写,并获得最终的约束优化模型;Rewrite the joint moment function and obtain the final constraint optimization model;
基于动态神经网络模型更新最终的约束优化模型中的状态变量和控制力矩;Update the state variables and control torques in the final constrained optimization model based on the dynamic neural network model;
判断当前时间是否大于任务时间,若是,结束对所述机器人的柔顺力控制,反之,返回基于初始化状态变量获得当前旋转矩阵。Determine whether the current time is greater than the task time, and if so, end the compliance control of the robot, otherwise, return to obtain the current rotation matrix based on the initialization state variable.
可选的,所述获得机器人的状态变量并进行初始化之前,还包括:Optionally, before obtaining and initializing the state variables of the robot, the method further includes:
针对所述机器人运动与工件之间的接触力的正交特点,在工具坐标系和基座标系内进行分别建模,获得机器人运动建模系统;Aiming at the orthogonal characteristics of the contact force between the robot motion and the workpiece, modeling is carried out in the tool coordinate system and the base coordinate system respectively to obtain a robot motion modeling system;
其中,基座标系的表示R0(x0,y0,z0);工具坐标系的表示Rt(xt,yt,zt)。Among them, the base coordinate system represents R 0 (x 0 , y 0 , z 0 ); the tool coordinate system represents R t (x t , y t , z t ).
可选的,所述机器人与工件之间的接触力与所述工具坐标系中的zt平行,同时xt与yt定义了所述机器人末端执行器的自由运动;Optionally, the contact force between the robot and the workpiece is parallel to z t in the tool coordinate system, while x t and y t define the free movement of the robot end effector;
在所述机器人操作过程中,所述机器人末端执行器实际位置x与期望轨迹xd存在一微小偏差,在所述基座标系R0(x0,y0,z0)和所述工具坐标系Rt(xt,yt,zt)下分别描述为所述机器人在基座标系下的与期望轨迹的偏差δX和所述机器人在工具坐标系下的与期望轨迹的偏差δXt。During the operation of the robot, there is a slight deviation between the actual position x of the robot end effector and the expected trajectory x d . The coordinate system R t (x t , y t , z t ) is described as the deviation δX of the robot from the desired trajectory under the base frame and the deviation δX of the robot from the desired trajectory under the tool coordinate system, respectively t .
可选的,所述在工具坐标系和基座标系内进行分别建模,获得机器人运动建模系统的过程如下:Optionally, separately modeling is performed in the tool coordinate system and the base coordinate system, and the process of obtaining the robot motion modeling system is as follows:
在所述工具坐标系Rt(xt,yt,zt)下由于忽略所述机器人与所述工件之间的摩擦,假设所述机器人与所述工件之间的接触为刚度接触,则所述接触力可以描述为:In the tool coordinate system R t (x t , y t , z t ), since the friction between the robot and the workpiece is ignored, assuming that the contact between the robot and the workpiece is a rigid contact, then The contact force can be described as:
Ft=kf∑tδXt; (1)F t =k f ∑ t δX t ; (1)
其中,kf表示刚度系数;∑t=diag(0,0,1)为一个对角矩阵,用于描述所述机器人在工具坐标系下的与期望轨迹的偏差δXt与其接触力之间的关系,其中,0表示在该方向上的位移不会产生接触力,反之取1;Among them, k f represents the stiffness coefficient; ∑ t =diag(0,0,1) is a diagonal matrix, which is used to describe the deviation δX t of the robot from the desired trajectory in the tool coordinate system and its contact force. relationship, where 0 means that the displacement in this direction will not generate contact force, otherwise, take 1;
定义则在所述工具坐标系Rt(xt,yt,zt)下的位置跟踪误差et为:definition Then the position tracking error e t under the tool coordinate system R t (x t , y t , z t ) is:
在接触面已知的情况下,使用一个旋转矩阵St描述所述工具坐标系Rt(xt,yt,zt)和基座标系R0(x0,y0,z0)之间的旋转关系;When the contact surface is known, a rotation matrix S t is used to describe the tool coordinate system R t (x t , y t , z t ) and the base frame R 0 (x 0 , y 0 , z 0 ) The rotation relationship between;
定义F和e0分别为所述基座标系R0(x0,y0,z0)下δXt与Ft的对应描述,则有:Define F and e 0 as the corresponding descriptions of δX t and F t under the base frame R 0 (x 0 , y 0 , z 0 ), respectively, then there are:
et=Ste0; (4)e t =S t e 0 ; (4)
δXt=StδX; (5)δX t =S t δX; (5)
通过公式(1)-(5)的联立,则有:Through the combination of formulas (1)-(5), we have:
其中,δX表示所述机器人在所述基座标系R0(x0,y0,z0)下的与期望轨迹的偏差;F表示在基座标系R0(x0,y0,z0)下的接触力;Wherein, δX represents the deviation of the robot from the expected trajectory under the base frame R 0 (x 0 , y 0 , z 0 ); F represents the base frame R 0 (x 0 , y 0 , contact force at z 0 );
在基座标系R0(x0,y0,z0)中位移δX可以描述为δX=x-xd,其中,期望轨迹xd是R0中描述的期望位置信号,因此,对公式(6)-(7)重写为:The displacement δX in the base frame R 0 (x 0 , y 0 , z 0 ) can be described as δX=xx d , where the desired trajectory x d is the desired position signal described in R 0 , therefore, for formula (6 )-(7) is rewritten as:
定义所述机器人的期望轨迹和指令力分别为xd和Fd;则根据公式(5)与公式(9)的描述,控制目标可以描述为设计面向冗余机器人的位置-来控制策略,使公式(8)描述的接触力F→Fd,同时使公式(9)描述的跟踪误差e0→0;∑t表示描述接触的参数矩阵;表示描述运动的参数矩阵。Define the desired trajectory and command force of the robot as x d and F d respectively; then according to the description of formula (5) and formula (9), the control objective can be described as designing a position-oriented control strategy for redundant robots, so that Contact force F→F d described by formula (8), while making the tracking error e 0 described by formula (9) → 0; ∑ t represents the parameter matrix describing the contact; Represents a matrix of parameters describing motion.
可选的,所述机器人运动建模系统中为了简化描述,则定义 rd=[Fd;0],则有公式(8)和公式(9)重写为:Optionally, in the robot motion modeling system, in order to simplify the description, define r d =[F d ; 0], Then there are formulas (8) and (9) rewritten as:
A(f(θ)-xd)=r; (10)A(f(θ)-x d )=r; (10)
所述控制目标描述为通过设计关节,使r=rd;∑t表示描述接触的参数矩阵;表示描述运动的参数矩阵。The control objective is described by designing joints so that r=r d ; ∑ t represents the parameter matrix describing the contact; Represents a matrix of parameters describing motion.
可选的,所述基于所述当前状态反馈信息构建实现柔顺力控制的等式约束,包括:Optionally, the constructing an equation constraint for realizing compliance force control based on the current state feedback information includes:
在机器人运动建模系统下获得的当前状态反馈信息,对给定的期望轨迹xd与接触力Ft,实现位置-来控制的目标为:The current state feedback information obtained under the robot motion modeling system, for a given desired trajectory x d and contact force F t , the goal of achieving position-to-control is:
则定义误差向量:Then define the error vector:
e=r-rd=[F-Fd;e0]; (16)e=rr d =[FF d ; e 0 ]; (16)
则等式可以在速度层重建为如下形式:Then the equation can be reconstructed in the velocity layer as follows:
其中,k表示一正控制常数;表示所述机器人的关节角速度;表示误差向量的一阶导数;表示期望轨迹的一阶导数;表示rd的一阶导数,rd=[Fd;0],Fd表示机器人的力指令。Among them, k represents a positive control constant; represents the joint angular velocity of the robot; represents the first derivative of the error vector; represents the first derivative of the desired trajectory; Represents the first derivative of r d , r d =[F d ; 0], F d represents the force command of the robot.
可选的,所述机器人系统内的关节角度、关节角速度与关节力矩的不等式约束,包括:Optionally, the inequality constraints of joint angles, joint angular velocities and joint moments in the robot system include:
将不等式约束归一化描述为速度层的不等式约束:其中, The inequality constraint normalization is described as the inequality constraint of the velocity layer: in,
则关节力矩的不等式约束可以重写为:Then the inequality constraints for joint moments can be rewritten as:
其中,β>0,则对当末端执行器与工件的在基座标系R0(x0,y0,z0)下接触力为F时,其在各关节处施加的作用力矩的表达式求导可得:Among them, β>0, when the contact force between the end effector and the workpiece under the base frame R 0 (x 0 , y 0 , z 0 ) is F, the expression of the acting torque applied at each joint The derivative can be obtained by:
联立公式(18)和(19),即可得到关节力矩在角速度层的描述:By combining formulas (18) and (19), the description of the joint moment in the angular velocity layer can be obtained:
其中, J表示Jacobian矩阵;表示关节力矩约束的一阶导数;τ表示关节力矩约束;β表示正控制参数;θ表示机器人的关节角度;表示机器人的关节角速度;H表示一个实数数组;表示所述机器人的指令力的一阶导数;表示实数。in, J represents the Jacobian matrix; represents the first derivative of the joint moment constraint; τ represents the joint moment constraint; β represents the positive control parameter; θ represents the joint angle of the robot; Represents the joint angular velocity of the robot; H represents a real number array; represents the first derivative of the command force of the robot; represents a real number.
可选的,所述对关节力矩函数进行改写,并获得最终的约束优化模型,包括:Optionally, the joint moment function is rewritten to obtain a final constraint optimization model, including:
将目标函数进行简化,使用所述机器人的指令力Fd代替在基座标系R0(x0,y0,z0)下的接触力F,则有:Simplify the objective function and use the command force F d of the robot to replace the contact force F under the base frame R 0 (x 0 , y 0 , z 0 ), there are:
若公式(13)描述的目标函数定义在关节角度层,由于最终的控制量为关节角速度因此通过求取G2对θ的梯度,得到其在速度层上的替代描述:If the objective function described by formula (13) is defined in the joint angle layer, since the final control quantity is the joint angular velocity Therefore, by taking the gradient of G2 to θ, its alternative description on the velocity layer is obtained:
对JT(θ)Fd求导得到:Derivation with respect to J T (θ)F d yields:
其中,是:in, Yes:
令H=[H1,…,Hn],则上式可描述数为:Let H=[H 1 ,...,H n ], the above formula can describe the number as:
由于公式(15)中的第二项与不相关,则选择最终目标函数选取为 Since the second term in equation (15) is the same as is not relevant, then the final objective function is selected as
通过引入一个修正项对目标函数中的进行凸化处理,则最终的约束优化模型为:by introducing a modifier in the objective function After convexization, the final constrained optimization model is:
其中,表示所述机器人的指令力的转秩;J表示Jacobian矩阵;表示机器人的关节角速度;rr表示参考指令;A表示简写的矩阵。in, Represents the rotation rank of the command force of the robot; J represents the Jacobian matrix; Represents the joint angular velocity of the robot; r r represents the reference command; A represents the abbreviated matrix.
可选的,所述基于动态神经网络模型更新最终的约束优化模型中的状态变量和控制力矩,包括:Optionally, the state variables and control torques in the final constrained optimization model are updated based on the dynamic neural network model, including:
定义输入状态变量为所述约束优化模型中的对偶状态变量,则拉格朗日函数选取为:Define input state variables For the dual state variables in the constrained optimization model, the Lagrangian function is selected as:
根据Karush-Kuhn-Tucker条件,优化所述约束优化模型中的最优解等价地表述为:According to the Karush-Kuhn-Tucker condition, optimizing the optimal solution in the constrained optimization model is equivalently expressed as:
其中,PΩ(·)是一个限幅函数,定义为:where P Ω ( ) is a clipping function defined as:
为一个投影函数,定义为: is a projection function, defined as:
在实时求解公式(24)时,基于动态神经网络模型的位置-力控制器设计设计为:When solving equation (24) in real time, the position-force controller design based on the dynamic neural network model is designed as:
其中, 表示实数;表示输入状态量λ2的一阶导数;表示输入状态量λ1的一阶导数;表示关节角速度;表示关节角加速度;J表示Jacobian矩阵;rr表示参考指令;A表示简写矩阵;g1表示第一个元素;g2m表示第2m个元素;∈表示一个正常数。in, represents a real number; represents the first derivative of the input state quantity λ 2 ; represents the first derivative of the input state quantity λ 1 ; represents the joint angular velocity; represents the joint angular acceleration; J represents the Jacobian matrix; r r represents the reference command; A represents the abbreviated matrix; g 1 represents the first element; g 2m represents the 2mth element; ∈ represents a positive number.
另外,本发明实施例还提供了一种协作机器人柔顺力控制系统,所述系统包括:In addition, an embodiment of the present invention also provides a compliance force control system for a collaborative robot, the system comprising:
初始化模块:用于获得机器人的状态变量并进行初始化;Initialization module: used to obtain and initialize the state variables of the robot;
获得模块:用于基于初始化状态变量获得当前旋转矩阵;Obtaining module: used to obtain the current rotation matrix based on the initialization state variable;
读取模块:用于基于所述当前旋转矩阵读取所述机器人的当前状态反馈信息;Reading module: used to read the current state feedback information of the robot based on the current rotation matrix;
构建模块:用于基于所述当前状态反馈信息构建实现柔顺力控制的等式约束以及机器人系统内的关节角度、关节角速度与关节力矩的不等式约束;Building module: used to construct, based on the current state feedback information, equality constraints for realizing compliance force control and inequality constraints for joint angles, joint angular velocities and joint moments in the robot system;
改写模块:用于对关节力矩函数进行改写,并获得最终的约束优化模型;Rewriting module: used to rewrite the joint moment function and obtain the final constraint optimization model;
更新模块:用于基于动态神经网络模型更新最终的约束优化模型中的状态变量和控制力矩;Update module: used to update the state variables and control torques in the final constrained optimization model based on the dynamic neural network model;
判断模块:用于判断当前时间是否大于任务时间,若是,结束对所述机器人的柔顺力控制,反之,返回基于初始化状态变量获得当前旋转矩阵。Judging module: used to judge whether the current time is greater than the task time, if so, end the compliance control of the robot, otherwise, return to obtain the current rotation matrix based on the initialization state variable.
在本发明实施例中,通过实时本发明的方法,能够同时实现接触力方向的高精度力控制以及自由运动方向上的运动控制;能够实现对关节力矩的在线优化;以及能够在柔顺力控制过程中保证机器人不超过其物理约束。In the embodiment of the present invention, through the real-time method of the present invention, high-precision force control in the direction of contact force and motion control in the direction of free motion can be realized simultaneously; online optimization of joint torque can be realized; and in the process of compliance force control guarantees that the robot does not exceed its physical constraints.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见的,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1是本发明实施例中的协作机器人柔顺力控制方法的流程示意图;1 is a schematic flowchart of a method for controlling compliance force of a collaborative robot in an embodiment of the present invention;
图2是本发明实施例中的机器人位置-力控制示意图;FIG. 2 is a schematic diagram of a robot position-force control in an embodiment of the present invention;
图3是本发明实施例中的协作机器人柔顺力控制系统的结构组成示意图。FIG. 3 is a schematic structural composition diagram of a compliance force control system for a collaborative robot in an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
实施例Example
请参阅图1,图1是本发明实施例中的协作机器人柔顺力控制方法的流程示意图。Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of a method for controlling compliance force of a collaborative robot according to an embodiment of the present invention.
如图1所示,一种协作机器人柔顺力控制方法,所述方法包括:As shown in Fig. 1, a method for controlling the compliance force of a collaborative robot, the method includes:
S11:获得机器人的状态变量并进行初始化;S11: Obtain the state variable of the robot and initialize it;
在本发明具体实施过程中,所述获得机器人的状态变量并进行初始化之前,还包括:针对所述机器人运动与工件之间的接触力的正交特点,在工具坐标系和基座标系内进行分别建模,获得机器人运动建模系统;其中,基座标系的表示R0(x0,y0,z0);工具坐标系的表示Rt(xt,yt,zt)。In the specific implementation process of the present invention, before the state variable of the robot is obtained and initialized, the method further includes: according to the orthogonal characteristics of the contact force between the robot motion and the workpiece, in the tool coordinate system and the base coordinate system Perform separate modeling to obtain a robot motion modeling system; wherein, the base coordinate system represents R 0 (x 0 , y 0 , z 0 ); the tool coordinate system represents R t (x t , y t , z t ) .
进一步的,所述机器人与工件之间的接触力与所述工具坐标系中的zt平行,同时xt与yt定义了所述机器人末端执行器的自由运动;Further, the contact force between the robot and the workpiece is parallel to z t in the tool coordinate system, while x t and y t define the free movement of the robot end effector;
在所述机器人操作过程中,所述机器人末端执行器实际位置x与期望轨迹xd存在一微小偏差,在所述基座标系R0(x0,y0,z0)和所述工具坐标系Rt(xt,yt,zt)下分别描述为所述机器人在基座标系下的与期望轨迹的偏差δX和所述机器人在工具坐标系下的与期望轨迹的偏差δXt。During the operation of the robot, there is a slight deviation between the actual position x of the robot end effector and the expected trajectory x d . The coordinate system R t (x t , y t , z t ) is described as the deviation δX of the robot from the desired trajectory under the base frame and the deviation δX of the robot from the desired trajectory under the tool coordinate system, respectively t .
进一步的,所述在工具坐标系和基座标系内进行分别建模,获得机器人运动建模系统的过程如下:Further, separately modeling is performed in the tool coordinate system and the base coordinate system, and the process of obtaining the robot motion modeling system is as follows:
在所述工具坐标系Rt(xt,yt,zt)下由于忽略所述机器人与所述工件之间的摩擦,假设所述机器人与所述工件之间的接触为刚度接触,则所述接触力可以描述为:In the tool coordinate system R t (x t , y t , z t ), since the friction between the robot and the workpiece is ignored, assuming that the contact between the robot and the workpiece is a rigid contact, then The contact force can be described as:
Ft=kf∑tδXt; (1)F t =k f ∑ t δX t ; (1)
其中,kf表示刚度系数;∑t=diag(0,0,1)为一个对角矩阵,用于描述所述机器人在工具坐标系下的与期望轨迹的偏差δXt与其接触力之间的关系,其中,0表示在该方向上的位移不会产生接触力,反之取1;Among them, k f represents the stiffness coefficient; ∑ t =diag(0,0,1) is a diagonal matrix, which is used to describe the deviation δX t of the robot from the desired trajectory in the tool coordinate system and its contact force. relationship, where 0 means that the displacement in this direction will not generate contact force, otherwise, take 1;
定义则在所述工具坐标系Rt(xt,yt,zt)下的位置跟踪误差et为:definition Then the position tracking error e t under the tool coordinate system R t (x t , y t , z t ) is:
在接触面已知的情况下,使用一个旋转矩阵St描述所述工具坐标系Rt(xt,yt,zt)和基座标系R0(x0,y0,z0)之间的旋转关系;When the contact surface is known, a rotation matrix S t is used to describe the tool coordinate system R t (x t , y t , z t ) and the base frame R 0 (x 0 , y 0 , z 0 ) The rotation relationship between;
定义F和e0分别为所述基座标系R0(x0,y0,z0)下δXt与Ft的对应描述,则有:Define F and e 0 as the corresponding descriptions of δX t and F t under the base frame R 0 (x 0 , y 0 , z 0 ), respectively, then there are:
et=Ste0; (4)e t =S t e 0 ; (4)
δXt=StδX; (5)δX t =S t δX; (5)
通过公式(1)-(5)的联立,则有:Through the combination of formulas (1)-(5), we have:
其中,δX表示所述机器人在所述基座标系R0(x0,y0,z0)下的与期望轨迹的偏差;F表示在基座标系R0(x0,y0,z0)下的接触力;Wherein, δX represents the deviation of the robot from the expected trajectory under the base frame R 0 (x 0 , y 0 , z 0 ); F represents the base frame R 0 (x 0 , y 0 , contact force at z 0 );
在基座标系R0(x0,y0,z0)中位移δX可以描述为δX=x-xd,其中,期望轨迹xd是R0中描述的期望位置信号,因此,对公式(6)-(7)重写为:The displacement δX in the base frame R 0 (x 0 , y 0 , z 0 ) can be described as δX=xx d , where the desired trajectory x d is the desired position signal described in R 0 , therefore, for formula (6 )-(7) is rewritten as:
定义所述机器人的期望轨迹和指令力分别为xd和Fd;则根据公式(5)与公式(9)的描述,控制目标可以描述为设计面向冗余机器人的位置-来控制策略,使公式(8)描述的接触力F→Fd,同时使公式(9)描述的跟踪误差e0→0;∑t表示描述接触的参数矩阵;表示描述运动的参数矩阵。Define the desired trajectory and command force of the robot as x d and F d respectively; then according to the description of formula (5) and formula (9), the control objective can be described as designing a position-oriented control strategy for redundant robots, so that Contact force F→F d described by formula (8), while making the tracking error e 0 described by formula (9) → 0; ∑ t represents the parameter matrix describing the contact; Represents a matrix of parameters describing motion.
进一步的,所述机器人运动建模系统中为了简化描述,则定义 rd=[Fd;0],则有公式(8)和公式(9)重写为:Further, in order to simplify the description in the robot motion modeling system, the definition r d =[F d ; 0], Then there are formulas (8) and (9) rewritten as:
A(f(θ)-xd)=r; (10)A(f(θ)-x d )=r; (10)
所述控制目标描述为通过设计关节,使r=rd;∑t表示描述接触的参数矩阵;表示描述运动的参数矩阵。The control objective is described by designing joints so that r=r d ; ∑ t represents the parameter matrix describing the contact; Represents a matrix of parameters describing motion.
具体的,首先根据针对机器人运动与接触力的正交特点,在工具坐标系和基座标系内进行分别建模;为了不失一般性,定义具坐标系Rt(xt,yt,zt)与基座标系R0(x0,y0,z0),具体如图2所示,该机器人与工件之间的接触力与工具坐标系中的zt平行,同时xt与yt定义了所述机器人末端执行器的自由运动;在操作过程中,机器人末端执行器实际位置x与期望轨迹xd存在一微小偏差,在基座标系R0(x0,y0,z0)和工具坐标系Rt(xt,yt,zt)下分别描述为机器人在基座标系下的与期望轨迹的偏差δX和机器人在工具坐标系下的与期望轨迹的偏差δXt。Specifically, according to the orthogonal characteristics of robot motion and contact force, modeling is carried out in the tool coordinate system and the base coordinate system. z t ) and the base frame R 0 (x 0 , y 0 , z 0 ), as shown in Figure 2, the contact force between the robot and the workpiece is parallel to z t in the tool coordinate system, while x t and y t define the free motion of the robot end effector; during the operation, there is a slight deviation between the actual position x of the robot end effector and the expected trajectory x d , and in the base frame R 0 (x 0 , y 0 , z 0 ) and the tool coordinate system R t (x t , y t , z t ) are respectively described as the deviation δX of the robot from the desired trajectory in the base coordinate system and the robot’s deviation from the desired trajectory in the tool coordinate system Deviation δX t .
在工具坐标系Rt(xt,yt,zt)下由于忽略所述机器人与所述工件之间的摩擦,假设机器人与所述工件之间的接触为刚度接触,则所述接触力可以描述为:In the tool coordinate system R t (x t , y t , z t ), since the friction between the robot and the workpiece is ignored, assuming that the contact between the robot and the workpiece is a rigid contact, the contact force can be described as:
Ft=kf∑tδXt; (1)F t =k f ∑ t δX t ; (1)
其中,kf表示刚度系数;∑t=diag(0,0,1)为一个对角矩阵,用于描述所述机器人在工具坐标系下的与期望轨迹的偏差δXt与其接触力之间的关系,其中,0表示在该方向上的位移不会产生接触力,反之取1。Among them, k f represents the stiffness coefficient; ∑ t =diag(0,0,1) is a diagonal matrix, which is used to describe the deviation δX t of the robot from the desired trajectory in the tool coordinate system and its contact force. relationship, where 0 means that the displacement in this direction will not produce contact force, otherwise, take 1.
定义则在工具坐标系Rt(xt,yt,zt)下的位置跟踪误差et为:definition Then the position tracking error e t under the tool coordinate system R t (x t , y t , z t ) is:
在接触面已知的情况下,使用一个旋转矩阵St描述工具坐标系Rt(xt,yt,zt)和基座标系R0(x0,y0,z0)之间的旋转关系。When the contact surface is known, a rotation matrix S t is used to describe the relationship between the tool coordinate system R t (x t ,y t ,z t ) and the base frame R 0 (x 0 ,y 0 ,z 0 ) rotation relationship.
定义F和e0分别为基座标系R0(x0,y0,z0)下δXt与Ft的对应描述,则有:Define F and e 0 as the corresponding descriptions of δX t and F t under the base frame R 0 (x 0 , y 0 , z 0 ), respectively, then we have:
et=Ste0; (4)e t =S t e 0 ; (4)
δXt=StδX; (5)δX t =S t δX; (5)
通过公式(1)-(5)的联立,则有:Through the combination of formulas (1)-(5), we have:
其中,δX表示机器人在所述基座标系R0(x0,y0,z0)下的与期望轨迹的偏差;F表示在基座标系R0(x0,y0,z0)下的接触力。Among them, δX represents the deviation of the robot from the expected trajectory under the base frame R 0 (x 0 , y 0 , z 0 ); F represents the base frame R 0 (x 0 , y 0 , z 0 ) ) under the contact force.
值得注意的是,在基座标系R0(x0,y0,z0)中位移δX可以描述为δX=x-xd,其中,期望轨迹xd是R0中描述的期望位置信号,因此,对公式(6)-(7)重写为:It is worth noting that the displacement δX in the base frame R 0 (x 0 , y 0 , z 0 ) can be described as δX=xx d , where the desired trajectory x d is the desired position signal described in R 0 , so , the formulas (6)-(7) are rewritten as:
定义所述机器人的期望轨迹和指令力分别为xd和Fd;则根据公式(5)与公式(9)的描述,控制目标可以描述为设计面向冗余机器人的位置-来控制策略,使公式(8)描述的接触力F→Fd,同时使公式(9)描述的跟踪误差e0→0;∑t表示描述接触的参数矩阵;表示描述运动的参数矩阵。Define the desired trajectory and command force of the robot as x d and F d respectively; then according to the description of formula (5) and formula (9), the control objective can be described as designing a position-oriented control strategy for redundant robots, so that Contact force F→F d described by formula (8), while making the tracking error e 0 described by formula (9) → 0; ∑ t represents the parameter matrix describing the contact; Represents a matrix of parameters describing motion.
为了简化描述,定义rd=[Fd;0],则有公式(8)和公式(9)重写为:To simplify the description, define r d =[F d ; 0], Then there are formulas (8) and (9) rewritten as:
A(f(θ)-xd)=r; (10)A(f(θ)-x d )=r; (10)
控制目标描述为通过设计关节,使r=rd;∑t表示描述接触的参数矩阵;表示描述运动的参数矩阵。The control objective is described by designing joints so that r=r d ; ∑ t represents the parameter matrix describing the contact; Represents a matrix of parameters describing motion.
在构建机器人的系统建模模型之后,然后获得机器人的状态变量,然后进行相应的初始化。After building the system modeling model of the robot, then the state variables of the robot are obtained, and then the corresponding initialization is performed.
S12:基于初始化状态变量获得当前旋转矩阵;S12: Obtain the current rotation matrix based on the initialization state variable;
在本发明具体实施过程中,在获得初始化状态变量之后,根据该初始化状态变量来获得当前旋转矩阵;即所建模的机器人系统内的旋转矩阵St。In the specific implementation process of the present invention, after the initialization state variable is obtained, the current rotation matrix is obtained according to the initialization state variable; that is, the rotation matrix S t in the modeled robot system.
S13:基于所述当前旋转矩阵读取所述机器人的当前状态反馈信息;S13: Read the current state feedback information of the robot based on the current rotation matrix;
在本发明具体实施过程中,通过该当前旋转矩阵获得机器人状态反馈的反馈信息,即通过机器人系统获得的状态反馈信息包括在基座标系R0(x0,y0,z0)下的接触力、机器人的关节角速度和机器人的关节角度。In the specific implementation process of the present invention, the feedback information of the robot state feedback is obtained through the current rotation matrix, that is, the state feedback information obtained through the robot system includes the state feedback information under the base frame R 0 (x 0 , y 0 , z 0 ). Contact force, joint angular velocity of the robot, and joint angle of the robot.
S14:基于所述当前状态反馈信息构建实现柔顺力控制的等式约束以及机器人系统内的关节角度、关节角速度与关节力矩的不等式约束;S14: Constructing equality constraints for realizing compliance force control and inequality constraints for joint angles, joint angular velocities and joint moments in the robot system based on the current state feedback information;
在本发明具体实施过程中,所述基于所述当前状态反馈信息构建实现柔顺力控制的等式约束,包括:在机器人运动建模系统下获得的当前状态反馈信息,对给定的期望轨迹xd与接触力Ft,实现位置-来控制的目标为:In the specific implementation process of the present invention, the constructing an equation constraint for realizing compliance force control based on the current state feedback information includes: the current state feedback information obtained under the robot motion modeling system, for a given desired trajectory x d and contact force F t , the goal of achieving position-to-control is:
则定义误差向量:Then define the error vector:
e=r-rd=[F-Fd;e0]; (16)e=rr d =[FF d ; e 0 ]; (16)
则等式可以在速度层重建为如下形式:Then the equation can be reconstructed in the velocity layer as follows:
其中,k表示一正控制常数;表示所述机器人的关节角速度;表示误差向量的一阶导数;表示期望轨迹的一阶导数;表示rd的一阶导数,rd=[Fd;0],Fd表示机器人的力指令。Among them, k represents a positive control constant; represents the joint angular velocity of the robot; represents the first derivative of the error vector; represents the first derivative of the desired trajectory; Represents the first derivative of r d , r d =[F d ; 0], F d represents the force command of the robot.
进一步的,所述机器人系统内的关节角度、关节角速度与关节力矩的不等式约束,包括:将不等式约束归一化描述为速度层的不等式约束: 其中, Further, the inequality constraints of joint angles, joint angular velocities and joint moments in the robot system include: normalizing the inequality constraints to describe the inequality constraints of the velocity layer: in,
则关节力矩的不等式约束可以重写为:Then the inequality constraints for joint moments can be rewritten as:
其中,β>0,则对当末端执行器与工件的在基座标系R0(x0,y0,z0)下接触力为F时,其在各关节处施加的作用力矩的表达式求导可得:Among them, β>0, when the contact force between the end effector and the workpiece under the base frame R 0 (x 0 , y 0 , z 0 ) is F, the expression of the acting torque applied by the end effector at each joint The derivative can be obtained by:
联立公式(18)和(19),即可得到关节力矩在角速度层的描述:By combining formulas (18) and (19), the description of the joint moment in the angular velocity layer can be obtained:
其中, J表示Jacobian矩阵;表示关节力矩约束的一阶导数;τ表示关节力矩约束;β表示正控制参数;θ表示机器人的关节角度;表示机器人的关节角速度;H表示一个实数数组;表示所述机器人的指令力的一阶导数;表示实数。in, J represents the Jacobian matrix; represents the first derivative of the joint moment constraint; τ represents the joint moment constraint; β represents the positive control parameter; θ represents the joint angle of the robot; Represents the joint angular velocity of the robot; H represents a real number array; represents the first derivative of the command force of the robot; represents a real number.
首先,进行基本QP问题描述;当末端执行器与工件的接触力为F时,其在各关节处施加的作用力矩为:First, the basic QP problem description is carried out; when the contact force between the end effector and the workpiece is F, the applied torque at each joint is:
τ=JT(θ)F; (11)τ=J T (θ)F; (11)
从节能的角度出发,选择目标函数为τTτ/2描述系统的能量消耗;同时在接触力F较大时,为了避免在某一关节上产生过大力矩导致的安全风险,在关节角度约束、角速度约束的基础上,引入关节力矩约束τmin≤τ≤τmax;则冗余机器人的位置-力控制问题描述为如下的QP问题:From the perspective of energy saving, the objective function is selected as τ T τ/2 to describe the energy consumption of the system; at the same time, when the contact force F is large, in order to avoid the safety risk caused by excessive torque on a joint, the joint angle constraint , on the basis of the angular velocity constraint, the joint torque constraint τ min ≤τ≤τ max is introduced; then the position-force control problem of the redundant robot is described as the following QP problem:
min G1=FTJ(θ)JT(θ)F/2; (12a)min G 1 =F T J(θ)J T (θ)F/2; (12a)
s.t.rd=A(f(θ)-xd); (12b)str d =A(f(θ)-x d ); (12b)
θmin≤θ≤θmax; (12c)θ min ≤θ≤θ max ; (12c)
τmin≤JT(θ)Fd≤τmax; (12e)τ min ≤JT(θ)F d ≤τ max ; (12e)
然后进行等式和不等式的约束重建;根据上述公式(10)与rd的定义,对给定的期望轨迹xd与指令力Fd,实现位置-力控制的目标为:Then carry out the constraint reconstruction of equations and inequalities; according to the above formula (10) and the definition of r d , for a given desired trajectory x d and command force F d , the goal of achieving position-force control is:
则定义误差向量:Then define the error vector:
e=r-rd=[F-Fd;e0]; (16)e=rr d =[FF d ; e 0 ]; (16)
则等式可以在速度层重建为如下形式:Then the equation can be reconstructed in the velocity layer as follows:
其中,k表示一正控制常数;表示所述机器人的关节角速度;表示误差向量的一阶导数;表示期望轨迹的一阶导数;表示rd的一阶导数,rd=[Fd;0],Fd表示机器人的力指令。Among them, k represents a positive control constant; represents the joint angular velocity of the robot; represents the first derivative of the error vector; represents the first derivative of the desired trajectory; Represents the first derivative of r d , r d =[F d ; 0], F d represents the force command of the robot.
对于上述不等式约束(12c)和(12d),参考上述中的处理方法,将不等式约束归一化描述为速度层的不等式约束:其中, For the above inequality constraints (12c) and (12d), with reference to the processing method in the above, the inequality constraint normalization is described as the inequality constraint of the velocity layer: in,
同理关节力矩的不等式约束(12e)可以重写为:The inequality constraint (12e) of the same joint moment can be rewritten as:
其中,β>0,则对当末端执行器与工件的在基座标系R0(x0,y0,z0)下接触力为F时,对公式(11)在各关节处施加的作用力矩的表达式求导可得:Among them, β>0, when the contact force between the end effector and the workpiece under the base frame R 0 (x 0 , y 0 , z 0 ) is F, the equation (11) applies to each joint. The derivation of the expression of the acting moment can be obtained:
联立公式(18)和(19),即可得到关节力矩在角速度层的描述:By combining formulas (18) and (19), the description of the joint moment in the angular velocity layer can be obtained:
其中, J表示Jacobian矩阵;表示关节力矩约束的一阶导数;τ表示关节力矩约束;β表示正控制参数;θ表示机器人的关节角度;表示机器人的关节角速度;H表示一个实数数组;表示所述机器人的指令力的一阶导数;表示实数。in, J represents the Jacobian matrix; represents the first derivative of the joint moment constraint; τ represents the joint moment constraint; β represents the positive control parameter; θ represents the joint angle of the robot; Represents the joint angular velocity of the robot; H represents a real number array; represents the first derivative of the command force of the robot; represents a real number.
综上,基于约束-优化思想的冗余机器人位置-力控制问题在角速度层上的描述如下:In summary, the redundant robot position-force control problem based on the constraint-optimization idea is described in the angular velocity layer as follows:
其中, in,
S15:对关节力矩函数进行改写,并获得最终的约束优化模型;S15: Rewrite the joint moment function and obtain the final constraint optimization model;
在本发明具体实施过程中,所述对关节力矩函数进行改写,并获得最终的约束优化模型,包括:In the specific implementation process of the present invention, the joint torque function is rewritten, and the final constraint optimization model is obtained, including:
将目标函数进行简化,使用所述机器人的指令力Fd代替在基座标系R0(x0,y0,z0)下的接触力F,则有:Simplify the objective function and use the command force F d of the robot to replace the contact force F under the base frame R 0 (x 0 , y 0 , z 0 ), there are:
若公式(13)描述的目标函数定义在关节角度层,由于最终的控制量为关节角速度因此通过求取G2对θ的梯度,得到其在速度层上的替代描述:If the objective function described by formula (13) is defined in the joint angle layer, since the final control quantity is the joint angular velocity Therefore, by taking the gradient of G2 to θ, its alternative description on the velocity layer is obtained:
对JT(θ)Fd求导得到:Derivation with respect to J T (θ)F d yields:
其中,是:in, Yes:
令H=[H1,…,Hn],则上式可描述数为:Let H=[H 1 ,...,H n ], the above formula can describe the number as:
由于公式(15)中的第二项与不相关,则选择最终目标函数选取为 Since the second term in equation (15) is the same as is not relevant, then the final objective function is selected as
通过引入一个修正项对目标函数中的进行凸化处理,则最终的约束优化模型为:by introducing a modifier in the objective function After convexization, the final constrained optimization model is:
其中,表示所述机器人的指令力的转秩;J表示Jacobian矩阵;表示机器人的关节角速度;rr表示参考指令;A表示简写的矩阵。in, Represents the rotation rank of the command force of the robot; J represents the Jacobian matrix; Represents the joint angular velocity of the robot; r r represents the reference command; A represents the abbreviated matrix.
具体的,在公式(12)中包含了大量的非线性特征,包括Jacobian矩阵,以及实时接触力这使后续控制器设计变得困难,因此将该目标函数进行简化:使用机器人的指令力Fd代替在基座标系R0(x0,y0,z0)下的接触力F,则有:Specifically, a large number of nonlinear features are included in formula (12), including the Jacobian matrix, and the real-time contact force This makes the subsequent controller design difficult, so the objective function is simplified: use the command force F d of the robot to replace the contact force F under the base frame R 0 (x 0 , y 0 , z 0 ), then Have:
在Fd与θ不相关,使用Fd可以大大降低目标函数的非线性程度;另一方面,通过合理的控制器设计,接触力F将最终收敛到Fd,因此替换前后的目标函数最终是等价的,如公式(13)描述的目标函数定义在关节角度层,由于最终的控制量为关节角速度因此通过求取G2对θ的梯度,得到其在速度层上的替代描述:When F d is not related to θ, using F d can greatly reduce the nonlinearity of the objective function; on the other hand, with a reasonable controller design, the contact force F will eventually converge to F d , so the objective function before and after replacement is finally Equivalently, the objective function described by formula (13) is defined in the joint angle layer, since the final control quantity is the joint angular velocity Therefore, by taking the gradient of G2 to θ, its alternative description on the velocity layer is obtained:
对JT(θ)Fd求导得到:Derivation with respect to J T (θ)F d yields:
其中,是:in, Yes:
令H=[H1,…,Hn],则上式可描述数为:Let H=[H 1 ,...,H n ], the above formula can describe the number as:
由于公式(15)中的第二项与不相关,则选择最终目标函数选取为 Since the second term in equation (15) is the same as is not relevant, then the final objective function is selected as
由于公式(21a)描述的目标函数对而言是非凸的,通过引入一个修正项对目标函数中的进行凸化处理,则最终的约束优化模型为:Since the objective function described by Eq. (21a) is is non-convex in terms of in the objective function After convexization, the final constrained optimization model is:
其中,表示所述机器人的指令力的转秩;J表示Jacobian矩阵;表示机器人的关节角速度;rr表示参考指令;A表示简写的矩阵。in, Represents the rotation rank of the command force of the robot; J represents the Jacobian matrix; Represents the joint angular velocity of the robot; r r represents the reference command; A represents the abbreviated matrix.
S16:基于动态神经网络模型更新最终的约束优化模型中的状态变量和控制力矩;S16: Update the state variables and control torques in the final constrained optimization model based on the dynamic neural network model;
在本发明具体实施过程中,所述基于动态神经网络模型更新最终的约束优化模型中的状态变量和控制力矩,包括:定义输入状态变量 为所述约束优化模型中的对偶状态变量,则拉格朗日函数选取为:In the specific implementation process of the present invention, the updating of the state variables and control torques in the final constrained optimization model based on the dynamic neural network model includes: defining input state variables For the dual state variables in the constrained optimization model, the Lagrangian function is selected as:
根据Karush-Kuhn-Tucker条件,优化所述约束优化模型中的最优解等价地表述为:According to the Karush-Kuhn-Tucker condition, optimizing the optimal solution in the constrained optimization model is equivalently expressed as:
其中,PΩ(·)是一个限幅函数,定义为:where P Ω ( ) is a clipping function defined as:
为一个投影函数,定义为: is a projection function, defined as:
在实时求解公式(24)时,基于动态神经网络模型的位置-力控制器设计设计为:When solving equation (24) in real time, the position-force controller design based on the dynamic neural network model is designed as:
其中, 表示实数;表示输入状态量λ2的一阶导数;表示输入状态量λ1的一阶导数;表示关节角速度;表示关节角加速度;J表示Jacobian矩阵;rr表示参考指令;A表示简写矩阵;g1表示第一个元素;g2m表示第2m个元素;∈表示一个正常数。in, represents a real number; represents the first derivative of the input state quantity λ 2 ; represents the first derivative of the input state quantity λ 1 ; represents the joint angular velocity; represents the joint angular acceleration; J represents the Jacobian matrix; r r represents the reference command; A represents the abbreviated matrix; g 1 represents the first element; g 2m represents the 2mth element; ∈ represents a positive number.
具体的,定义输入状态变量为约束公式(22b)和(22c)的对偶状态变量,则拉格朗日函数选取为:Specifically, define the input state variable is the dual state variable of constraint formulas (22b) and (22c), then the Lagrangian function is selected as:
根据Karush-Kuhn-Tucker条件,优化所述约束优化模型中的最优解等价地表述为:According to the Karush-Kuhn-Tucker condition, optimizing the optimal solution in the constrained optimization model is equivalently expressed as:
其中,PΩ(·)是一个限幅函数,定义为:where P Ω ( ) is a clipping function defined as:
为一个投影函数,定义为: is a projection function, defined as:
在实时求解公式(24)时,基于动态神经网络模型的位置-力控制器设计设计为:When solving equation (24) in real time, the position-force controller design based on the dynamic neural network model is designed as:
其中, 表示实数;表示输入状态量λ2的一阶导数;表示输入状态量λ1的一阶导数;表示关节角速度;表示关节角加速度;J表示Jacobian矩阵;rr表示参考指令;A表示简写矩阵;g1表示第一个元素;g2m表示第2m个元素;∈表示一个正常数。in, represents a real number; represents the first derivative of the input state quantity λ 2 ; represents the first derivative of the input state quantity λ 1 ; represents the joint angular velocity; represents the joint angular acceleration; J represents the Jacobian matrix; r r represents the reference command; A represents the abbreviated matrix; g 1 represents the first element; g 2m represents the 2mth element; ∈ represents a positive number.
S17:判断当前时间是否大于任务时间;S17: Determine whether the current time is greater than the task time;
在本发明具体实施过程中,需要判断当前的时间是否大于任务时间,在大于的时候,执行S18,否则返回S12。In the specific implementation process of the present invention, it is necessary to judge whether the current time is greater than the task time, and when it is greater than the task time, execute S18, otherwise, return to S12.
S18:若是,结束对所述机器人的柔顺力控制,反之,返回基于初始化状态变量获得当前旋转矩阵。S18: If yes, end the compliance force control of the robot, otherwise, return to obtain the current rotation matrix based on the initialization state variable.
在本发明具体实施过程中,在判断当前的时间是大于任务时间时,结束对机器人的柔顺力控制。In the specific implementation process of the present invention, when it is judged that the current time is greater than the task time, the compliance force control of the robot is ended.
在本发明实施例中,通过实时本发明的方法,能够同时实现接触力方向的高精度力控制以及自由运动方向上的运动控制;能够实现对关节力矩的在线优化;以及能够在柔顺力控制过程中保证机器人不超过其物理约束。In the embodiment of the present invention, through the real-time method of the present invention, high-precision force control in the direction of contact force and motion control in the direction of free motion can be realized simultaneously; online optimization of joint torque can be realized; and in the process of compliance force control guarantees that the robot does not exceed its physical constraints.
实施例Example
请参阅图3,图3是本发明实施例中的协作机器人柔顺力控制系统的结构组成示意图。Please refer to FIG. 3 . FIG. 3 is a schematic structural diagram of a compliance force control system for a collaborative robot according to an embodiment of the present invention.
如图3所示,一种协作机器人柔顺力控制系统,所述系统包括:As shown in Figure 3, a collaborative robot compliance force control system, the system includes:
初始化模块21:用于获得机器人的状态变量并进行初始化;Initialization module 21: used to obtain and initialize the state variables of the robot;
在本发明具体实施过程中,所述获得机器人的状态变量并进行初始化之前,还包括:针对所述机器人运动与工件之间的接触力的正交特点,在工具坐标系和基座标系内进行分别建模,获得机器人运动建模系统;其中,基座标系的表示R0(x0,y0,z0);工具坐标系的表示Rt(xt,yt,zt)。In the specific implementation process of the present invention, before the state variable of the robot is obtained and initialized, the method further includes: according to the orthogonal characteristics of the contact force between the robot motion and the workpiece, in the tool coordinate system and the base coordinate system Perform separate modeling to obtain a robot motion modeling system; wherein, the base coordinate system represents R 0 (x 0 , y 0 , z 0 ); the tool coordinate system represents R t (x t , y t , z t ) .
进一步的,所述机器人与工件之间的接触力与所述工具坐标系中的zt平行,同时xt与yt定义了所述机器人末端执行器的自由运动;Further, the contact force between the robot and the workpiece is parallel to z t in the tool coordinate system, while x t and y t define the free movement of the robot end effector;
在所述机器人操作过程中,所述机器人末端执行器实际位置x与期望轨迹xd存在一微小偏差,在所述基座标系R0(x0,y0,z0)和所述工具坐标系Rt(xt,yt,zt)下分别描述为所述机器人在基座标系下的与期望轨迹的偏差δX和所述机器人在工具坐标系下的与期望轨迹的偏差δXt。During the operation of the robot, there is a slight deviation between the actual position x of the robot end effector and the expected trajectory x d . The coordinate system R t (x t , y t , z t ) is described as the deviation δX of the robot from the desired trajectory under the base frame and the deviation δX of the robot from the desired trajectory under the tool coordinate system, respectively t .
进一步的,所述在工具坐标系和基座标系内进行分别建模,获得机器人运动建模系统的过程如下:Further, separately modeling is performed in the tool coordinate system and the base coordinate system, and the process of obtaining the robot motion modeling system is as follows:
在所述工具坐标系Rt(xt,yt,zt)下由于忽略所述机器人与所述工件之间的摩擦,假设所述机器人与所述工件之间的接触为刚度接触,则所述接触力可以描述为:In the tool coordinate system R t (x t , y t , z t ), since the friction between the robot and the workpiece is ignored, assuming that the contact between the robot and the workpiece is a rigid contact, then The contact force can be described as:
Ft=kf∑tδXt; (1)F t =k f ∑ t δX t ; (1)
其中,kf表示刚度系数;∑t=diag(0,0,1)为一个对角矩阵,用于描述所述机器人在工具坐标系下的与期望轨迹的偏差δXt与其接触力之间的关系,其中,0表示在该方向上的位移不会产生接触力,反之取1;Among them, k f represents the stiffness coefficient; ∑ t =diag(0,0,1) is a diagonal matrix, which is used to describe the deviation δX t of the robot from the desired trajectory in the tool coordinate system and its contact force. relationship, where 0 means that the displacement in this direction will not generate contact force, otherwise, take 1;
定义则在所述工具坐标系Rt(xt,yt,zt)下的位置跟踪误差et为:definition Then the position tracking error e t under the tool coordinate system R t (x t , y t , z t ) is:
在接触面已知的情况下,使用一个旋转矩阵St描述所述工具坐标系Rt(xt,yt,zt)和基座标系R0(x0,y0,z0)之间的旋转关系;When the contact surface is known, a rotation matrix S t is used to describe the tool coordinate system R t (x t , y t , z t ) and the base frame R 0 (x 0 , y 0 , z 0 ) The rotation relationship between;
定义F和e0分别为所述基座标系R0(x0,y0,z0)下δXt与Ft的对应描述,则有:Define F and e 0 as the corresponding descriptions of δX t and F t under the base frame R 0 (x 0 , y 0 , z 0 ), respectively, then there are:
et=Ste0; (4)e t =S t e 0 ; (4)
δXt=StδX; (5)δX t =S t δX; (5)
通过公式(1)-(5)的联立,则有:Through the combination of formulas (1)-(5), we have:
其中,δX表示所述机器人在所述基座标系R0(x0,y0,z0)下的与期望轨迹的偏差;F表示在基座标系R0(x0,y0,z0)下的接触力;Wherein, δX represents the deviation of the robot from the expected trajectory under the base frame R 0 (x 0 , y 0 , z 0 ); F represents the base frame R 0 (x 0 , y 0 , contact force at z 0 );
在基座标系R0(x0,y0,z0)中位移δX可以描述为δX=x-xd,其中,期望轨迹xd是R0中描述的期望位置信号,因此,对公式(6)-(7)重写为:The displacement δX in the base frame R 0 (x 0 , y 0 , z 0 ) can be described as δX=xx d , where the desired trajectory x d is the desired position signal described in R 0 , therefore, for formula (6 )-(7) is rewritten as:
定义所述机器人的期望轨迹和指令力分别为xd和Fd;则根据公式(5)与公式(9)的描述,控制目标可以描述为设计面向冗余机器人的位置-来控制策略,使公式(8)描述的接触力F→Fd,同时使公式(9)描述的跟踪误差e0→0;∑t表示描述接触的参数矩阵;表示描述运动的参数矩阵。Define the desired trajectory and command force of the robot as x d and F d respectively; then according to the description of formula (5) and formula (9), the control objective can be described as designing a position-oriented control strategy for redundant robots, so that Contact force F→F d described by formula (8), while making the tracking error e 0 described by formula (9) → 0; ∑ t represents the parameter matrix describing the contact; Represents a matrix of parameters describing motion.
进一步的,所述机器人运动建模系统中为了简化描述,则定义 rd=[Fd;0],则有公式(8)和公式(9)重写为:Further, in order to simplify the description in the robot motion modeling system, the definition r d =[F d ; 0], Then there are formulas (8) and (9) rewritten as:
A(f(θ)-xd)=r; (10)A(f(θ)-x d )=r; (10)
所述控制目标描述为通过设计关节,使r=rd;∑t表示描述接触的参数矩阵;表示描述运动的参数矩阵。The control objective is described by designing joints so that r=r d ; ∑ t represents the parameter matrix describing the contact; Represents a matrix of parameters describing motion.
具体的,首先根据针对机器人运动与接触力的正交特点,在工具坐标系和基座标系内进行分别建模;为了不失一般性,定义具坐标系Rt(xt,yt,zt)与基座标系R0(x0,y0,z0),具体如图2所示,该机器人与工件之间的接触力与工具坐标系中的zt平行,同时xt与yt定义了所述机器人末端执行器的自由运动;在操作过程中,机器人末端执行器实际位置x与期望轨迹xd存在一微小偏差,在基座标系R0(x0,y0,z0)和工具坐标系Rt(xt,yt,zt)下分别描述为机器人在基座标系下的与期望轨迹的偏差δX和机器人在工具坐标系下的与期望轨迹的偏差δXt。Specifically, according to the orthogonal characteristics of robot motion and contact force, modeling is carried out in the tool coordinate system and the base coordinate system. z t ) and the base frame R 0 (x 0 , y 0 , z 0 ), as shown in Figure 2, the contact force between the robot and the workpiece is parallel to z t in the tool coordinate system, while x t and y t define the free motion of the robot end effector; during the operation, there is a slight deviation between the actual position x of the robot end effector and the expected trajectory x d , and in the base frame R 0 (x 0 , y 0 , z 0 ) and the tool coordinate system R t (x t , y t , z t ) are respectively described as the deviation δX of the robot from the desired trajectory in the base coordinate system and the robot’s deviation from the desired trajectory in the tool coordinate system Deviation δX t .
在工具坐标系Rt(xt,yt,zt)下由于忽略所述机器人与所述工件之间的摩擦,假设机器人与所述工件之间的接触为刚度接触,则所述接触力可以描述为:In the tool coordinate system R t (x t , y t , z t ), since the friction between the robot and the workpiece is ignored, assuming that the contact between the robot and the workpiece is a rigid contact, the contact force can be described as:
Ft=kf∑tδXt; (1)F t =k f ∑ t δX t ; (1)
其中,kf表示刚度系数;∑t=diag(0,0,1)为一个对角矩阵,用于描述所述机器人在工具坐标系下的与期望轨迹的偏差δXt与其接触力之间的关系,其中,0表示在该方向上的位移不会产生接触力,反之取1。Among them, k f represents the stiffness coefficient; ∑ t =diag(0,0,1) is a diagonal matrix, which is used to describe the deviation δX t of the robot from the desired trajectory in the tool coordinate system and its contact force. relationship, where 0 means that the displacement in this direction will not produce contact force, otherwise, take 1.
定义则在工具坐标系Rt(xt,yt,zt)下的位置跟踪误差et为:definition Then the position tracking error e t under the tool coordinate system R t (x t , y t , z t ) is:
在接触面已知的情况下,使用一个旋转矩阵St描述工具坐标系Rt(xt,yt,zt)和基座标系R0(x0,y0,z0)之间的旋转关系。When the contact surface is known, a rotation matrix S t is used to describe the relationship between the tool coordinate system R t (x t ,y t ,z t ) and the base frame R 0 (x 0 ,y 0 ,z 0 ) rotation relationship.
定义F和e0分别为基座标系R0(x0,y0,x0)下δXt与Ft的对应描述,则有:Define F and e 0 as the corresponding descriptions of δX t and F t under the base frame R 0 (x 0 , y 0 , x 0 ), respectively, then there are:
et=Ste0; (4)e t =S t e 0 ; (4)
δXt=StδX; (5)δX t =S t δX; (5)
通过公式(1)-(5)的联立,则有:Through the combination of formulas (1)-(5), we have:
其中,δX表示机器人在所述基座标系R0(x0,y0,z0)下的与期望轨迹的偏差;F表示在基座标系R0(x0,y0,z0)下的接触力。Among them, δX represents the deviation of the robot from the expected trajectory under the base frame R 0 (x 0 , y 0 , z 0 ); F represents the base frame R 0 (x 0 , y 0 , z 0 ) ) under the contact force.
值得注意的是,在基座标系T0(x0,y0,z0)中位移δX可以描述为δX=x-xd,其中,期望轨迹xd是R0中描述的期望位置信号,因此,对公式(6)-(7)重写为:It is worth noting that the displacement δX in the base frame T 0 (x 0 , y 0 , z 0 ) can be described as δX=xx d , where the desired trajectory x d is the desired position signal described in R 0 , so , the formulas (6)-(7) are rewritten as:
定义所述机器人的期望轨迹和指令力分别为xd和Fd;则根据公式(5)与公式(9)的描述,控制目标可以描述为设计面向冗余机器人的位置-来控制策略,使公式(8)描述的接触力F→Fd,同时使公式(9)描述的跟踪误差e0→0;∑t表示描述接触的参数矩阵;表示描述运动的参数矩阵。Define the desired trajectory and command force of the robot as x d and F d respectively; then according to the description of formula (5) and formula (9), the control objective can be described as designing a position-oriented control strategy for redundant robots, so that Contact force F→F d described by formula (8), while making the tracking error e 0 described by formula (9) → 0; ∑ t represents the parameter matrix describing the contact; Represents a matrix of parameters describing motion.
为了简化描述,定义rd=[Fd;0],则有公式(8)和公式(9)重写为:To simplify the description, define r d =[F d ; 0], Then there are formulas (8) and (9) rewritten as:
A(f(θ)-xd)=r; (10)A(f(θ)-x d )=r; (10)
控制目标描述为通过设计关节,使r=rd;∑t表示描述接触的参数矩阵;表示描述运动的参数矩阵。The control objective is described by designing joints so that r=r d ; ∑ t represents the parameter matrix describing the contact; Represents a matrix of parameters describing motion.
在构建机器人的系统建模模型之后,然后获得机器人的状态变量,然后进行相应的初始化。After building the system modeling model of the robot, then the state variables of the robot are obtained, and then the corresponding initialization is performed.
获得模块22:用于基于初始化状态变量获得当前旋转矩阵;Obtaining module 22: used to obtain the current rotation matrix based on the initialization state variable;
在本发明具体实施过程中,在获得初始化状态变量之后,根据该初始化状态变量来获得当前旋转矩阵;即所建模的机器人系统内的旋转矩阵St。In the specific implementation process of the present invention, after the initialization state variable is obtained, the current rotation matrix is obtained according to the initialization state variable; that is, the rotation matrix St in the modeled robot system.
读取模块23:用于基于所述当前旋转矩阵读取所述机器人的当前状态反馈信息;Reading module 23: for reading the current state feedback information of the robot based on the current rotation matrix;
在本发明具体实施过程中,通过该当前旋转矩阵获得机器人状态反馈的反馈信息,即通过机器人系统获得的状态反馈信息包括在基座标系R0(x0,y0,z0)下的接触力、机器人的关节角速度和机器人的关节角度。In the specific implementation process of the present invention, the feedback information of the robot state feedback is obtained through the current rotation matrix, that is, the state feedback information obtained through the robot system includes the state feedback information under the base frame R 0 (x 0 , y 0 , z 0 ). Contact force, joint angular velocity of the robot, and joint angle of the robot.
构建模块24:用于基于所述当前状态反馈信息构建实现柔顺力控制的等式约束以及机器人系统内的关节角度、关节角速度与关节力矩的不等式约束;Building module 24: used to construct, based on the current state feedback information, an equation constraint for realizing compliance force control and an inequality constraint for joint angles, joint angular velocities and joint moments in the robot system;
在本发明具体实施过程中,所述基于所述当前状态反馈信息构建实现柔顺力控制的等式约束,包括:在机器人运动建模系统下获得的当前状态反馈信息,对给定的期望轨迹xd与接触力Ft,实现位置-来控制的目标为:In the specific implementation process of the present invention, the constructing an equation constraint for realizing compliance force control based on the current state feedback information includes: the current state feedback information obtained under the robot motion modeling system, for a given desired trajectory x d and contact force F t , the goal of achieving position-to-control is:
则定义误差向量:Then define the error vector:
e=r-rd=[F-Fd;e0]; (16)e=rr d =[FF d ; e 0 ]; (16)
则等式可以在速度层重建为如下形式:Then the equation can be reconstructed in the velocity layer as follows:
其中,k表示一正控制常数;表示所述机器人的关节角速度;表示误差向量的一阶导数;表示期望轨迹的一阶导数;表示rd的一阶导数,rd=[Fd;0],Fd表示机器人的力指令。Among them, k represents a positive control constant; represents the joint angular velocity of the robot; represents the first derivative of the error vector; represents the first derivative of the desired trajectory; Represents the first derivative of r d , r d =[F d ; 0], F d represents the force command of the robot.
进一步的,所述机器人系统内的关节角度、关节角速度与关节力矩的不等式约束,包括:将不等式约束归一化描述为速度层的不等式约束: 其中, Further, the inequality constraints of the joint angles, joint angular velocities and joint moments in the robot system include: normalizing the inequality constraints to describe the inequality constraints of the velocity layer: in,
则关节力矩的不等式约束可以重写为:Then the inequality constraints for joint moments can be rewritten as:
其中,β>0,则对当末端执行器与工件的在基座标系R0(x0,y0,z0)下接触力为F时,其在各关节处施加的作用力矩的表达式求导可得:Among them, β>0, when the contact force between the end effector and the workpiece under the base frame R 0 (x 0 , y 0 , z 0 ) is F, the expression of the acting torque applied at each joint The derivative can be obtained by:
联立公式(18)和(19),即可得到关节力矩在角速度层的描述:By combining formulas (18) and (19), the description of the joint moment in the angular velocity layer can be obtained:
其中, J表示Jacobian矩阵;表示关节力矩约束的一阶导数;τ表示关节力矩约束;β表示正控制参数;θ表示机器人的关节角度;表示机器人的关节角速度;H表示一个实数数组;表示所述机器人的指令力的一阶导数;表示实数。in, J represents the Jacobian matrix; represents the first derivative of the joint moment constraint; τ represents the joint moment constraint; β represents the positive control parameter; θ represents the joint angle of the robot; Represents the joint angular velocity of the robot; H represents a real number array; represents the first derivative of the command force of the robot; represents a real number.
首先,进行基本QP问题描述;当末端执行器与工件的接触力为F时,其在各关节处施加的作用力矩为:First, the basic QP problem description is carried out; when the contact force between the end effector and the workpiece is F, the applied torque at each joint is:
τ=JT(θ)F; (11)τ=J T (θ)F; (11)
从节能的角度出发,选择目标函数为τTτ/2描述系统的能量消耗;同时在接触力F较大时,为了避免在某一关节上产生过大力矩导致的安全风险,在关节角度约束、角速度约束的基础上,引入关节力矩约束τmin≤τ≤τmax;则冗余机器人的位置-力控制问题描述为如下的QP问题:From the perspective of energy saving, the objective function is selected as τ T τ/2 to describe the energy consumption of the system; at the same time, when the contact force F is large, in order to avoid the safety risk caused by excessive torque on a joint, the joint angle constraint , on the basis of the angular velocity constraint, the joint torque constraint τ min ≤τ≤τ max is introduced; then the position-force control problem of the redundant robot is described as the following QP problem:
minG1=FTJ(θ)JT(θ)F/2; (12a)minG 1 =F T J(θ)J T (θ)F/2; (12a)
s.t.rd=A(f(θ)-xd); (12b)str d =A(f(θ)-x d ); (12b)
θmin≤θ≤θmax; (12c)θ min ≤θ≤θ max ; (12c)
τmin≤JT(θ)Fd≤τmax; (12e)τ min ≤J T (θ)F d ≤τ max ; (12e)
然后进行等式和不等式的约束重建;根据上述公式(10)与rd的定义,对给定的期望轨迹xd与指令力Fd,实现位置-力控制的目标为:Then carry out the constraint reconstruction of equations and inequalities; according to the above formula (10) and the definition of r d , for a given desired trajectory x d and command force F d , the goal of achieving position-force control is:
则定义误差向量:Then define the error vector:
e=r-rd=[F-Fd;e0]; (16)e=rr d =[FF d ; e 0 ]; (16)
则等式可以在速度层重建为如下形式:Then the equation can be reconstructed in the velocity layer as follows:
其中,k表示一正控制常数;表示所述机器人的关节角速度;表示误差向量的一阶导数;表示期望轨迹的一阶导数;表示rd的一阶导数,rd=[Fd;0],Fd表示机器人的力指令。Among them, k represents a positive control constant; represents the joint angular velocity of the robot; represents the first derivative of the error vector; represents the first derivative of the desired trajectory; Represents the first derivative of r d , r d =[F d ; 0], F d represents the force command of the robot.
对于上述不等式约束(12c)和(12d),参考上述中的处理方法,将不等式约束归一化描述为速度层的不等式约束:其中, For the above inequality constraints (12c) and (12d), with reference to the processing method in the above, the inequality constraint normalization is described as the inequality constraint of the velocity layer: in,
同理关节力矩的不等式约束(12e)可以重写为:The inequality constraint (12e) of the same joint moment can be rewritten as:
其中,β>0,则对当末端执行器与工件的在基座标系R0(x0,y0,z0)下接触力为F时,对公式(11)在各关节处施加的作用力矩的表达式求导可得:Among them, β>0, when the contact force between the end effector and the workpiece under the base frame R 0 (x 0 , y 0 , z 0 ) is F, the equation (11) applies to each joint. The derivation of the expression of the acting moment can be obtained:
联立公式(18)和(19),即可得到关节力矩在角速度层的描述:By combining formulas (18) and (19), the description of the joint moment in the angular velocity layer can be obtained:
其中, J表示Jacobian矩阵;表示关节力矩约束的一阶导数;τ表示关节力矩约束;β表示正控制参数;θ表示机器人的关节角度;表示机器人的关节角速度;H表示一个实数数组;表示所述机器人的指令力的一阶导数;表示实数。in, J represents the Jacobian matrix; represents the first derivative of the joint moment constraint; τ represents the joint moment constraint; β represents the positive control parameter; θ represents the joint angle of the robot; Represents the joint angular velocity of the robot; H represents a real number array; represents the first derivative of the command force of the robot; represents a real number.
综上,基于约束-优化思想的冗余机器人位置-力控制问题在角速度层上的描述如下:In summary, the redundant robot position-force control problem based on the constraint-optimization idea is described in the angular velocity layer as follows:
其中, in,
改写模块25:用于对关节力矩函数进行改写,并获得最终的约束优化模型;Rewriting module 25: used to rewrite the joint moment function and obtain the final constraint optimization model;
在本发明具体实施过程中,所述对关节力矩函数进行改写,并获得最终的约束优化模型,包括:In the specific implementation process of the present invention, the joint torque function is rewritten, and the final constraint optimization model is obtained, including:
将目标函数进行简化,使用所述机器人的指令力Fd代替在基座标系R0(x0,y0,z0)下的接触力F,则有:Simplify the objective function and use the command force F d of the robot to replace the contact force F under the base frame R 0 (x 0 , y 0 , z 0 ), there are:
若公式(13)描述的目标函数定义在关节角度层,由于最终的控制量为关节角速度因此通过求取G2对θ的梯度,得到其在速度层上的替代描述:If the objective function described by formula (13) is defined in the joint angle layer, since the final control quantity is the joint angular velocity Therefore, by taking the gradient of G2 to θ, its alternative description on the velocity layer is obtained:
对JT(θ)Fd求导得到:Derivation with respect to J T (θ)F d yields:
其中,是:in, Yes:
令H=[H1,…,Hn],则上式可描述数为:Let H=[H 1 ,...,H n ], the above formula can describe the number as:
由于公式(15)中的第二项与不相关,则选择最终目标函数选取为 Since the second term in equation (15) is the same as is not relevant, then the final objective function is selected as
通过引入一个修正项对目标函数中的进行凸化处理,则最终的约束优化模型为:by introducing a modifier in the objective function After convexization, the final constrained optimization model is:
其中,表示所述机器人的指令力的转秩;J表示Jacobian矩阵;表示机器人的关节角速度;rr表示参考指令;A表示简写的矩阵。in, Represents the rotation rank of the command force of the robot; J represents the Jacobian matrix; Represents the joint angular velocity of the robot; r r represents the reference command; A represents the abbreviated matrix.
具体的,在公式(12)中包含了大量的非线性特征,包括Jacobian矩阵,以及实时接触力这使后续控制器设计变得困难,因此将该目标函数进行简化:使用机器人的指令力Fd代替在基座标系R0(x0,y0,z0)下的接触力F,则有:Specifically, a large number of nonlinear features are included in formula (12), including the Jacobian matrix, and the real-time contact force This makes the subsequent controller design difficult, so the objective function is simplified: use the command force F d of the robot to replace the contact force F under the base frame R 0 (x 0 , y 0 , z 0 ), then Have:
在Fd与θ不相关,使用Fd可以大大降低目标函数的非线性程度;另一方面,通过合理的控制器设计,接触力F将最终收敛到Fd,因此替换前后的目标函数最终是等价的,如公式(13)描述的目标函数定义在关节角度层,由于最终的控制量为关节角速度因此通过求取G2对θ的梯度,得到其在速度层上的替代描述:When F d is not related to θ, using F d can greatly reduce the nonlinearity of the objective function; on the other hand, with a reasonable controller design, the contact force F will eventually converge to F d , so the objective function before and after replacement is finally Equivalently, the objective function described by formula (13) is defined in the joint angle layer, since the final control quantity is the joint angular velocity Therefore, by taking the gradient of G2 to θ, its alternative description on the velocity layer is obtained:
对JT(θ)Fd求导得到:Derivation with respect to J T (θ)F d yields:
其中,是:in, Yes:
令H=[H1,…,Hn],则上式可描述数为:Let H=[H 1 ,...,H n ], the above formula can describe the number as:
由于公式(15)中的第二项与不相关,则选择最终目标函数选取为 Since the second term in equation (15) is the same as is not relevant, then the final objective function is selected as
由于公式(21a)描述的目标函数对而言是非凸的,通过引入一个修正项对目标函数中的进行凸化处理,则最终的约束优化模型为:Since the objective function described by Eq. (21a) is is non-convex in terms of in the objective function After convexization, the final constrained optimization model is:
其中,表示所述机器人的指令力的转秩;J表示Jacobian矩阵;表示机器人的关节角速度;rr表示参考指令;A表示简写的矩阵。in, Represents the rotation rank of the command force of the robot; J represents the Jacobian matrix; Represents the joint angular velocity of the robot; r r represents the reference command; A represents the abbreviated matrix.
更新模块26:用于基于动态神经网络模型更新最终的约束优化模型中的状态变量和控制力矩;Update module 26: for updating the state variables and control torques in the final constrained optimization model based on the dynamic neural network model;
在本发明具体实施过程中,定义输入状态变量为约束公式(22b)和(22c)的对偶状态变量,则拉格朗日函数选取为:In the specific implementation process of the present invention, the input state variable is defined is the dual state variable of constraint formulas (22b) and (22c), then the Lagrangian function is selected as:
根据Karush-Kuhn-Tucker条件,优化所述约束优化模型中的最优解等价地表述为:According to the Karush-Kuhn-Tucker condition, optimizing the optimal solution in the constrained optimization model is equivalently expressed as:
其中,PΩ(·)是一个限幅函数,定义为:where P Ω ( ) is a clipping function defined as:
为一个投影函数,定义为: is a projection function, defined as:
在实时求解公式(24)时,基于动态神经网络模型的位置-力控制器设计设计为:When solving equation (24) in real time, the position-force controller design based on the dynamic neural network model is designed as:
其中, 表示实数;表示输入状态量λ2的一阶导数;表示输入状态量λ1的一阶导数;表示关节角速度;表示关节角加速度;J表示Jacobian矩阵;rr表示参考指令;A表示简写矩阵;g1表示第一个元素;g2m表示第2m个元素;∈表示一个正常数。in, represents a real number; represents the first derivative of the input state quantity λ 2 ; represents the first derivative of the input state quantity λ 1 ; represents the joint angular velocity; represents the joint angular acceleration; J represents the Jacobian matrix; r r represents the reference command; A represents the abbreviated matrix; g 1 represents the first element; g 2m represents the 2mth element; ∈ represents a positive number.
判断模块27:用于判断当前时间是否大于任务时间,若是,结束对所述机器人的柔顺力控制,反之,返回基于初始化状态变量获得当前旋转矩阵。Judgment module 27: for judging whether the current time is greater than the task time, if so, end the compliance force control of the robot, otherwise, return to obtain the current rotation matrix based on the initialization state variable.
在本发明具体实施过程中,需要判断当前的时间是否大于任务时间,在大于的时候;在判断当前的时间是大于任务时间时,结束对机器人的柔顺力控制。In the specific implementation process of the present invention, it is necessary to judge whether the current time is greater than the task time, and when it is greater than the task time; when it is judged that the current time is greater than the task time, the compliance control of the robot is ended.
在本发明实施例中,通过实时本发明的方法,能够同时实现接触力方向的高精度力控制以及自由运动方向上的运动控制;能够实现对关节力矩的在线优化;以及能够在柔顺力控制过程中保证机器人不超过其物理约束。In the embodiment of the present invention, through the real-time method of the present invention, high-precision force control in the direction of contact force and motion control in the direction of free motion can be simultaneously realized; online optimization of joint torque can be realized; and in the compliance force control process guarantees that the robot does not exceed its physical constraints.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
另外,以上对本发明实施例所提供的一种协作机器人柔顺力控制方法及系统进行了详细介绍,本文中应采用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。In addition, a method and system for controlling the compliance force of a collaborative robot provided by the embodiments of the present invention have been described in detail above. In this paper, specific examples should be used to illustrate the principles and implementations of the present invention. The descriptions of the above embodiments are only It is used to help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific embodiments and application scope. The contents of the description should not be construed as limiting the present invention.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911358551.4A CN111037560B (en) | 2019-12-25 | 2019-12-25 | A collaborative robot compliance force control method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911358551.4A CN111037560B (en) | 2019-12-25 | 2019-12-25 | A collaborative robot compliance force control method and system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111037560A CN111037560A (en) | 2020-04-21 |
| CN111037560B true CN111037560B (en) | 2021-06-25 |
Family
ID=70240336
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911358551.4A Active CN111037560B (en) | 2019-12-25 | 2019-12-25 | A collaborative robot compliance force control method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111037560B (en) |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111941421B (en) * | 2020-06-22 | 2022-02-18 | 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) | An adaptive fuzzy force tracking control method based on multi-robot cooperative operation |
| CN113146615B (en) * | 2021-01-29 | 2024-12-20 | 广东省科学院智能制造研究所 | Multi-robot collaborative handling control method and device |
| CN112873208B (en) * | 2021-01-29 | 2024-09-17 | 广东省科学院智能制造研究所 | A noise-resistant and dynamically constrained robot real-time motion planning method and device |
| US11673264B2 (en) * | 2021-03-25 | 2023-06-13 | Mitsubishi Electric Research Laboratories, Inc. | System and method for robotic assembly based on adaptive compliance |
| CN113084828B (en) * | 2021-04-02 | 2022-11-11 | 上海电气集团股份有限公司 | Motion control method, device, equipment and storage medium |
| CN113618741B (en) * | 2021-08-24 | 2022-07-29 | 深圳市优必选科技股份有限公司 | Robot joint pose optimization method, robot control method and robot |
| CN113703319B (en) * | 2021-08-26 | 2023-07-28 | 合肥工业大学 | Optimal robust control method with joint module inequality constraints based on reinforcement learning |
| CN114260896B (en) * | 2021-12-20 | 2024-01-09 | 广东省科学院智能制造研究所 | Flexible force control method and system for cooperative robot |
| CN118963247B (en) * | 2024-08-02 | 2025-09-23 | 华中科技大学 | ‘Force-position-speed’ collaborative planning method and system considering the dynamic characteristics of flexible grinding and polishing system |
| CN119279770A (en) * | 2024-10-12 | 2025-01-10 | 北京理工大学 | A real-time tracking control system for micro-motion of orthopedic surgical robots |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101804627B (en) * | 2010-04-02 | 2011-12-07 | 中山大学 | Redundant manipulator motion planning method |
| JP2018069342A (en) * | 2016-10-24 | 2018-05-10 | セイコーエプソン株式会社 | Control device, robot and robot system |
| CN107378952B (en) * | 2017-08-16 | 2019-08-20 | 华南理工大学 | A Solution to Attitude Maintenance of Redundant Manipulator Arm End-effector |
| CN107662211B (en) * | 2017-10-16 | 2020-09-08 | 西北工业大学 | A Predictive Control Method of Space Robot Based on Quantum Particle Swarm Optimization |
| EP3546134A1 (en) * | 2018-03-28 | 2019-10-02 | BAE SYSTEMS plc | Collaborative robot system |
| CN108714894A (en) * | 2018-05-03 | 2018-10-30 | 华南理工大学 | A kind of dynamic method for solving dual redundant mechanical arm and colliding with each other |
| DE102018210864B3 (en) * | 2018-07-02 | 2019-07-18 | Kuka Deutschland Gmbh | Method and system for controlling a robot |
-
2019
- 2019-12-25 CN CN201911358551.4A patent/CN111037560B/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| CN111037560A (en) | 2020-04-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111037560B (en) | A collaborative robot compliance force control method and system | |
| Peternel et al. | Robotic assembly solution by human-in-the-loop teaching method based on real-time stiffness modulation | |
| CN110900598B (en) | Robot three-dimensional motion space action imitation learning method and system | |
| Bai et al. | Cooperative load transport: A formation-control perspective | |
| Hu et al. | Adaptive variable impedance control of dual-arm robots for slabstone installation | |
| Moosavian et al. | Modified transpose Jacobian control of robotic systems | |
| Mazare et al. | Adaptive variable impedance control for a modular soft robot manipulator in configuration space | |
| CN113848908B (en) | Modeling and control method of visual servo system for omnidirectional mobile robot | |
| Zeng et al. | Learning compliant robotic movements based on biomimetic motor adaptation | |
| CN112405536B (en) | High-precision constant force control method combining off-line compensation and on-line tracking hybrid strategy | |
| CN111702767A (en) | A Manipulator Impedance Control Method Based on Inversion Fuzzy Adaptive | |
| CN108638058A (en) | A kind of posture decision dynamic programming method | |
| CN117325182B (en) | A robot compliant control method integrating multiple adaptive control mechanisms | |
| CN108555914A (en) | A kind of DNN Neural Network Adaptive Control methods driving Dextrous Hand based on tendon | |
| Nath et al. | Teleoperation with kinematically redundant robot manipulators with sub-task objectives | |
| CN115922711A (en) | Brain-like synchronous tracking control method for double mechanical arms | |
| CN112001087B (en) | Nonlinear dynamics modeling analysis method for rotary joint type industrial robot | |
| Kuo et al. | Fuzzy deep deterministic policy gradient-based motion controller for humanoid robot | |
| Sun et al. | A framework of robot manipulability learning and control and its application in telerobotics | |
| Yang et al. | Fuzzy-Based Control for Multiple Tasks With Human-Robot Interaction | |
| Gams et al. | Manipulation learning on humanoid robots | |
| Li et al. | Research on gait trajectory planning of wall-climbing robot based on improved PSO algorithm | |
| Zhou et al. | Collision-free compliance control for redundant manipulators: an optimization case | |
| Tu et al. | Whole-body control for velocity-controlled mobile collaborative robots using coupling dynamic movement primitives | |
| Chin et al. | Force computation and continuous path tracking for hydraulic parallel manipulators |
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 | ||
| CP01 | Change in the name or title of a patent holder | ||
| CP01 | Change in the name or title of a patent holder |
Address after: 510070 Building No. 15, compound 100, martyrs Road, Guangzhou, Guangdong Patentee after: Institute of intelligent manufacturing, Guangdong Academy of Sciences Address before: 510070 Building No. 15, compound 100, martyrs Road, Guangzhou, Guangdong Patentee before: GUANGDONG INSTITUTE OF INTELLIGENT MANUFACTURING |