next up previous contents
Next: Steering Up: Stepper Motor Control Previous: Stepper Motor Control   Contents

Displacement

Displacement (remaining distance to travel or remaining angle to turn) determines acceleration and velocity. Assuming the design has a maximum $a_{L}$ and maximum $a_{A}$, we want to make use of such quantities whenever it is possible.

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 $a_{acc}$ and the deceleration is merely $-a_{acc}$. Let us also assume we have a displacement $D$ 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 $v_{max}$. If the robot is to start from stationary and has to stop at $D$ displacement, then the speed profile is either a triangle or a trapezoid.

The time needed to accelerate to full speed is $t=\frac{v_{max}}{a_{acc}}$. The displacement is then $D=\frac{t \times v_{max}}{2}$, which can be simplified to $D=\frac{v_{max}^{2}}{2 a_{acc}}$. Assuming a symmetric deceleration, then $D=\frac{v_{max}^{2}}{a_{acc}}$.

If the desired displacement is greater than $\frac{v_{max}^{2}}{a_{acc}}$, then the profile needs a constant speed portion. Otherwise, if the displacement is smaller, then we may not need even the maximum speed.

If $D<\frac{v_{max}^{2}}{a_{acc}}$, then we can determine a top speed such at $v_{top}=\sqrt{\frac{D}{a_{acc}}}$.

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 $D$ is the remaining displacement to travel, we can use the following logic:


\begin{algorithmic}
\IF{$D>\frac{v^{2}}{2\times a_{acc}}$}
\IF{$v<v_{max}$}
\...
...E
\IF{$a>-a_{acc}$}
\STATE set $a=-a_{acc}$
\ENDIF
\ENDIF
\end{algorithmic}


next up previous contents
Next: Steering Up: Stepper Motor Control Previous: Stepper Motor Control   Contents
Tak Auyeung 2003-09-29