![]() |
APIs, concepts, guides, and more
|
S-Curve Motion offers a smoother acceleration profile compared to Trapezoidal Motion, utilizing a "Jerk Percent" parameter to fine-tune how acceleration phases are shaped, allowing precise control over motion transitions and peak accelerations.
S-Curve Motion initiates a point-to-point motion using an āSā shaped velocity profile similar to that shown below.
This move type generates a motion that takes the same time as a trapezoidal move but allows the acceleration to have smoother transitions.
This comes at the expense of requiring larger peak accelerations and decelerations. The total move time is always the same as the equivalent trapezoidal move.
Jerk % | Notes | Acceleration | Velocity |
---|---|---|---|
0% |
Acceleration is always constant. This is the same as a Trapezoidal move profile. Peak Acceleration is specified by the user. | ![]() | ![]() |
50% |
Acceleration is ramping 50% of the time and constant for 50% of the time. Peak Acceleration is 133% of the value specified by the user. | ![]() | ![]() |
100% |
Acceleration is ramping 100% of the time and is never constant. Peak Acceleration is 200% of the value specified by the user. | ![]() | ![]() |
Jerk percent is the percentage of time spent with non-zero jerk during the acceleration and deceleration segments of moves.
For the above diagram, the jerk percent is calculated as:
\[ Jerk\_Percent \;=\; \frac{t_{1} + t_{3}}{t_{1} + t_{2} + t_{3}} \times 100\% \]
If the jerk percent for a move is zero, then it imitates a trapezoidal move.
For moves that use jerk percent, the acceleration and deceleration arguments represent the average acceleration and deceleration values for the move, not the peak values. As a consequence, the time of the move remains independent of the jerk percent value, which allows users to more easily calculate the time of a move. For point-to-point moves, this time is the same as a trapezoidal move with the same move parameters.
In many applications it is important to know the maximum acceleration and deceleration of a particular move. As discussed earlier, when using jerk percent, the average acceleration and decelerations are specified (not the maximum values). Fortunately, there is a simple conversion between average and maximum accelerations.
Changing the Jerk Percent will change the max acceleration given by this formula:
\[ \displaystyle max\_accel \;=\; \frac{accel}{1 - \bigl(jerk\_percent \cdot 0.005\bigr)} \]
max_accel: the maximum acceleration (or decel) for a point-to-point profile.
accel: the specified acceleration (or decel) used with MoveSCurve.
jerk_percent: the specified jerk percentage (0 to 100.0) from the application code.
While S-Curve motion is designed for smooth, continuous profiles, its execution on a time-sampled system (such as the RMP's 1ms (default) servo sample) introduces quantization effects. This is most apparent during very short-duration moves. The firmware precisely tracks theoretical frame durations, even those with non-integer sample values, by accumulating time across servo samples. However, the commanded output is only updated once per sample, which can lead to the following distinct motion patterns:
When commanded parameters result in a theoretical move time spanning several sample periods (typically 4 samples or more), the MoveSCurve function generates a near-ideal S-curve. The motion profile will consist of up at least four jerk phases: positive jerk (acceleration ramp-up), negative jerk (acceleration ramp-down to cruise or deceleration), negative jerk (deceleration ramp-up), and positive jerk (deceleration ramp-down). The result is a smooth change in acceleration, closely matching the theoretical profile.
As commanded parameters become more aggressive, the theoretical S-curve segments compress. If the total move time is short enough to be executed over just three sample periods, the profile will appear as a trapezoidal or triangular velocity profile. The firmware still calculates the S-curve with fractional time durations, but at the sample resolution, the continuous change in acceleration is effectively averaged out, resulting in a profile that presents as piecewise-constant acceleration.
Further increasing the aggressiveness can lead to a theoretical move time that executes over exactly two sample periods. In this scenario, the MoveSCurve function generates a profile that is distinctly triangular. The acceleration and deceleration phases each occur within a single sample period.
For extremely aggressive parameters where the theoretical move time is significantly less than two sample periods, the system cannot generate a multi-segment profile. Instead, it executes an instantaneous "step" move. The axis is commanded to the target position in the next servo sample, bypassing any profile generation. This is the fastest possible transition, limited only by the firmware's sample rate.
This quantization behavior highlights the practical limits of achieving perfectly smooth motion on a sampled control system.
This sample application demonstrates how to use change the velocity parameter of a motion that is partially complete.