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

From SoftMC-Wiki
Jump to: navigation, search
Line 1,205: Line 1,205:
 
为了使动力学模型生效,只需在禁用机器人(en = 0)时运行IDNT<group num>.PRG文件。 请注意,这应该在机器人设置之后。 为了在系统初始化和机器人设置期间自动加载动态模型配置,只需添加该行:<br>
 
为了使动力学模型生效,只需在禁用机器人(en = 0)时运行IDNT<group num>.PRG文件。 请注意,这应该在机器人设置之后。 为了在系统初始化和机器人设置期间自动加载动态模型配置,只需添加该行:<br>
  
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=
+
Load IDNT<group num>.PRG到机器人设置'''后''的AUTOEXEC.PRG或START PRG.PRG文件的末尾。
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:<br>
 
  
* tfbRaw – The raw recorded data of the TorqueFeedback (tfb) property.
+
=识别过程记录文件的说明=
* pfbRaw – The raw recorded data of the PositionFeedback (pfb) property.
+
在识别过程结束时生成的另一个文件是数据记录文件。文件名称为: IDNT<group num>.REC。该文件包含识别过程使用的所有相关数据。以下是为每个关节显示的参数:<br>
* 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.
 
  
 +
* tfbRaw – TorqueFeedback(tfb)属性的原始记录数据。
 +
* pfbRaw – PositionFeedback(pfb)属性的原始记录数据。
 +
* tfb – 经过滤波的TorqueFeedback(tfb)属性的记录数据。
 +
* pfb – 经过滤波的PositionFeedback(pfb)属性的记录数据。
 +
* vfb – 经过滤波的VelocityFeedback (vfb)属性的记录数据。
 +
* afb – 经过滤波的AccelerationFeedback (afb)属性的记录数据。
 +
* tcmd –拟合模型生成的扭矩指令。识别的动力学参数和收集的数据用于计算此属性。 在常规模式下,这个属性实际上是TorqueAdditiveCommand(Taddcmd)。
 +
* te – TorqueError(te)由tcmd和tfb数据的差值计算得出。
  
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:  
+
该文件可用于更好的调试和故障排除,以及更好地理解识别过程。在图15中,您可以找到识别输出REC文件的示例:
  
 
[[file: DM_19.png|1000px|thumb|center|<center><big>''Figure 15 - An example of an identification output REC file of a semi-static PUMA model''</big></center>]]
 
[[file: DM_19.png|1000px|thumb|center|<center><big>''Figure 15 - An example of an identification output REC file of a semi-static PUMA model''</big></center>]]
  
=Demonstration of tracking improvements (settling, position error)=
+
=跟踪改进的示例(整定,位置误差)=
==SCARA Robot==
+
==SCARA机器人==
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). <br>
+
有和没有动力学参数的4轴scara机器人的实验。机器人以900[mm/s]的线速度运动600[mm],在这个运动中记录机器人的笛卡尔速度和ISSETTLED属性(图16和17,ISSETTLED属性缩放3000倍)<br>
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. <br>
 
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. <br>
 
  
[[file:DM_20.png|850px|thumb|center|<center><big>''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]''</big></center>]]
+
ISSETTLED属性指示实际运动元素位置是否在指定的整定范围内。整定范围由PESETTLE属性定义,并由TIMESETTLE属性进一步限定。当运动分析器完成后,位置误差(目标位置 - 实际位置)的绝对值将与PESETTLE属性进行比较。当结果小于或等于此属性的TIMESETTLE给定的时间时,ISSETTLED标志被设置。对于这个例子,PESETTLE被认为是0.001。因此,可以预期较短的整定时间表示较好的性能。<br>
 +
图16和17显示了来自实验的记录数据。结果表明,无运力学模型的运动的整定时间为300 ms,有动力学模型的整定时间为260 ms〜原整定时间的86.7%。<br>
  
  
[[file:DM_21.png|850px|thumb|center|<center><big>''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]''</big></center>]]
+
[[file:DM_20.png|850px|thumb|center|<center><big>''图 15 - SCARA机器人整定时间的一个例子。该图是针对没有动力学模型的情况,整定时间为300 [ms]''</big></center>]]
  
==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). <br>
 
  
 +
[[file:DM_21.png|850px|thumb|center|<center><big>''图 16 - Delta机器人整定时间改进的一个例子。该图是针对动力学模型的情况,整定时间减少到260 [ms]''</big></center>]]
  
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.<br>  
+
==DELTA 机器人==
 +
有和没有动力学参数的3轴Delta机器人的实验。机器人以3000[mm/s]的线速度运动550[mm],在这个运动中记录机器人的笛卡尔速度和ISSETTLED属性(图17和18,ISSETTLED属性缩放3000倍)<br>  
  
 +
ISSETTLED属性指示实际元素位置是否在指定的整定范围内。整定范围由PESETTLE属性定义,并由TIMESETTLE属性进一步限定。当运动分析器完成后,位置误差(目标位置 - 实际位置)的绝对值将与PESETTLE属性进行比较。当结果小于或等于此属性的TIMESETTLE给定的时间时,ISSETTLED标志被设置。对于这个例子,PESETTLE被设置为0.05。<br>
  
Therefore, one could expect that a shorter settling time indicates on better performance. <br>
 
  
 +
因此,可以预期较短的建立时间表示较好的性能。<br>
  
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.
 
  
 +
图17和18显示了来自实验的记录数据。结果表明,无动力学模型的这种运动的整定时间为268ms,动力学模型的整定时间44ms〜为原始建立时间的16.5%。
  
[[file:DM_22.png|850px|thumb|center|<center><big>''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]''</big></center>]]
 
  
  
[[file:DM_23.png|850px|thumb|center|<center><big>''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]''</big></center>]]
+
[[file:DM_22.png|850px|thumb|center|<center><big>''图 17 - Delta机器人整定时间改进的一个例子。该图是针对没有动力学模型的情况,整定时间为268 [ms]''</big></center>]]
  
==PUMA Robot==
+
 
 +
[[file:DM_23.png|850px|thumb|center|<center><big>''图 18 - Delta机器人整定时间改进的一个例子。 该图是针对有动力学模型的情况,整定时间减少到44 [ms]''</big></center>]]
 +
 
 +
==PUMA 机器人==
 
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.<br>
 
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.<br>
 
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 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.

Revision as of 03:17, 22 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 个关节质量中心的距离
序号 参数 注释
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

动力学模型2 - 重力

序号 参数 注释
1 kg*m^2/s^2
2 kg*m^2/s^2
3 kg*m^2/s^2
4 kg*m^2/s^2

带有有效载荷的参数识别

IdentificationStart命令有一个名为‘IdentPayload’的布尔参数。如果此参数设置为false,则会定期执行识别过程。如果此参数设置为true,则识别过程仅识别有效载荷质量或惯性。

为了识别有效载荷,必须遵循这些步骤:

  1. 执行识别过程没有有效载荷。
  2. 设置动力学模型参数(通过运行identification PRG文件)。
  3. 将‘IdentPayload’设置为true,并对有效负载执行识别过程。
NOTE-Info.svgNOTE
在对有效载荷执行识别过程并将“IdentPayload”设置为true之后,identification PRG文件将包含步骤1中的动态模型参数以及步骤3中的有效载荷参数。


NOTE-Info.svgNOTE
该程序适用于所有动态模型除PUMA机器人的动力学模型1外

识别输出文件的说明

识别输出PRG文件的示例。该文件在识别过程结束时生成,命名为: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

1-7行提供了有关识别过程的信息。第1行报告识别是否成功。

 
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 %)

第2行报告识别的日期和时间.
第3行报告记录的最大相对扭矩误差。扭矩误差作为TorqueAdditiveCommand(Taddcmd)减去测量的TorqueFeedback。这个计算的Taddcmd被当作Taddcmd,这个Taddcmd可以用已经确定的动力学参数进行计算,就好像这个运动已经完成了一样。 换句话说,误差是真实数据和拟合模型之间的差异。 相对转矩误差的计算方法是转矩误差除以最大测量转矩反馈(每个关节及其最大转矩反馈值)。 最大相对转矩误差是每个关节相对值的最大值。最大相对转矩误差的公式是:


如果其中一个关节的这个值大于50%,则认定为失败。


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)


第4行报告平均相对转矩误差,所有记录时间的相对转矩误差平均值被记录并显示在每个关节上。
第5行报告用于低通滤波器的截止频率。
第6行报告记录了多少个数据点。


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);


第7行报告每个关节有多少数据点用于模型拟合。 如果这些点中的关节速度低于某个阈值(每个关节的阈值也在该行中报告),则丢弃一些数据点。这是因为低速数据点导致模型拟合的数值误差。 因此,上面解释的所有相对误差只是针对模型拟合所考虑的那些点来计算的。


 
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

第10-15行(为此文件)设置拟合的动力学模型参数。


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

第16-27行(用于此文件)设置拟合的摩擦参数。

29. PUMA.DynamicModel = 2


第29行(为此文件)设置用于此识别过程的动力学模型。


成功条件

成功的条件是基于相对扭矩误差。每个轴应具有低于50%的最大相对扭矩误差值,以便将识别视为成功。


扭矩误差作为TorqueAdditiveCommand(Taddcmd)减去测量的TorqueFeedback。 这个计算的Taddcmd被当作Taddcmd,这个Taddcmd可以用已经确定的动力学参数进行计算,就好像这个运动已经完成了一样。 换句话说,误差是真实数据和拟合模型之间的差异。


相对转矩误差的计算方法是转矩误差除以最大测量转矩反馈(每个关节及其最大转矩反馈值)。 最大相对转矩误差是每个关节相对值的最大值。 如果其中一个关节的这个值大于50%,则认定为失败。 第4行报告平均相对转矩误差,所有记录时间的相对转矩误差平均值被记录并显示在每个关节上。 请注意,相对扭矩误差仅针对处于最小速度限制的点进行评估。


不同关节之间的最大相对扭矩误差可能会有所不同。通常,小型关节(小型电机)具有较大的相对误差。这是因为这些电机所施加的转矩很小,测量中的噪音与所施加的转矩处于相同的数量级。


例如: 我们假设对于某个点j1.TorqueFeedback = 80和j1.TorqueAdditiveCommand = 100.对于这一点,j1.TorqueError = 20.假设在记录过程中最大j1.TorqueFeedback是160,那么对于这一点相对转矩误差将是:j1.TorqueError/max(j1.TorqueFeedback) = 20/160 = 0.125 = 12.5%


参数

支持的机器人模型的动力学模型至少有一种动力学模型。 这些模型可以在wiki 页面中 Dynamic Models找到。 每个模型都基于一些由机器人不同部分的质量,长度和惯性组成的参数。 这些是借助识别过程正在评估的参数。 参数保存为robot.DynamicParameter [i],其中robot是机器人名称,i是Dynamic Models页面中所述参数的编号。 每个模型可能有不同数量的参数。


在动力学参数后,出现粘性摩擦和库仑摩擦参数:轴。摩擦摩擦,轴线。库仑摩擦。 机器人的每个关节都有这两个参数来定义它的摩擦系数。


除了这些参数之外,用户还应该考虑设置附加转矩指令的最大允许值。 这可以通过属性TorqueThreshold来设置,例如, a1.TorqueThreshold = 200.如果Taddcmd超过此值,则会给softMC报告错误。


在设置中包含标识输出文件

为了使动力学模型生效,只需在禁用机器人(en = 0)时运行IDNT<group num>.PRG文件。 请注意,这应该在机器人设置之后。 为了在系统初始化和机器人设置期间自动加载动态模型配置,只需添加该行:


Load IDNT<group num>.PRG到机器人设置'的AUTOEXEC.PRG或START PRG.PRG文件的末尾。

识别过程记录文件的说明

在识别过程结束时生成的另一个文件是数据记录文件。文件名称为: IDNT<group num>.REC。该文件包含识别过程使用的所有相关数据。以下是为每个关节显示的参数:

  • tfbRaw – TorqueFeedback(tfb)属性的原始记录数据。
  • pfbRaw – PositionFeedback(pfb)属性的原始记录数据。
  • tfb – 经过滤波的TorqueFeedback(tfb)属性的记录数据。
  • pfb – 经过滤波的PositionFeedback(pfb)属性的记录数据。
  • vfb – 经过滤波的VelocityFeedback (vfb)属性的记录数据。
  • afb – 经过滤波的AccelerationFeedback (afb)属性的记录数据。
  • tcmd –拟合模型生成的扭矩指令。识别的动力学参数和收集的数据用于计算此属性。 在常规模式下,这个属性实际上是TorqueAdditiveCommand(Taddcmd)。
  • te – TorqueError(te)由tcmd和tfb数据的差值计算得出。

该文件可用于更好的调试和故障排除,以及更好地理解识别过程。在图15中,您可以找到识别输出REC文件的示例:

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

跟踪改进的示例(整定,位置误差)

SCARA机器人

有和没有动力学参数的4轴scara机器人的实验。机器人以900[mm/s]的线速度运动600[mm],在这个运动中记录机器人的笛卡尔速度和ISSETTLED属性(图16和17,ISSETTLED属性缩放3000倍)。

ISSETTLED属性指示实际运动元素位置是否在指定的整定范围内。整定范围由PESETTLE属性定义,并由TIMESETTLE属性进一步限定。当运动分析器完成后,位置误差(目标位置 - 实际位置)的绝对值将与PESETTLE属性进行比较。当结果小于或等于此属性的TIMESETTLE给定的时间时,ISSETTLED标志被设置。对于这个例子,PESETTLE被认为是0.001。因此,可以预期较短的整定时间表示较好的性能。
图16和17显示了来自实验的记录数据。结果表明,无运力学模型的运动的整定时间为300 ms,有动力学模型的整定时间为260 ms〜原整定时间的86.7%。


图 15 - SCARA机器人整定时间的一个例子。该图是针对没有动力学模型的情况,整定时间为300 [ms]


图 16 - Delta机器人整定时间改进的一个例子。该图是针对动力学模型的情况,整定时间减少到260 [ms]

DELTA 机器人

有和没有动力学参数的3轴Delta机器人的实验。机器人以3000[mm/s]的线速度运动550[mm],在这个运动中记录机器人的笛卡尔速度和ISSETTLED属性(图17和18,ISSETTLED属性缩放3000倍)。

ISSETTLED属性指示实际元素位置是否在指定的整定范围内。整定范围由PESETTLE属性定义,并由TIMESETTLE属性进一步限定。当运动分析器完成后,位置误差(目标位置 - 实际位置)的绝对值将与PESETTLE属性进行比较。当结果小于或等于此属性的TIMESETTLE给定的时间时,ISSETTLED标志被设置。对于这个例子,PESETTLE被设置为0.05。


因此,可以预期较短的建立时间表示较好的性能。


图17和18显示了来自实验的记录数据。结果表明,无动力学模型的这种运动的整定时间为268ms,动力学模型的整定时间44ms〜为原始建立时间的16.5%。


图 17 - Delta机器人整定时间改进的一个例子。该图是针对没有动力学模型的情况,整定时间为268 [ms]


图 18 - Delta机器人整定时间改进的一个例子。 该图是针对有动力学模型的情况,整定时间减少到44 [ms]

PUMA 机器人

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