One great thing about using a stepper motor is that the speed profile can be precisely controled. This translates to precise displacement control. Assuming a linear acceleration and deceleration profile, the displacement is the area of the trapezoid bound by the speed profile in a speed versus time plot.
Let us assume the acceleration is
and the deceleration is
merely
. Let us also assume we have a displacement
to
cover.
The first thing we need to determine is whether we need to accelerate to
full speed or not. Let us assume the full speed is
. If the robot
is to start from stationary and has to stop at
displacement, then
the speed profile is either a triangle or a trapezoid.
The time needed to accelerate to full speed is
.
The displacement is then
, which can be
simplified to
. Assuming a symmetric
deceleration, then
.
If the desired displacement is greater than
,
then the profile needs a constant speed portion. Otherwise, if the
displacement is smaller, then we may not need even the maximum speed.
If
, then we can determine a top speed
such at
.
In reality, however, we seldom need to predetermine the top speed. This
is because the displacement can be adjusted so that the top speed needs
to be recomputed anyway. If
is the remaining displacement to travel,
we can use the following logic: