Trapezoidal Position Profiles – Automatic elimination of round-off errors

In trapezoidal position profile mode, the reference generator automatically eliminates the round-off errors, which may occur when the commanded position cannot be reached with the programmed slew speed and acceleration/deceleration rate. This situation is illustrated by the example below, where the position feedback is an incremental encoder. Therefore, the internal units for position are [encoder counts], for speed are [encoder counts / slow loop sampling], for acceleration are [encoder counts / square of slow loop sampling]

Example:

The commanded position is 258 counts, with the slew speed 18 counts/sampling and the acceleration rate 4 counts/sampling­­2. To reach the slew speed, two options are available:

Accelerate to 16 in 4 steps, then from 16 to 18 in a 5th step. Acceleration space is 49 counts
Accelerate from 0 to 2 in 1st step, then from 2 to 18 in 4 steps. Acceleration space is 41 counts

For the deceleration phase, the options and spaces are the same. But, no matter which option is used for the acceleration and deceleration phases, the space that remains to be done at constant speed is not a multiple of 18, i.e. the position increment at each step.

So, when to start the deceleration phase? Table below presents the possible options, and the expected errors.

TML comes with a different approach. It monitors the round-off errors and automatically eliminates them by introducing, during deceleration phase, short periods where the target speed is kept constant. Hence, the target position is always reached precisely, without any errors.

Trapezoidal Position profile. Automatic elimination of round-off errors

The figure above shows the target speed generated by TML for the above example. During the deceleration phase, the target speed:

decelerates from 18 to 6 in 3 steps (target position advances by 36 counts)
is kept constant for 1 step (target position advances by 6 counts)
decelerates from 6 to 2 in one step (target position advances by 4 counts)
decelerates from 2 to 0 in the last step (target position advances by 1 count)

Hence the deceleration space is 47 counts, which, added to 49 counts for acceleration phase and to the 162 counts for constant speed, gives exactly the 258-count commanded position.

 

See also:

Trapezoidal Position Profiles – TML Programming Details

Trapezoidal Position Profiles – Related TML Instruction and Data

Trapezoidal Position Profiles – On the fly change of the motion parameters

TML Description