v(k)
[
X
t(k)
*
t(k
*
1)
+
X
D
T
v(k)
[
x(k)
*
x(k
*
1)
T
+
D
X
T
Enhanced Quadrature Encoder Pulse (eQEP) Module
Some typical applications of shaft encoders include robotics and even computer input in the form of a
mouse. Inside your mouse you can see where the mouse ball spins a pair of axles (a left/right, and an
up/down axle). These axles are connected to optical shaft encoders that effectively tell the computer how
fast and in what direction the mouse is moving.
General Issues: Estimating velocity from a digital position sensor is a cost-effective strategy in motor
control. Two different first order approximations for velocity may be written as:
(1)
(2)
where
v(k): Velocity at time instant k
x(k): Position at time instant k
x(k-1): Position at time instant k - 1
T: Fixed unit time or inverse of velocity calculation rate
Δ
X: Incremental position movement in unit time
t(k): Time instant "k"
t(k-1): Time instant "k - 1"
X: Fixed unit position
Δ
T: Incremental time elapsed for unit position movement.
is the conventional approach to velocity estimation and it requires a time base to provide unit
time event for velocity calculation. Unit time is basically the inverse of the velocity calculation rate.
The encoder count (position) is read once during each unit time event. The quantity [x(k) - x(k-1)] is
formed by subtracting the previous reading from the current reading. Then the velocity estimate is
computed by multiplying by the known constant 1/T (where T is the constant time between unit time
events and is known in advance).
Estimation based on
has an inherent accuracy limit directly related to the resolution of the
position sensor and the unit time period T. For example, consider a 500-line per revolution quadrature
encoder with a velocity calculation rate of 400 Hz. When used for position the quadrature encoder gives a
four-fold increase in resolution, in this case, 2000 counts per revolution. The minimum rotation that can be
detected is therefore 0.0005 revolutions, which gives a velocity resolution of 12 rpm when sampled at 400
Hz. While this resolution may be satisfactory at moderate or high speeds, for example, 1% error at
1200 rpm, it would clearly prove inadequate at low speeds. In fact, at speeds below 12 rpm, the speed
estimate would erroneously be zero much of the time.
At low speed,
provides a more accurate approach. It requires a position sensor that outputs a
fixed interval pulse train, such as the aforementioned quadrature encoder. The width of each pulse is
defined by motor speed for a given sensor resolution.
can be used to calculate motor speed by
measuring the elapsed time between successive quadrature pulse edges. However, this method suffers
from the opposite limitation, as does
. A combination of relatively large motor speeds and high
sensor resolution makes the time interval
Δ
T small, and thus more greatly influenced by the timer
resolution. This can introduce considerable error into high-speed estimates.
For systems with a large speed range (that is, speed estimation is needed at both low and high speeds),
one approach is to use
at low speed and have the software switch over to
when
the motor speed rises above some specified threshold.
1652
Pulse-Width Modulation Subsystem (PWMSS)
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated