Difference between revisions of "Inverse Dynamic Model/zh-hans"

From SoftMC-Wiki
Jump to: navigation, search
Line 367: Line 367:
  
  
要重复使用此代码,请记住使用适合应用程序的频率和振幅值,并使用合适的动力学模型类型。
+
要重复使用此代码,请记住使用适合于应用程序的频率和振幅值,并使用合适的动力学模型类型。
  
===SCARA robot===
+
===SCARA机器人===
The SARA robot has two kinematic models, one with 3 axes (XYZ) and the other with four axes (XYZR). <br>
+
SARA机器人有两个运动学模型,一个有三个轴(XYZ),另一个有四个轴(XYZR)。<br>
However, there is only one type of dynamic model which fits both of these kinematics models.
+
但是,只有一种适合这两种运动学模型的动力学模型。
Example for an identification task that will work for 3 axes SCARA:
+
用于3轴SCARA的识别任务示例:
  
 
<syntaxhighlight lang='VB'>
 
<syntaxhighlight lang='VB'>
Line 421: Line 421:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Example for an identification task that will work for 4 axes SCARA:
+
用于4轴SCARA的识别任务示例:
  
 
<syntaxhighlight lang='VB'>
 
<syntaxhighlight lang='VB'>
Line 471: Line 471:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
To reuse this code, remember to use frequency and amplitude values that are suited for the application. <br>
+
要重复使用此代码,请记住使用适合于应用程序的频率和幅度值。 <br>
Some SCARA robots have coupled joints, usually the 3rd and 4th joints. Currently, the dynamic model of the SCARA robot does not take the coupling into account. Therefore, there may be large errors for coupled joints
+
一些SCARA机器人具有耦合关节,通常是第三和第四关节。目前,SCARA机器人的动力学模型没有考虑耦合。因此,耦合关节可能会有很大的误差。
  
  
===DELTA robot===
+
===DELTA机器人===
The Delta robot has two kinematic models, one with 3 axes (XYZ) and the other with four axes (XYZR).<br>  
+
Delta机器人有两个运动学模型,一个有三个轴(XYZ),另一个有四个轴(XYZR)。<br>  
However, there is only one type of dynamic model which fits both of these kinematics models.
+
但是,只有一种适合这两种运动学模型的动态模型。
Example for an identification task that will work for 3 axes Delta:  
+
用于3轴Delta的识别任务示例:  
 
<syntaxhighlight lang='VB'>
 
<syntaxhighlight lang='VB'>
 
1.  program
 
1.  program
Line 529: Line 529:
  
  
Example for an identification task that will work for 4 axes Delta:
+
适用于4轴Delta的识别任务示例:
  
 
<syntaxhighlight lang='VB'>
 
<syntaxhighlight lang='VB'>
Line 580: Line 580:
  
  
To reuse this code, remember to use frequency and amplitude values that are suited for the application.
+
要重复使用此代码,请记住使用适合于应用程序的频率和幅度值。
  
===PUMA robot===
+
===PUMA机器人===
The PUMA robot has only one kinematic model but it has two different dynamic models. <br>
+
PUMA机器人只有一个运动学模型,但它有两个不同的动力学模型。 <br>
The first dynamic model is a regular model like the other robots.<br>  
+
第一个动力学模型是像其他机器人一样的常规模型。<br>  
The second model is a semi-static model, meaning it will work only for slow movements and static positions. This model takes into account only the gravity and friction forces / torques.
+
第二个模型是一个半静态模型,这意味着它只适用于慢动作和静态位置。该模型仅考虑重力和摩擦力/扭矩。
====Full regular model====
+
This model identification rules are just like the previous models. <br>
+
====完整常规模式====
Example for an identification task that will work for PUMA:
+
该模型识别规则和之前的模型一样。 <br>
 +
PUMA工作的识别任务示例:
 
<syntaxhighlight lang='Vb'>
 
<syntaxhighlight lang='Vb'>
 
1.  program
 
1.  program
Line 637: Line 638:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
To reuse this code, remember to use frequency and amplitude values that are suited for the application.
+
要重复使用此代码,请记住使用适合于应用程序的频率和幅度值。
  
====Semi-static model====
+
====半静态模型====
The semi-static model identification is a little bit different from all of the examples so far. This model takes into account only gravity and friction forces, in other words it neglects dynamic forces. Therefore, the measurement should include negligible dynamic forces, and this is possible by moving slow.<br>
+
到目前为止,半静态模型识别与所有的例子都有一点不同。 这个模型只考虑重力和摩擦力,换句话说它忽略了动力。 因此,测量应该包括可以忽略不计的动态力,这可以通过缓慢运动来实现。<br>
This identification process is longer than the usual identification progress, it takes approximately 2-3 minutes. In addition, it is advised to perform less than 3 cycles, 1 cycle should be enough.<br>
+
这个识别过程比通常的识别过程更长,大约需要2-3分钟。另外,建议执行少于3个周期,1个周期就足够了。.<br>
Also, similar to the previous examples, the semi-static model threshold the velocity of the data points. But unlike the previous examples, here there are two thresholds, one for avoiding very low velocities avoiding numeric errors) and the other for avoiding high velocities (avoiding significant dynamic forces).
+
另外,类似于前面的例子,半静态模型阈值数据点的速度。但是与前面的例子不同,这里有两个阈值,一个用于避免非常低的速度,避免数字误差),另一个用于避免高速度(避免显着的动态力)。 这种识别过程的例子:
Example for such an identification process:
 
 
<syntaxhighlight lang='VB'>
 
<syntaxhighlight lang='VB'>
 
1.  program
 
1.  program
Line 694: Line 694:
  
  
Note the significant low frequencies which cause slow movement.
+
请注意造成慢速运动的重要低频。
  
[[file:DM_17.png|1100px|center|thumb|<center><big>''Figure 9 – An example of the path made by a puma robot during the identification process'' </big></center>]]
+
[[file:DM_17.png|1100px|center|thumb|<center><big>''图9 - 识别过程中puma机器人的运动路径示例'' </big></center>]]
  
==The Dynamic Models Parameters==
+
==动力学模型参数==
This section lists the dynamic parameters for each type of dynamic model.
+
本节列出了每种类型的动力学模型的动力学参数。
===Rotary Axis===
+
===旋转轴===
====Dynamic Model 1 – simple rotary axis====
+
====动力学模型1 - 简单的旋转轴====
 
{|border="1" width="80%"
 
{|border="1" width="80%"
!width="100"|Number
+
!width="100"|序号
!width="250"|Parameter
+
!width="250"|参数
!Comments
+
!注释
 
|-
 
|-
 
|1
 
|1
 
|<math>I</math>
 
|<math>I</math>
|Total moment of inertia around the rotation axis of the moved part
+
|运动部件的旋转轴周围的总转动惯量
 
|}
 
|}
;Model equation
+
;模型方程
 
: <math>T = (I + I_{payload}) \cdot acc</math>
 
: <math>T = (I + I_{payload}) \cdot acc</math>
 
<br style="clear: both" />
 
<br style="clear: both" />
====Dynamic Model 2 - horizontal crank-arm axis ====
+
====动力学模型2 - 水平曲柄臂轴 ====
 
{|border="1" width="80%"
 
{|border="1" width="80%"
!width="100"|Number
+
!width="100"|序号
!width="250"|Parameter
+
!width="250"|参数
 
!Comments
 
!Comments
 
|-
 
|-
 
|1
 
|1
 
|<math>I</math>
 
|<math>I</math>
|Total moment of inertia around the rotation axis of the moved part
+
|运动部件的旋转轴周围的总转动惯量
 
|-
 
|-
 
|2
 
|2
 
|<math>L^2</math>
 
|<math>L^2</math>
|Square of length of crank arm (axis to payload)
+
|曲柄臂的长度的平方(轴到有效载荷)
 
|}
 
|}
;Model equation
+
;模型方程
 
: <math>T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc</math>
 
: <math>T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc</math>
  
 
<br style="clear: both" />
 
<br style="clear: both" />
==== Dynamic Model 3 - vertical crank-arm axis ====
+
==== 动力学模型3 - 垂直曲柄臂轴 ====
 
{|border="1" width="80%"
 
{|border="1" width="80%"
!width="100"|Number
+
!width="100"|序号
!width="250"|Parameter
+
!width="250"|参数
!Comments
+
!注释
 
|-
 
|-
 
|1
 
|1
 
|<math>I</math>
 
|<math>I</math>
|Total moment of inertia around the rotation axis of the moved part
+
|运动部件的旋转轴周围的总转动惯量
 
|-
 
|-
 
|2
 
|2
 
|<math>L^2</math>
 
|<math>L^2</math>
|Square of length of crank arm (axis to payload)
+
|曲柄臂的长度的平方(轴到有效载荷)
 
|-
 
|-
 
|3
 
|3
 
|<math>M \cdot g \cdot A</math>
 
|<math>M \cdot g \cdot A</math>
|Mass (without payload) * Gravity * Distance to center of mass
+
|质量(无有效载荷)* 重力加速度* 到质心的距离
 
|-
 
|-
 
|4
 
|4
 
|<math>g \cdot L</math>
 
|<math>g \cdot L</math>
|Gravity * Distance to Payload
+
|重力加速度 * 到有效负载的距离
 
|}
 
|}
;Model equation
+
;模型方程
 
: <math>T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc - (M \cdot g \cdot A + M_{payload} \cdot g \cdot L) \cdot \sin(pos)</math>
 
: <math>T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc - (M \cdot g \cdot A + M_{payload} \cdot g \cdot L) \cdot \sin(pos)</math>
  
===Linear Axis===
+
===线性轴===
  
==== Dynamic Model 1 - horizontal axis ====
+
==== 动力学模型1 - 水平轴====
[[File:Axystems;Motion Dynamics - Horizontal Axis.png|''Figure 10 - Horizontal linear axis''|thumb]]
+
[[File:Axystems;Motion Dynamics - Horizontal Axis.png|''图10 - 水平线性轴''|thumb]]
 
{|border="1" width="80%"
 
{|border="1" width="80%"
!width="100"|Number
+
!width="100"|序号
!width="250"|Parameter
+
!width="250"|参数
!Comments
+
!注释
 
|-
 
|-
 
|1
 
|1
 
|<math>M</math>
 
|<math>M</math>
|Total mass of the moved part.
+
|运动部分的总质量。
 
|}
 
|}
;Model equation
+
;模型方程
 
: <math>T = (M + M_{payload}) \cdot acc</math>
 
: <math>T = (M + M_{payload}) \cdot acc</math>
  
 
<br style="clear: both" />
 
<br style="clear: both" />
==== Dynamic Model 2 - vertical or tilted axis ====
+
==== 动力学模型2 - 垂直或倾斜的轴 ====
[[File:Axystems;Motion Dynamics - Vertical Axis.png|''Figure 11 - Vertical linear axis''|thumb]]
+
[[File:Axystems;Motion Dynamics - Vertical Axis.png|''图11 - 垂直线性轴''|thumb]]
 
{|border="1" width="80%"
 
{|border="1" width="80%"
!width="100"|Number
+
!width="100"|序号
!width="250"|Parameter
+
!width="250"|参数
!Comments
+
!注释
 
|-
 
|-
 
|1
 
|1
 
|<math>M</math>
 
|<math>M</math>
|Total mass of the moved part.
+
|运动部分的总质量.
 
|-
 
|-
 
|2
 
|2
 
|<math>M \cdot g \cdot \cos(\alpha)</math>
 
|<math>M \cdot g \cdot \cos(\alpha)</math>
|Constant force due to gravity.
+
|由重力产生的恒力
 
|-
 
|-
 
|3
 
|3
 
|<math>g \cdot \cos(\alpha)</math>
 
|<math>g \cdot \cos(\alpha)</math>
|Gravity coefficient used to consider payload mass. ('''g = 9.80665''')
+
|用于考虑有效载荷质量的重力系数。('''g = 9.80665''')
 
|}
 
|}
;Model equation
+
;模型方程
 
: <math>T = (M + M_{payload}) \cdot acc + M \cdot g \cdot \cos(\alpha) + M_{payload} \cdot g \cdot \cos(\alpha)</math>
 
: <math>T = (M + M_{payload}) \cdot acc + M \cdot g \cdot \cos(\alpha) + M_{payload} \cdot g \cdot \cos(\alpha)</math>
  
===SCARA robot===
+
===SCARA 机器人===
  
==== Dynamic Model 1 ====
+
====动力学模型1 ====
[[File:scara.PNG|''Figure 12 - scara robot''|thumb]]
+
[[File:scara.PNG|''12 - scara机器人''|thumb]]
  
 
{|border="1" width="80%"
 
{|border="1" width="80%"
!width="100"|Number
+
!width="100"|序号
!width="250"|Parameter
+
!width="250"|参数
!Comments
+
!注释
 
|-
 
|-
 
|1
 
|1
Line 831: Line 831:
 
|}
 
|}
  
===DELTA robot===
+
===DELTA 机器人===
  
==== Dynamic Model 1 ====
+
==== 动力学模型1 ====
[[File:Control;Rod forces model for Delta kinematics - Introduction.png|''Figure 13 - Delta robot''|thumb]]
+
[[File:Control;Rod forces model for Delta kinematics - Introduction.png|''13 - Delta 机器人''|thumb]]
  
 
{|border="1" width="80%"
 
{|border="1" width="80%"
!width="100"|Number
+
!width="100"|序号
!width="250"|Parameter
+
!width="250"|参数
!Comments
+
!注释
 
|-
 
|-
 
|1
 
|1
Line 894: Line 894:
 
|}
 
|}
  
===PUMA robot===
+
===PUMA 机器人===
==== Dynamic Model 1 ====
+
==== 动力学模型1 ====
[[File:puma.PNG|''Figure 14 - Puma robot''|thumb]]
+
[[File:puma.PNG|''14 - Puma机器人''|thumb]]
  
 
Description:
 
Description:
:* <math> g </math> - Gravity constant
+
:* <math> g </math> - 重力常数
:* <math> m_{i} </math> - Mass of the i<sup>th</sup> link
+
:* <math> m_{i} </math> - i<sup>th</sup>个连杆的质量
:* <math> a_{i} </math> - length of the common normal between the i<sup>th</sup> and i<sup>th+1</sup> joints  
+
:* <math> a_{i} </math> - 第i<sup>th</sup>和第i<sup>th+1</sup>关节之间的公共法线的长度  
:* <math> d_{i} </math> - offset along z axis between the i<sup>th</sup> and i<sup>th+1</sup> joints 
+
:* <math> d_{i} </math> - 在第i<sup>th</sup>个和第i<sup>th+1</sup>个关节之间沿z轴偏移
:* <math> l_{i} </math> - The distance from the i<sup>th</sup> joint to the center of mass of the i<sup>th</sup> link
+
:* <math> l_{i} </math> - 从第i<sup>th</sup>个关节到第i<sup>th+1</sup> 个关节质量中心的距离
  
 
{|border="1" width="80%"
 
{|border="1" width="80%"

Revision as of 09:47, 18 January 2018

语言: [[::Inverse Dynamic Model|English]]  • [[::Inverse Dynamic Model/zh-hans|中文(简体)‎]]

TOP2.png


Contents

简介 - 它是如何工作以及优势

逆动力学模型(IDM)功能用于补偿运动元素的摩擦和动态效应,否则会导致定位误差和次优的定位和跟踪行为。


IDM功能的动机是使用关于运动的额外知识,而不仅仅是位置(即速度和扭矩)来抵消扭矩控制器的命令值,以便使它们反应更快,从而减少最终的定位误差并改善到位行为。



术语逆动力学模型(通常称为“转矩计算控制”)意味着softMC负责运动元素的笛卡尔运动,不仅计算下一个笛卡尔设定点的关节位置,还计算运动所需的关节力矩。 为了能够做到这一点,它需要一个动态模型–即运动元素的质量和惯性的模型。 关节速度和扭矩然后作为附加的扭矩命令数据发送到驱动器(见图1)。



在大多数情况下,用户没有动力学模型的参数。在这种情况下,可以使用softMC识别过程来估算这些参数。 softMC可以通过测量并估算一些常用机器人模型的动力学模型参数。 识别过程如下进行:当机器人被命令执行一定的运动时,记录运动参数和机器人内部马达扭矩。 然后,根据机器人模型和测量结果生成机器人的动力学模型的参数。


图 1 - Taddcmd的控制系统和前馈部分的示意图

力矩单位

MKS单位制将力矩单位定义为[Nm](牛顿*米)。当涉及电机时,电机转矩通常建模为与电流成比例。因此,可以在每个系统中以不同的单位来定义力矩。本节介绍每个系统的力矩单位以及它们如何相互关联。


softMC通过驱动器读取电机的转矩,但不是[Nm]单位。 因此,softMC包含一个名为TorqueFactor(TFac)的轴属性,它将电机的转矩参数分开,以便将其转换为所需的单位。 该操作的结果存储在名为 TorqueFeedback的轴属性中。


CDHD驱动器设置

CDHD驱动器具有以下参数来定义电机的电流特性:

  • MICONT – 以安培[A]为单位, 但是以毫安[mA]为单位读取,定义了电机的连续电流。这是长运行周期的最大允许值。
  • MIPEAK – 以安培[A]为单位,但是以毫安[mA]为单位来读取,定义了电动机的峰值电流。 这是非常短的运行周期的最大允许值。
  • MKT – 对旋转电机, 以[Nm/A]为单位读取, 定义了转矩常数,即电机每安培单位电机输出多少转矩。
  • MKF – 对直线电机, 以[N/A]为单位读取, 定义了转矩常数,即电机每安培单位电机输出多少转矩。
  • I – 以milli-MICONT [0.001 * MICONT]为单位读取。 它表示电流的实际值。它对应于电机中的电流。


TorqueFeedback属性计算如下:

因此,应该适当地设置TorqueFactor属性,以便将TorqueFeedback值转换为[Nm]:


100万是为了补偿MICONT单位是[mA],当前实际值是以[0.001 * MICONT]为单位。 通过这种方式定义TorqueFactor会将当前实际值转换为[Nm]的单位(并将该值分配给TorqueFeedback)。 在设置Tfac后,所有的扭矩值(Tfb,TCmd,Tmax,TorqueThreshold,Te)将始终以[Nm](线性轴为[N])为单位。 图2给出了在MC-Basic中这个计算的例子。

EtherCAT和CANopen标准(DS402)

EtherCAT标准定义了与上述参数等效的以下参数:

CDHD 参数 EtherCAT 参数 EtherCat 索引
MICONT 电机额定电流 0x6075
MIPEAK 电机峰值电流 0x2036
MKT 力矩常数 0x2039
MKF 直线电机推力常数 0x2038
I 实际电流值 0x6078

softMC转矩相关属性

softMC具有以下转矩相关的属性:

  • <axis>.TorqueThreshold - 轴转矩阈值,用于定义TADDCOMMAND值的限制。如果超过此值,softMC引发一个错误。可以将此值设置为用户所需的某个值,或设置为与驱动器MICONT或MIPEAK匹配的值。

例如,将TorqueThreshold设置为与MICONT匹配的值:

将TorqueThreshold设置为与MIPEAK匹配的值:

  • <axis>.AdditiveTorqueDelay - 计算出的附加转矩指令基于pcmdvcmd。由于命令与轴的实际位置和速度之间存在延迟,所以相同的延迟应该被提供给附加转矩。AdditiveTorqueDelay用于此目的。该属性以循环时间为单位,它接受正整数值。AdditiveTorqueDelay工作如下:计算出的一定时间的附加转矩指令后只发送AdditiveTorqueDelay给驱动器。此属性的默认值是3。

如何包含传动比

通常,电机通过齿轮系统连接到关节。齿轮系统会影响电机所承受的扭矩负载,因此扭矩系数应该得到适当的补偿。经过补偿后,TorqueFactor参数将电流实际值参数从电机内部的电流([mMICONT]单位)转换为关节所承受的扭矩(单位[Nm])。

这里GR代表传动比。 图3显示了一个传动比的例子。

图 2 - 在MC-Basic中为EtherCAT驱动器设置所有轴的扭矩系数(TFac)属性


图3 - 齿轮比为1:2的齿轮机构的示例

线性轴

以上所有都是指旋转轴。线性轴和旋转轴相比,是力而不是转矩。这些力以牛顿[N]为单位进行测量。因此,在处理线性轴时应进行一些修改。基本上有两种类型的直线轴 - 带有丝杠/滑轮/其他的旋转电机和直线电机。

带有丝杠/滑轮的旋转电机或用于将旋转运动转换为直线运动的不同类型的机构

这种类型的处理与常规旋转轴一样进行单一修改。用于将旋转运动转换为线性运动的机制将由电机承载的扭矩负载转换为线性轴上的力负载。因此,TorqueFactor应该乘以另一个因子。此参数应包含旋转电机每转一圈(经过齿轮后)的直线运动量。对于丝杆,它将是丝杆导程[毫米/转]。对于一个滑轮,它将是滑轮的半径乘以2π[mm / rev]。TorqueFactor为:

SL代表丝杆导程或等效参数。 图4为一个丝杆导程的例子。


图 4 - 丝杆 (顶部)和丝杆(底部)例子


直线电机

这种类型与普通旋转轴的处理方式相同,但用 MKT 替换MKF属性,单位为[N/A],没有减速比, 因此TorqueFactor为:


操作模式和PDO

驱动器在使用动力学模型时的操作模式应该是周期同步位置模式。 动力学模型用于计算每台电机所需的转矩(或电流),但结果从来都不精确。 附加转矩指令仅用作第3节所述的前馈信号。
以下是使用动力学模型所必需的其他PDO(‘周期同步位置模式’PDO之外)的列表。:

PDO 索引 描述
RX: 0x60B2 转矩偏置 –附加转矩信号
TX 0x6078 实际电流值 – 转矩反馈信号

如何进行动力学模型参数识别

数据采集

识别过程是通过移动机器人来记录运动参数和内部电机转矩。然后,根据机器人模型和测量结果,使用记录的数据来提取动力学模型参数。


高质量的数据对于获得良好的识别结果非常重要。高质量数据包含以不同速度和加速度分布在机器人运动空间的数据点。分散的数据为机器人的各种运动提供更好的参数拟合,从而可以高精度地预测附加转矩指令。


推荐的移动类型是使用正弦波命令。该命令以指定的幅度和频率移动机器人的每个关节。为了获得良好的离散数据,每个关节的振幅应接近其全部位置范围,每个关节的频率应与其他关节不同。每个关节的频率决定了关节之间运动的相关性。如果两个或多个关节具有相同的频率,则它们总是处于相同的相位,这将导致非离散的数据。此外,如果某个关节的频率是另一个关节的频率的倍数,那么在更快的关节的几个周期(更确切地说,乘法因子)之后将会重复相同的运动。实际上,对于任何合理的频率值,运动将在几个周期后重复。但是,为了获得良好的结果,建议每个关节至少获得三个周期的数据。因此,只要运动在这个记录时间内不重复,频率就选择好了。 以下是三种关节机器人的一些示例:


J1 J2 J3 注释 质量
1 2 1.2 j1和j2将在j1的1个周期和j2的2个周期之后重复 Bad
1 1.2 1.2 j2和j3将在j2的3个周期和j3的2个周期之后重复 Medium
1.1 1.3 1.5 j1,j2和j3 将在j1的11个周期,j2的13个周期和j3的15个周期之后重复 Good


第一个例子不是一个好的频率选择,第二个例子是好的,最后一个例子是很好的参数选择。 显示这些正弦波组合的图表如图5所示。


最后,关节的速度也很重要。运动过程中的峰值速度应该接近每个关节的最大速度。在高速度下,动力学模型的加速度和速度对象是显着的,从而允许更准确的识别过程。关节的峰值速度可以通过运动的幅度和频率来调节。首先定义每个关节的振幅,然后设置一些任意的频率,例如{1.1,1.3,1.5},然后用一个标量因子乘以频率矢量:factor * {1.1,1.3,1.5}。通过改变因子,可以控制关节的速度。


图 5 – 在每个图中正弦波的不同频率组合的图表对应于表2,正弦波开始重复的位置(如表2中所述)用橙色圆圈指出(最后的图没有重复)

识别任务的示例

图6显示了识别过程的示意图。


执行识别过程的程序示例,该程序用于delta机器人:

1.  program
2.      dim startPoint as generic joint
3.      dim sineTarget as generic joint
4.      dim SWfreq as generic joint
5. 
6.      startPoint = {-30,-30,-30,-200}
7.      sineTarget = {70,70,70,200}
8.      SWfreq = 0.3*{1,1.27,1.43,1.13} 
9.	
10.     with robot	
11.         attach
11.	    En = 0
12.	    while En
13.	        sleep 100
14.	    end while
15.	    DynamicModel = 1
16.	    En = 1
17.	    while not En
18.	        sleep 100
19.	    end while
20. 
21.	    Move startPoint Abs = 1
22.	    while IsMoving 
23.	        sleep 100
24.	    end while
25.
26.	    SineWave sineTarget SineWaveFreq = SWfreq
27.	    sleep 2000
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz
29.	    IdentificationStart IdentFilterFreq = 80 
30.	' the time of the identification, you can change time.		           
31.	    sleep 20000 
32.	    IdentificationFinish
33. 
34.	    stop
35.	    while IsMoving 
36.	        sleep 100
37.	    end while
38.	    proceed
39.	    En = 0
40.
41.	    detach
42.     end with
43. end program

这里是对示例程序的解释:

行号 描述
6 定义系统每个关节的起始位置
7 定义结束位置
8 定义每个关节的正弦波的频率(注意频率乘以因子0.3)。总的来说,这些是关节在某一时刻的位置:
关节 在某时刻的位置 [deg]
J1
J2
J3
J4
15 定义适合机器人的动力学模型,这将在稍后讨论。 请注意,只有在禁用机器人的情况下,才能修改此参数.
21 将机器人移动到起始位置
26 开始向目标点正弦波运动
29 用IdentificationStart命令开始记录数据。在这行上,还可以设置一个将截止频率设置为IdentFilterFreq收集数据(通过pfb和tfb)的低通滤波器。截止频率必须大于最大正弦波频率。可以尝试多个截止频率,并在原始数据和滤波数据之间进行比较,然后选择过滤大部分噪声而不改变实际数据的数据。请查看识别wiki页面,以获取有关可以为IdentificationStart命令设置的参数的更多信息。
31 设置休眠时间 – 记录时间
32 停止记录并应用动力学模型参数识别


图6 - 识别过程的示意图

在此任务结束时,将在MC文件夹中创建一个名为IDNT<group num>.PRG和IDNT<group num>.REC的文件。
PRG文件包含识别的参数,REC文件包含用于识别的记录数据。
以下小节介绍如何将识别应用于不同的机器人模型。

不同机器人模型的识别过程

单轴模型

有两种类型的单轴关节,直线和旋转。这些类型中的每一个都有几个不同的动力学模型,可以在动力学模型wiki页面(和第5.4节)中查看。 简而言之,这些是不同的模型:

直线轴

直线轴类型有2个动力学模型类型:

  1. 水平轴
  2. 倾斜轴 – 相对于垂直轴线具有角度α的轴,范围在0和90度之间(图7)。当α= 0时,轴是垂直的,当α= 90时,轴是水平的(α参数是通过识别找到的(即,它不是用户输入)。
    图7 - 倾斜的线性轴

旋转轴

旋转轴类型有3种动力学模型:

  1. 简单的旋转轴 - 其质心位于旋转轴上。
  2. 水平曲柄臂轴(图8左)。
  3. 垂直曲柄臂轴(图8右)。
图8 - (左)水平曲柄臂轴,(右)垂直曲柄臂轴


适用于上述所有类型的识别任务示例:

1.  program
2.      dim startPoint as generic joint
3.      dim sineTarget as generic joint
4.      dim SWfreq as generic joint
5. 
6.      startPoint = -350
7.      sineTarget = 350
8.      SWfreq = 1.5 
9.	
10.     with axis	
11.         attach
11.	    En = 0
12.	    while En
13.	        sleep 100
14.	    end while
15.	    DynamicModel = 2
16.	    En = 1
17.	    while not En
18.	        sleep 100
19.	    end while
20. 
21.	    Move startPoint Abs = 1
22.	    while IsMoving 
23.	        sleep 100
24.	    end while
25.
26.	    SineWave sineTarget SineWaveFreq = SWfreq Abs = 1
27.	    sleep 2000
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz
29.	    IdentificationStart IdentFilterFreq = 80 
30.	' the time of the identification, you can change time.		           
31.	    sleep 20000 	
32.	    IdentificationFinish
33. 
34.	    stop
35.	    while IsMoving 
36.	        sleep 100
37.	    end while
38.	    proceed
39.	    En = 0
40.
41.	    detach
42.     end with
43. end program


要重复使用此代码,请记住使用适合于应用程序的频率和振幅值,并使用合适的动力学模型类型。

SCARA机器人

SARA机器人有两个运动学模型,一个有三个轴(XYZ),另一个有四个轴(XYZR)。
但是,只有一种适合这两种运动学模型的动力学模型。 用于3轴SCARA的识别任务示例:

1.  program
2.      dim startPoint as generic joint
3.      dim sineTarget as generic joint
4.      dim SWfreq as generic joint
5. 
6.      startPoint = {-160,-160,0}
7.      sineTarget = {160,160,150}
8.      SWfreq = 0.3*{1,1.27,1.43} 
9.	
10.     with SCARA	
11.         attach
11.	    En = 0
12.	    while En
13.	        sleep 100
14.	    end while
15.	    DynamicModel = 1
16.	    En = 1
17.	    while not En
18.	        sleep 100
19.	    end while
20. 
21.	    Move startPoint Abs = 1
22.	    while IsMoving 
23.	        sleep 100
24.	    end while
25.
26.	    SineWave sineTarget SineWaveFreq = SWfreq
27.	    sleep 2000
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz
29.	    IdentificationStart IdentFilterFreq = 80 
30.	' the time of the identification, you can change time.		           
31.	    sleep 20000 
32.	    IdentificationFinish
33. 
34.	    stop
35.	    while IsMoving 
36.	        sleep 100
37.	    end while
38.	    proceed
39.	    En = 0
40.
41.	    detach
42.     end with
43. end program

用于4轴SCARA的识别任务示例:

1.  program
2.      dim startPoint as generic joint
3.      dim sineTarget as generic joint
4.      dim SWfreq as generic joint
5. 
6.      startPoint = {-160,-160,0,-350}
7.      sineTarget = {160,160,150,350}
8.      SWfreq = 0.3*{1,1.27,1.43,1.13} 
9.	
10.     with SCARA	
11.         attach
11.	    En = 0
12.	    while En
13.	        sleep 100
14.	    end while
15.	    DynamicModel = 1
16.	    En = 1
17.	    while not En
18.	        sleep 100
19.	    end while
20. 
21.	    Move startPoint Abs = 1
22.	    while IsMoving 
23.	        sleep 100
24.	    end while
25.
26.	    SineWave sineTarget SineWaveFreq = SWfreq
27.	    sleep 2000
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz
29.	    IdentificationStart IdentFilterFreq = 80 
30.	' the time of the identification, you can change time.		           
31.	    sleep 20000 
32.	    IdentificationFinish
33. 
34.	    stop
35.	    while IsMoving 
36.	        sleep 100
37.	    end while
38.	    proceed
39.	    En = 0
40.
41.	    detach
42.     end with
43. end program

要重复使用此代码,请记住使用适合于应用程序的频率和幅度值。
一些SCARA机器人具有耦合关节,通常是第三和第四关节。目前,SCARA机器人的动力学模型没有考虑耦合。因此,耦合关节可能会有很大的误差。


DELTA机器人

Delta机器人有两个运动学模型,一个有三个轴(XYZ),另一个有四个轴(XYZR)。
但是,只有一种适合这两种运动学模型的动态模型。 用于3轴Delta的识别任务示例:

1.  program
2.      dim startPoint as generic joint
3.      dim sineTarget as generic joint
4.      dim SWfreq as generic joint
5. 
6.      startPoint = {-30,-30,-30}
7.      sineTarget = {70,70,70}
8.      SWfreq = 0.3*{1,1.27,1.43} 
9.	
10.     with DELTA	
11.         attach
11.	    En = 0
12.	    while En
13.	        sleep 100
14.	    end while
15.	    DynamicModel = 1
16.	    En = 1
17.	    while not En
18.	        sleep 100
19.	    end while
20. 
21.	    Move startPoint Abs = 1
22.	    while IsMoving 
23.	        sleep 100
24.	    end while
25.
26.	    SineWave sineTarget SineWaveFreq = SWfreq
27.	    sleep 2000
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz
29.	    IdentificationStart IdentFilterFreq = 80 
30.	' the time of the identification, you can change time.		           
31.	    sleep 20000 
32.	    IdentificationFinish
33. 
34.	    stop
35.	    while IsMoving 
36.	        sleep 100
37.	    end while
38.	    proceed
39.	    En = 0
40.
41.	    detach
42.     end with
43. end program


适用于4轴Delta的识别任务示例:

1.  program
2.      dim startPoint as generic joint
3.      dim sineTarget as generic joint
4.      dim SWfreq as generic joint
5. 
6.      startPoint = {-30,-30,-30,-350}
7.      sineTarget = {70,70,70,350}
8.      SWfreq = 0.3*{1,1.27,1.43,1.13} 
9.	
10.     with DELTA	
11.         attach
11.	    En = 0
12.	    while En
13.	        sleep 100
14.	    end while
15.	    DynamicModel = 1
16.	    En = 1
17.	    while not En
18.	        sleep 100
19.	    end while
20. 
21.	    Move startPoint Abs = 1
22.	    while IsMoving 
23.	        sleep 100
24.	    end while
25.
26.	    SineWave sineTarget SineWaveFreq = SWfreq
27.	    sleep 2000
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz
29.	    IdentificationStart IdentFilterFreq = 80 
30.	' the time of the identification, you can change time.		           
31.	    sleep 20000 
32.	    IdentificationFinish
33. 
34.	    stop
35.	    while IsMoving 
36.	        sleep 100
37.	    end while
38.	    proceed
39.	    En = 0
40.
41.	    detach
42.     end with
43. end program


要重复使用此代码,请记住使用适合于应用程序的频率和幅度值。

PUMA机器人

PUMA机器人只有一个运动学模型,但它有两个不同的动力学模型。
第一个动力学模型是像其他机器人一样的常规模型。
第二个模型是一个半静态模型,这意味着它只适用于慢动作和静态位置。该模型仅考虑重力和摩擦力/扭矩。

完整常规模式

该模型识别规则和之前的模型一样。
PUMA工作的识别任务示例:

1.  program
2.      dim startPoint as generic joint
3.      dim sineTarget as generic joint
4.      dim SWfreq as generic joint
5. 
6.      startPoint = {-100,-170,100,-60,-60,-100}
7.      sineTarget = {100,-40,235,60,60,100}
8.      SWfreq = 0.15*{1.56,1,1.31,1.47,1.21,1.17}
9.	
10.     with PUMA	
11.         attach
11.	    En = 0
12.	    while En
13.	        sleep 100
14.	    end while
15.	    DynamicModel = 1
16.	    En = 1
17.	    while not En
18.	        sleep 100
19.	    end while
20. 
21.	    Move startPoint Abs = 1
22.	    while IsMoving 
23.	        sleep 100
24.	    end while
25.
26.	    SineWave sineTarget SineWaveFreq = SWfreq
27.	    sleep 2000
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz
29.	    IdentificationStart IdentFilterFreq = 80 
30.	' the time of the identification, you can change time.		           
31.	    sleep 20000 
32.	    IdentificationFinish
33. 
34.	    stop
35.	    while IsMoving 
36.	        sleep 100
37.	    end while
38.	    proceed
39.	    En = 0
40.
41.	    detach
42.     end with
43. end program

要重复使用此代码,请记住使用适合于应用程序的频率和幅度值。

半静态模型

到目前为止,半静态模型识别与所有的例子都有一点不同。 这个模型只考虑重力和摩擦力,换句话说它忽略了动力。 因此,测量应该包括可以忽略不计的动态力,这可以通过缓慢运动来实现。
这个识别过程比通常的识别过程更长,大约需要2-3分钟。另外,建议执行少于3个周期,1个周期就足够了。.
另外,类似于前面的例子,半静态模型阈值数据点的速度。但是与前面的例子不同,这里有两个阈值,一个用于避免非常低的速度,避免数字误差),另一个用于避免高速度(避免显着的动态力)。 这种识别过程的例子:

1.  program
2.      dim startPoint as generic joint
3.      dim sineTarget as generic joint
4.      dim SWfreq as generic joint
5. 
6.      startPoint = {-100,-170,100,-60,-60,-100}
7.      sineTarget = {100,-40,235,60,60,100}
8.      SWfreq = 0.02*{1.56,1,1.31,1.47,1.21,1.17}
9.	
10.     with PUMA	
11.         attach
11.	    En = 0
12.	    while En
13.	        sleep 100
14.	    end while
15.	    DynamicModel = 1
16.	    En = 1
17.	    while not En
18.	        sleep 100
19.	    end while
20. 
21.	    Move startPoint Abs = 1
22.	    while IsMoving 
23.	        sleep 100
24.	    end while
25.
26.	    SineWave sineTarget SineWaveFreq = SWfreq
27.	    sleep 2000
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz
29.	    IdentificationStart IdentFilterFreq = 80 
30.	' the time of the identification, you can change time.		           
31.	    sleep 20000 
32.	    IdentificationFinish
33. 
34.	    stop
35.	    while IsMoving 
36.	        sleep 100
37.	    end while
38.	    proceed
39.	    En = 0
40.
41.	    detach
42.     end with
43. end program


请注意造成慢速运动的重要低频。

图9 - 识别过程中puma机器人的运动路径示例

动力学模型参数

本节列出了每种类型的动力学模型的动力学参数。

旋转轴

动力学模型1 - 简单的旋转轴

序号 参数 注释
1 运动部件的旋转轴周围的总转动惯量
模型方程


动力学模型2 - 水平曲柄臂轴

序号 参数 Comments
1 运动部件的旋转轴周围的总转动惯量
2 曲柄臂的长度的平方(轴到有效载荷)
模型方程


动力学模型3 - 垂直曲柄臂轴

序号 参数 注释
1 运动部件的旋转轴周围的总转动惯量
2 曲柄臂的长度的平方(轴到有效载荷)
3 质量(无有效载荷)* 重力加速度* 到质心的距离
4 重力加速度 * 到有效负载的距离
模型方程

线性轴

动力学模型1 - 水平轴

图10 - 水平线性轴
序号 参数 注释
1 运动部分的总质量。
模型方程


动力学模型2 - 垂直或倾斜的轴

图11 - 垂直线性轴
序号 参数 注释
1 运动部分的总质量.
2 由重力产生的恒力
3 用于考虑有效载荷质量的重力系数。(g = 9.80665)
模型方程

SCARA 机器人

动力学模型1

图 12 - scara机器人
序号 参数 注释
1
2
3
4
5
6
7
8

DELTA 机器人

动力学模型1

图 13 - Delta 机器人
序号 参数 注释
1 kg*m2
2 kg*m2/sec2
3 kg
4 kg*m2
5 kg
6 kg
7 kg*m2
8 kg*m2
9 m
10 m
11
12
13
14

PUMA 机器人

动力学模型1

图 14 - Puma机器人

Description:

  • - 重力常数
  • - 第 ith个连杆的质量
  • - 第ith和第ith+1关节之间的公共法线的长度
  • - 在第ith个和第ith+1个关节之间沿z轴偏移
  • - 从第ith个关节到第ith+1 个关节质量中心的距离
Number Parameter Comments
1
kg/m^2
2 kg/m^2
3 kg/m^2
4 kg/m^2
5 kg/m^2
6 kg/m^2
7 kg/m^2
8 kg/m^2
9 kg/m^2
10 kg/m^2
11 kg/m^2
12 kg/m^2
13 kg/m^2
14 kg/m^2
15 kg/m^2
16 kg/m^2
17 kg/m^2
18 kg/m^2
19 kg/m^2
20 kg/m^2
21 kg/m^2
22 kg/m^2
23 kg/m^2

Dynamic Model 2 - Gravity

Number Parameter Comments
1 kg*m^2/s^2
2 kg*m^2/s^2
3 kg*m^2/s^2
4 kg*m^2/s^2

Identification with a Payload

The IdentificationStart command has a boolean parameter called ‘IdentPayload’. If this parameter is set to false, the identification process is performed regularly. If this parameter is set to true, the identification process identifies only the payload mass or inertia.


In order to identify the payload, one must follow these steps:

  1. Perform an identification process without the payload.
  2. Set the dynamic model parameters (by running the identification PRG file).
  3. Set ‘IdentPayload’ to true and perform an identification process with the payload.
NOTE-Info.svgNOTE
After performing an identification process with the payload and setting ‘IdentPayload’ to true, the identification PRG file will contain the dynamic model parameters form step 1, and the payload parameters from step 3


NOTE-Info.svgNOTE
This procedure is valid to all dynamic models except dynamic model 1 of the PUMA robot.

Explanation of the identification output file

Example of an identification output PRG file. The file is generated at the end of the identification process, and is named: IDNT<group num>.PRG:

1. 'Dynamic parameter identification for PUMA succeeded!
2. 'Identification date and time: 29/03/17 08:17:08
3. 'Max relative torque error: axis 1 = 13.86 %; axis 2 = 8.70 %; axis 3 = 7.79 %; axis 4 = 17.87 %; axis 5 = 23.87 %; axis 6 = 43.85 %; (maximal allowed = 50.00 %)
4. 'Mean relative torque error: axis 1 = 3.18 %; axis 2 = 1.71 %; axis 3 = 1.88 %; axis 4 = 3.59 %; axis 5 = 5.88 %; axis 6 = 12.41 %;
5. 'Signal filter cutoff frequency = 20.000 Hz
6. 'Signal data length = 49876 samples (raw record length = 50000 samples)
7. 'Moving data length: axis 1 = 35998 samples (threshold = 0.038770 rad/s); axis 2 = 35405 samples (threshold = 0.031481 rad/s); axis 3 = 36032 samples (threshold = 0.039294 rad/s); axis 4 = 36785 samples (threshold = 0.041069 rad/s); axis 5 = 34931 samples (threshold = 0.038757 rad/s); axis 6 = 29759 samples (threshold = 0.062830 rad/s); 

8.  PROGRAM CONTINUE
9.  ATTACH PUMA

10. PUMA.DynamicParameter[1] = 8.759309007e+01
11. PUMA.DynamicParameter[2] = 1.021832253e+01
12. PUMA.DynamicParameter[3] = 3.042091725e+01
13. PUMA.DynamicParameter[4] = 1.560383089e+00
14. PUMA.DynamicParameter[5] = 0.000000000e+00
15. PUMA.DynamicParameter[6] = 0.000000000e+00

16. A1.ViscousFriction = -1.547427791e+02
17. A1.CoulombFriction = -2.018153298e+01

18. A2.ViscousFriction = -1.603287029e+02
19. A2.CoulombFriction = -4.658045702e+01

20. A3.ViscousFriction = -1.085257604e+02
21. A3.CoulombFriction = -1.961987594e+01

22. A4.ViscousFriction = -1.142833743e+01
23. A4.CoulombFriction = -9.124446870e+00

24. A5.ViscousFriction = -2.468491129e+01
25. A5.CoulombFriction = -3.713111266e+00

26. A6.ViscousFriction = -2.173025205e+00
27. A6.CoulombFriction = -9.724658207e-01

29. PUMA.DynamicModel = 2

30. DETACH PUMA
31. TERMINATE PROGRAM

Line 1-7 give information about the identification process. Line 1 reports if the identification was successful or not.

 
2. 'Identification date and time: 29/03/17 08:17:08
3. 'Max relative torque error: axis 1 = 13.86 %; axis 2 = 8.70 %; axis 3 = 7.79 %; axis 4 = 17.87 %; axis 5 = 23.87 %; axis 6 = 43.85 %; (maximal allowed = 50.00 %)

Line 2 reports the date and time the identification was made.
Line 3 reports the recorded max relative torque error. The torque error is taken as the TorqueAdditiveCommand (Taddcmd) minus the measured TorqueFeedback. The Taddcmd for this calculation is taken as the Taddcmd that would have been calculated with the identified dynamic parameters as if this movement was performed. In other words, the error is the difference between the real data and the fitted model. The relative torque error is calculated as the torque error divided by the max measured TorqueFeedback (each joint and its max TorqueFeedback value). The max relative torque error, is the maximum value of the relative value for each joint. The formula for the max relative torque error is:


If this value is larger than 50% for one of the joints than the identification is regarded as failed.


4. 'Mean relative torque error: axis 1 = 3.18 %; axis 2 = 1.71 %; axis 3 = 1.88 %; axis 4 = 3.59 %; axis 5 = 5.88 %; axis 6 = 12.41 %;
5. 'Signal filter cutoff frequency = 20.000 Hz
6. 'Signal data length = 49876 samples (raw record length = 50000 samples)


Line 4 reports the mean relative torque error, the mean of the relative torque error over all of the recorded time is taken and displayed for each joint.
Line 5 reports the cutoff frequency that was used for the low pass filter.
Line 6 reports how many data points were recorded.


7. 'Moving data length: axis 1 = 35998 samples (threshold = 0.038770 rad/s); axis 2 = 35405 samples (threshold = 0.031481 rad/s); axis 3 = 36032 samples (threshold = 0.039294 rad/s);
'axis 4 = 36785 samples (threshold = 0.041069 rad/s); axis 5 = 34931 samples (threshold = 0.038757 rad/s); axis 6 = 29759 samples (threshold = 0.062830 rad/s);


Line 7 reports how many data points from each joint were taken for the model fitting. Some data points are discarded if the velocity of the joint in these point is below some threshold (the threshold for each joint is also reported in this line). This is done because the data points with low velocities are causing numerical errors to the model fitting. Therefore, all of the relative errors explained above are calculated only for those points which are taken into account for the model fitting.


 
10. PUMA.DynamicParameter[1] = 8.759309007e+01
11. PUMA.DynamicParameter[2] = 1.021832253e+01
12. PUMA.DynamicParameter[3] = 3.042091725e+01
13. PUMA.DynamicParameter[4] = 1.560383089e+00
14. PUMA.DynamicParameter[5] = 0.000000000e+00
15. PUMA.DynamicParameter[6] = 0.000000000e+00

Lines 10-15 (for this file) sets the fitted dynamic model parameters.


16. A1.ViscousFriction = -1.547427791e+02
17. A1.CoulombFriction = -2.018153298e+01
18. A2.ViscousFriction = -1.603287029e+02
19. A2.CoulombFriction = -4.658045702e+01
20. A3.ViscousFriction = -1.085257604e+02
21. A3.CoulombFriction = -1.961987594e+01
22. A4.ViscousFriction = -1.142833743e+01
23. A4.CoulombFriction = -9.124446870e+00
24. A5.ViscousFriction = -2.468491129e+01
25. A5.CoulombFriction = -3.713111266e+00
26. A6.ViscousFriction = -2.173025205e+00
27. A6.CoulombFriction = -9.724658207e-01

Lines 16-27 (for this file) sets the fitted friction parameters.


29. PUMA.DynamicModel = 2


Line 29 (for this file) sets the dynamic model that was used for this identification process.


Success condition

The success condition is based on the relative torque error. Each axis should have a max relative torque error value below 50% in order for the identification to be considered as successful.


The torque error is taken as the TorqueAdditiveCommand (Taddcmd) minus the measured TorqueFeedback. The Taddcmd for this calculation is taken as the Taddcmd that would have been calculated with the identified dynamic parameters as if this movement was performed. In other words, the error is the difference between the real data and the fitted model.


The relative torque error is calculated as the torque error divided by the max measured TorqueFeedback (each joint and its max TorqueFeedback value). The max relative torque error, is the maximum value of the relative value for each joint. If this value is larger than 50% for one of the joints than the identification is regarded as failed. Line 4 reports the mean relative torque error, the mean of the relative torque error over all of the recorded time is taken and displayed for each joint. Please note that the relative torque error is evaluated only for the points that stand in a minimum velocity limitation.


The max relative torque error may vary between the different joint. Typically, small joints (with small motors) have larger relative error. This is because the applied torque for these motors is small and the noise in measurement is in the same order of magnitude of the applied torque.


For example: Let’s assume that for a certain point j1.TorqueFeedback = 80 and the j1.TorqueAdditiveCommand = 100. For this point, the j1.TorqueError = 20. Let’s assume that the maximum j1.TorqueFeedback during the recording was 160, then the relative torque error for this point would be: j1.TorqueError/max(j1.TorqueFeedback) = 20/160 = 0.125 = 12.5%

Parameters

Robot models which are supported for dynamic model, have at least one type of dynamic model. These models can be found in the wiki page Dynamic Models. Each model is based on some parameters which are composed of the mass, length and inertia of the different parts of the robot. These are the parameters that are being evaluated with the help of the identification process. The parameters are saved as robot.DynamicParameter[i], where robot is the robot name and i is the number of the parameter as stated in the Dynamic Models page. Each model may have different number of parameters.


After the dynamic parameter, appear the viscous friction and coulomb friction parameters: axis.ViscousFriction, axis.CoulombFriction . Each joint of the robot has these two parameters which define its friction coefficients.


In addition to these parameters, the user should consider to set the maximum allowed value for the additive torque command. This could be set with the property TorqueThreshold, e.g. a1.TorqueThreshold = 200. If the Taddcmd exceeds this value, than the softMC reports an error.


Including the identification output file in setup

In order for the dynamic model to take effect you should simply run the IDNT<group num>.PRG file while the robot is disabled (en = 0). Note that this should come after the robot setup. In order to automatically load the dynamic model configuration during the system initialization and robot setup, simply add the line:

Load IDNT<group num>.PRG To the end of your AUTOEXEC.PRG or STARTPRG.PRG file, after the robot setup.

Explanation of the identification process recording file

Another file that is generated at the end of the identification process is the data recording file. This file is named: IDNT<group num>.REC. This file contains all of the relevant data that was used by the identification process. Here are the parameters which are displayed for each joint:

  • tfbRaw – The raw recorded data of the TorqueFeedback (tfb) property.
  • pfbRaw – The raw recorded data of the PositionFeedback (pfb) property.
  • tfb – The filtered recorded data of the TorqueFeedback (tfb) property.
  • pfb – The filtered recorded data of the PositionFeedback (pfb) property.
  • vfb – The filtered recorded data of the VelocityFeedback (vfb) property.
  • afb – The filtered recorded data of the AccelerationFeedback (afb) property.
  • tcmd – The torque command generated by the fitted model. The found dynamic parameters and the collected data are used to calculate this property. In regular mode, this property will actually be TorqueAdditiveCommand (Taddcmd).
  • te – The TorqueError (te) calculated by the difference of the tcmd and tfb data.


This file can be used for better debugging and troubleshooting, as well as for better understanding the identification process. At figure 15 you can find example of an identification output REC file:

Figure 15 - An example of an identification output REC file of a semi-static PUMA model

Demonstration of tracking improvements (settling, position error)

SCARA Robot

An experiment was made for a 4 axes scara robot with and without dynamic model. The robot was commanded to move 600[mm] in a straight line with linear velocity of 900[mm/s]. The cartesian velocity of the robot and the ISSETTLED property were recorded during this motion (figure 16 and 17, the ISSETTLED property is scaled by 3000).
The ISSETTLED property indicates whether the actual element position is within the specified settling range. The settling range is defined by the PESETTLE property and is further qualified by the TIMESETTLE property. When the motion profiler has completed, the absolute value of the position error (Target Position – Actual Position) is compared to the PESETTLE property. When the result is less than or equal to this property for the time given by TIMESETTLE, the ISSETTLED flag is set. For this example, the PESETTLE was taken as 0.001. Therefore, one could expect that a shorter settling time indicates on better performance.
Figures 16 and 17 display the recorded data from the experiment. The results are that the settling time for this motion without dynamic model is 300 ms, and the settling time with dynamic model is 260 ms – ~86.7% of the original settling time.

Figure 15 - An example of settling time improvement for SCARA robot. This graph is for the case without dynamic model, the settling time is 300[ms]


Figure 16 - An example of settling time improvement for Delta robot. This graph is for the case with dynamic model, the settling time is reduced to 260[ms]

DELTA Robot

An experiment was made for a 3 axes delta robot with and without dynamic model. The robot was commanded to move 550[mm] in a straight line with linear velocity of 3000[mm/s]. The cartesian velocity of the robot and the ISSETTLED property were recorded during this motion (figure 17 and 18, the ISSETTLED property is scaled by 3000).


The ISSETTLED property indicates whether the actual element position is within the specified settling range. The settling range is defined by the PESETTLE property and is further qualified by the TIMESETTLE property. When the motion profiler has completed, the absolute value of the position error (Target Position – Actual Position) is compared to the PESETTLE property. When the result is less than or equal to this property for the time given by TIMESETTLE, the ISSETTLED flag is set. For this example, the PESETTLE was taken as 0.05.


Therefore, one could expect that a shorter settling time indicates on better performance.


Figures 17 and 18 display the recorded data from the experiment. The results are that the settling time for this motion without dynamic model is 268 ms, and the settling time with dynamic model is 44 ms – ~16.5% of the original settling time.


Figure 17 - An example of settling time improvement for Delta robot. This graph is for the case without dynamic model, the settling time is 268[ms]


Figure 18 - An example of settling time improvement for Delta robot. This graph is for the case with dynamic model, the settling time is reduced to 44[ms]

PUMA Robot

An experiment was made with and without dynamic model. Axis 3 was commanded to oscillate with the SineWave command while axis 2 was commanded to stay at 0.
Figure 19 shows axis 2 position error for the cases with (top) and without (bottom) dynamic model. The peak to peak amplitude for the cases with and without dynamic model are ~0.6e-3 and ~1e-3 correspondingly. It means that using the dynamic model reduced ~40% of the error for this example.

Figure 19 - An example of tracking improvement for PUMA robot. Top - case with dynamic model 0.627e-3 peak to peak amplitude, Bottom - case without dynamic model 1.04e-3 peak to peak amplitude

Collision detection

The dynamic model allows to enable a more delicate collision detection feature. Without the dynamic model, the softMC can detect a collision by thresholding the position error of the robot or joints. However, when using the dynamic model of the robot, a collision can be detected by thresholding the torque error. The torque error reacts quicker than the position error, hence enabling a more delicate collision detection.


In order to activate the thresholding over the torque error for a certain joint, set the property TorqueErrorEnable (Teen) to 1, e.g. a1.Teen = 1. One more property to set is the TorqueErrorMax (Temax), e.g. a1.Temax = 10. This property set the maximum allowed torque error which above it softMC reports an error. Note that the Temax property may vary between joints, usually the bigger the joint’s motor the bigger Temax that the user should allow. Also note that as the dynamic model identification results get more accurate, the Temax can be decreased as the torque error gets smaller.


One last property to consider is the TorqueErrorFilter property. If the torque feedback is noisy, the Temax value can be exceed due to noise which causes false collision triggering. Filtering this noise helps to achieve better collision detection procedure. This property gets values in the range of 0.0 to 1.0. The filter is a very simple averaging filter, it performs as follows:

when TE is the TorqueError property, and TEF is the TorqueErrorFilter property.


Note that usually the largest error occurs in the beginning, ending or direction changing of the movement. Therefore, the magnitude of the errors in these cases determine what the Temax value will be. Nevertheless, these cases are also characterized with very low velocities. Hence, it is possible to write an application that monitors the torque error and joint velocities, and ignore the cases when the velocity is small, or perhaps increase the Temax just for these cases. As a result, the collision detection feature can become very sensitive

Review of the possible reasons for an identification failure

This section reviews some possible reasons that may cause poor results or a failure of the identification process. The next section reviews how to identify these reasons.

Movement is too slow

The dynamic identification model requires that the robot joints will move in a high velocity, as mentioned in section 3. When the joints move at a low velocity, the developed torque in the joints opposes mainly the joints friction and gravity torques, and the acceleration and inertia terms are relatively small. Therefore, the dynamic model parameters identification will perform poorly. Furthermore, the identification process ignores data that is under certain minimal velocity, so moving slowly can also cause for lack of data.


That being said, in such a case, the output PRG identification file may report that the identification process was successful and the resulting max relative errors can be small. However, later, when attempting to move at higher velocities than the velocities used during the identification process, the additive torque command predictions will most likely perform poorly.


Figure 20 shows an example for an identification output REC file for a 3 axes delta robot where the motion was slow during the identification. It is noticeable that the data is very noisy. The reason for that is that the movement is slow, hence the developed torques are small and the relative noise is large


Figure 20 - An example of a slow identification output REC file for a 3 axes delta robot


Figure 21 shows the torque error for the same delta robot and the same motion. The top figure is the result of the motion using the retrieved parameters from a slow identification process and the bottom figure is the result of the motion using the retrieved parameters from a good identification process. One can see that the torque errors increase dramatically for the case with slow identification process

Figure 21 – top – the torque error for the 3 axes of the delta robot using the retrieved dynamic parameters from a slow identification process. Botoom – the torque error for the 3 axes of the delta robot using the retrieved dynamic parameters from a slow identification process.

Movement is too fast

This problem is less likely to happen, but still, it can cause poor results or a failure of the identification process.
If the robot joints are brought to their limits, the motor torque can reach to a saturation value. The current dynamic model does not take saturation into account, therefore, if saturation occurred, it will cause poor identification results

Movement duration is too short

The identification is based on the collected data that is recorded during the robot movement. If there is not enough data, the identification may overfit the data and will predict accurately just for the region of the collected data. In such case the identification may be reported as successful, hence the user has to judge if the collected data is sufficient. A rule of thumb is that each joint should complete at least 3 cycles.

Movement region is too small

The identification is based on the collected data that is recorded during the robot movement. If the data is not scattered over the entire work area of the robot, the identification may overfit the data and will predict accurately just for the region of the collected data.
In such case the identification may be reported as successful, hence the user has to judge if the collected data is sufficient. A rule of thumb is that each joint should reach position values closely to its negative and positive position limits.

TorqueFactor properties are not configured well

The dynamic model of each robot is based on the MKS system of units defines, hence the torque feedback values should be in units of [Nm]. If the TorqueFactor properties are not configured well than the torque feedback will not have suitable values and the model equations will be wrong.
In such a case, the identification process will perform poorly and the identified model parameters will not be correct.

Wrong type of DynamicModel property

Some kinematic models are assigned with more than one type of dynamic model. These different models are in order to deal with different configurations. For example, a linear axis may be horizontal, vertical, or tilted in a certain angle, each of those configurations has a different dynamic model and different DynamicModel property value.
If a wrong DynamicModel value is set, the identification process will perform poorly.

How to assess what is the failure reason based on the output files

This section reviews some possible failure results of the generated identification files and the identification process. The failures may be the failure of the identification process, or successful identification process with poor performance results.

Identification process failure

An identification failure is the case where one of the joints results with a max relative error larger than 50%. Here are some reasons that may cause this result:

  • One or more of the joints moved too slow. This can be identified in the output PRG file in lines 6 and 7. Line 6 reports how many data points were collected for each joint. Line 7 reports how many points are with a velocity larger than the velocity threshold. If the data points number after thresholding for one or more of the joints is significantly smaller than the total number of collected points, then it means that this joint moved too slow.
  • One or more of the joints reached saturation. This can be identified in the output REC file. Open the output REC file and observe only the following properties of the joint in subject: tfb, tcmd and te. Saturation can be identified by seeing that the tfb reaches a sudden plateau while the tdcmd continues regularly.
  • Large noise for small joints. For some systems, the noise can be in the same order of magnitude of the mean operation currents. In such cases, the