Difference between revisions of "Time Based Profile (Trapezoidal Acceleration)/zh-hans"

From SoftMC-Wiki
Jump to: navigation, search
Line 5: Line 5:
 
</font>
 
</font>
  
Both profilers are basically state machines that change their states during path generation and based on each state use different formulas to compute the profiler output (position, velocity, acceleration). These states are: acceleration increase, acceleration saturation, acceleration decrease, zero acceleration.Some states can be repeated during motion (e.g., an acceleration state, followed by a deceleration state) and some can be completely omitted (e.g., zero acceleration in short motions).<br>
+
两个分析器基本上都是在路径生成期间改变状态的状态机,并且基于每个状态使用不同的公式来计算分析器输出(位置,速度,加速度)。 这些状态是:加速度增加,加速度饱和,加速度减小,零加速度。可以在运动期间重复一些状态(例如,加速状态,然后是减速状态),并且可以完全省略一些状态(例如,在短暂运动中为零加速)。<br>
  
The main difference between these two profilers is the state-selection algorithm i.e., condition on which the system switches from one state to another. The current implementation (firmware since Version 4.5.25) is dominantly velocity based. This means that the current velocity value is the main criteria for the profiler to switch to another state or not. However, the velocity value is not enough, so additional internal variables are also being used: phase angle, target distance, profiler state.
+
这两个分析器之间的主要区别是状态选择算法,即系统从一个状态切换到另一个状态的条件。当前的实现(自版本4.5.25起的固件)主要以速度为基础。这意味着当前速度值是分析器切换到另一状态的主要标准。然而,速度值还不够,因此还要使用附加的内部变量:相位角,目标距离,分析器状态。
  
 
[[Image:AXY-Velocity Based profiler.jpg|thumb|''Illustration 1: Velocity Based Profiler'']]
 
[[Image:AXY-Velocity Based profiler.jpg|thumb|''Illustration 1: Velocity Based Profiler'']]
 
[[Image:AXY-Time Based Profiler.jpg|thumb|''Illustration 2: Time Based Profiler'']]
 
[[Image:AXY-Time Based Profiler.jpg|thumb|''Illustration 2: Time Based Profiler'']]
  
The new profiler (since Version 4.5.25) has a state-change condition based only on one variable – the current time. The off-line pre-calculation (which is common to both profilers) will pre-calculate switching times for each state and this will give a simple condition when the states should be changed.
+
新的分析器(自版本4.5.25起)具有仅基于一个变量(当前时间)的状态变化条件。 离线预计算(这两个分析器都是共同的)将预先计算每个状态的切换时间,这将在状态改变时给出一个简单的条件。
 
 
 
 
Such an approach provides some benefits over the velocity based profiler. One of these is the introduction of [[Safe Superposition (SP) blending| safe SP blending feature.]]
 
  
 +
这种方法比基于速度的分析器提供了一些好处。 其中之一是采用[[Safe Superposition (SP) blending| safe SP blending feature.]]
  
 
{| class="prettytable" border = 1
 
{| class="prettytable" border = 1
 
|  
 
|  
| Time Based Profiler
+
| 基于时间的分析器
 
| Velocity Based Profiler
 
| Velocity Based Profiler
  

Revision as of 06:11, 9 May 2017

语言: [[::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.

基于时间的分析器 Velocity Based Profiler
RTK load Extremely small, as braking distance is not checked Braking distance checked in each sample.
Time discretization – sample falls between different phases None, as (p,v,a) values are computed on the current time value only We need to separately compute each of the phases and then to subtract.
Easy online changes of the target point Whole pre-computation needs to be repeated As braking distance is always checked, it goes relatively painless.
Time driven events (i.e., to define an event on a specific time instance (before reaching the target point)) A simple built-in feature Very inconvenient to implement, as we actually have no idea about the total execution time of the movement
Prediction of the total execution time (e.g., in SP blending, preventing a third motion to enter before the second is finished) A simple built-in feature Very inconvenient to implement, as we actually have no idea about the total execution time of the movement

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)