Time Based Profile (Trapezoidal Acceleration)/zh-hans

From SoftMC-Wiki
Jump to: navigation, search
语言: [[::Time Based Profile (Trapezoidal Acceleration)|English]]  • [[::Time Based Profile (Trapezoidal Acceleration)/zh-hans|中文(简体)‎]]

概述

本文档介绍了ControlStudio中的新运动分析器。 为了了解新的分析器的特性,我们首先描述当前的分析器实现。

两个分析器基本上都是在路径生成期间改变状态的状态机,并且基于每个状态使用不同的公式来计算分析器输出(位置,速度,加速度)。 这些状态是:加速度增加,加速度饱和,加速度减小,零加速度。可以在运动期间重复一些状态(例如,加速状态,然后是减速状态),并且可以完全省略一些状态(例如,在短暂运动中为零加速)。

这两个分析器之间的主要区别是状态选择算法,即系统从一个状态切换到另一个状态的条件。当前的实现(自版本4.5.25起的固件)主要以速度为基础。这意味着当前速度值是分析器切换到另一状态的主要标准。然而,速度值还不够,因此还要使用附加的内部变量:相位角,目标距离,分析器状态。

Illustration 1: Velocity Based Profiler
Illustration 2: Time Based Profiler

新的分析器(自版本4.5.25起)具有仅基于一个变量(当前时间)的状态变化条件。 离线预计算(这两个分析器都是共同的)将预先计算每个状态的切换时间,这将在状态改变时给出一个简单的条件。

这种方法比基于速度的分析器提供了一些好处。 其中之一是采用 safe SP blending feature.

基于时间的分析器 基于速度的分析器
RTK load 非常小,因为没有检查制动距离 在每个采样中检查制动距离。
时间离散化 - 样本落在不同阶段之间 无,因为(p,v,a)值仅在当前时间值上计算 我们需要分别计算每个阶段,然后减去
轻松在线改变目标点 需要全部重复预计算 由于制动距离总是被检查,所以它相对来说比较麻烦。
时间驱动事件(即,在特定时间实例(在达到目标点之前)定义事件) 一个简单的内置功能 非常不便于实施,因为我们实际上不知道运动的总执行时间
总执行时间的预测(例如,在SP混合中,防止第二运动在第二次完成之前进入) 一个简单的内置功能 非常不便于实施,因为我们实际上不知道运动的总执行时间

Implementation Specifics

Language interface.

Originally the system supported only two types of motion profiles: sine acceleration(SA) and trapezoidal velocity (TV). The user selected a motion profile by defining the smooth factor: 0 – TV, everything else is a SA profile. This is very intuitive, as TV is the least smoothest profile that the user can choose (kind of singular profile). But, this is very inconvenient for defining other profile types. Therefore a new property was introduced:
<ELEMENT>. PROFILERTYPE

Profiler Specific

Illustration 3: SA vs TA jerk profile

The first implemented time-based profiler will be trapezoidal acceleration profile. The time-based profiler gives a smooth velocity and position profile (“S”-curve). Compared to the sine-acceleration profile, this profile has a reduced jerk value for the same amount of acceleration and has one more jerk discontinuity point in the acceleration profile. However, considering that the jerk value is also about three times lower (3.14 times), it can be assumed that the two profiles are basically the same. The transformation of TA into TV is done by reducing acceleration increase time to be shorter then the motion sample, contrary to the SA profile, where this transformation is sometimes done silently (acceleration time less than 5 samples). In this profile type the velocity smoothness will be assured by having J/A > T.


Illustration 3: Trapezoidal Acceleration Profile


Side effects:

The proposed profile (TA) is not able of having a non-zero initial and/or final velocity. This constrain causes the following limitations on use of ProfileType=2:

  • The execution of VORD change will be postponed to the first motion entered after its change, i.e., there is no on-line change of velocity command.
  • Motion with StartType immediate or fast-immediate is be not allowed with this profile.
  • In SP-Blending mode, it will be relatively simple to add a feature that prevents entering a third movement before the second one is complete.
  • The new profiler allows introducing time-events prior to motion end.
  • Concatenation (Vfinal ≠ 0) – not possible as this type of profiler does not accept nonzero initial and/or final velocities.
  • BlendingMethod = 1 (Continuous Path) is not be functional with (PrfType = 2). In this case blending is done in profile-following mode where only one motion executes profile and the other just follows it:
  • BlendingMethod = 2 (Super-Position) is fully operational.
  • BlendingMethod = 3 (AI) is fully functional and independent from selected profile type.

New blending properties


Coding Issues

Time Based profiler will have three different functional part and this is the same way we have today with the default Velocity based profile:

  • Pre-Computation, part where the given user parameters of velocity, acceleration and jerk are transformed into actual operational values.
  • Real-time executioner that is called each sampling period and produce next (position, velocity, acceleration) triple.
  • Inverse profiler function, routine that computes internal profiler parameter based on given position inside profiler path. In velocity based profile this function is non-trivial, in time based profile this function is much simpler and will be in the form of . This ability is crucial in implementing BlendProtected feature of the SP blending.
Illustration 4: Trapezoidal Acceleration Profile, possibility of "inverse profiler"

See Also

--Mirko 08:22, 20 December 2010 (CET)