You are on page 1of 5

494 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 43, NO.

3, JUNE 1994

Analog look-up table circuits would be necessary. Drift in the scaling factors
nl bits n2 bits switch is eliminated by employing chopper-stabilized amplifiers.

J-ifI
REFERENCES

[I] B. Gilbert, “‘A monotonic microsystem for analog synthesis of trigono-


Logic metric functions and their inverses,” IEEE J . Solid-Srare Circuits, vol.
SC-17, pp. 1179-1191, 1982.
(n,- n ) msb’s [2] Analog Devices, Linear Products Databook, 1988, pp. 9.17-9.28.
[3] A. D. Kersey and R. P. Moeller, “Open loop gyroscope with phase shift
nulling signal processing,” Electron. Left., vol. 26, pp. 1251-1253.1990.
[4] S. J. Spammer and P. L. Swart, “A quadrature phase tracker for
open-loop fibre-optic gyroscopes,” IEEE Trans. Circuits Syste., I : Fun-
damental Theory and Appl., vol. 40, pp. 8691, 1993.
[5] S. Haykin, Communication Systems, 2nd Ed. New York: Wiley, 1983.

High-Resolution of Rotary Encoder


Fig. 3. (a) Adaptive range extension system. (b) Transfer characteristic of Analog Quadrature Signals
the adaptive range extension system.
J. R. Rent? Mayer

will be activated and the full range extension output will be used.
Such a simple adaptive system is shown in Fig. 3(a). The transfer Abstract-The paper describes a software technique to provide high-
characteristic of the adaptive range extension system is represented resolution absolute angular measurements from the analog quadrature
schematically in Fig. 3(b). signals of a rotary encoder. The method uses digitized samples of the
sinusoidal quadrature signals and the output of a divide-by-four counter
circuit. Dynamic measurements on an external trigger signal are possible
IV. DISCUSSION allowing instantaneous up-to-date angular readings even at high speed.
The resolution and hysteresis errors are only dependent on the encoder
The newly introduced circuit can extend the range of the AD 639 itself and the bandwidth and resolution of the sampling circuitry. The
by more than an order of magnitude depending on the A/D, D/A and scheme allows up to 135 degrees of counter hysteresis and delay without
the reset point (n. 27r or 37r). The technique is simple to implement loss of precision, thus also affording excellent noise immunity. The
and uses minimum additional components resulting in cost reduction theoretical resolution for a 12-bit digital conversion of the analog signals
is U3360 of a pitch. Experimental results on an encoder built into a
and a decrease in circuit complexity compared to other techniques. laser-tracking measurement system and using 81 000 pitches show a uni-
It should be possible to extend the range by factors of two until the directional precision of 0.3 arcsec (rms), a mean bidirectional hysteresis
angular resolution becomes too poor. With present-day technology of about 1 arcsec and a worst case variation for a stationary encoder
this limitation would lie between 64 and 128. shaft of 0.06 arcsec.
The linearity error introduced by the 10-bit D/A converter for
the particular example investigated experimentally would, however, I. INTRODUCTION
degrade the 0.02% law conformance of the AD 639. For commonly
The method described in this article was developed for an in-
available A/D and D/A converters, the linearity error is usually less
strument capable of dynamically measuring the coordinates of a
than or equal to one least significant bit. If the linearity errors of
retroreflective target using a laser-tracking triangulation technique. In
the A/D and D/A are assumed to be statistically independent, the
such a system, a laser beam is deflected towards a retroreflector target
circuit would have a law conformance of 0.14% resulting in total
using servo-driven mirrors. The angular positions of these mirrors
harmonic distortion of -57 dB. This error can be reduced by the
are needed to calculate the target position and are measured using
implementation of range converters with an increased number of
angular encoders. Typically, for this type of measuring system, if a 1
bits. For example, a 12-bit D/A converter would result in a law
meter sided measurement volume is required, an angular precision of
conformance error comparable to the 0.02% of the AD 639.
0.25 arcsec on the mirror angular sensing will result in a worst-case
As in the case of the ROM look-up table approach, the range- target position uncertainty of 10 pm [I]. This is the precision required
extended AD 639 incorporates digitization resulting in quantization
for the instrument to be used for applications such as industrial
error which is inversely proportional to the number of converter bits.
robot performance testing. As a result, high angular resolution,
The corresponding signal-to-noise ratio is given by (671-7.2) dB with
low hysteresis, and high accuracy are required both statically and
7t the number of bits [ 5 ] .The influence of quantization error can be
dynamically. Furthermore, since data from four separate axes must
reduced by either increasing the number of bits of the A/D and D/A,
or by introducing circuit adaptivity. The last-mentioned technique is
not readily implemented in other systems such as those incorporating Manuscript received March 4, 1993. This work was supported by the Com-
look-up tables. Another advantage of this range extension technique munity Bureau of Reference of the Commission of the European Communities
under contract 3098/1/0/07 1/86/7-BCR-UK(30).
is that the same circuit can be applied to generate cosine, sine, The author is with the Section Fabrication, Ecole Polytechnique, Campus
and tangent functions. The generation of quadrature signals would de L’Universite de Montrkal, Montreal, Canada, H3C 3A7.
therefore only require one range extension circuit, while two ROM IEEE Log Number 9402231.

00 18-9456/94$04.O0 0 1994 IEEE


IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 43, NO. 3. JUNE 1994 495

I D I , , , , )
0 r; +n -'c 0 f +n -'c
Count two

quadrant, GQ

Fig. 1. Analog quadrature signals. Fig. 2. Relationship between the phase quadrant and the counter two least
significant binary digits.
be combined to calculate one target position, the angular data from
each encoder must be capable of being sampled simultaneously at
externally defined instants.
High-precision optical encoders are now available with analog
quadrature signal outputs. Such devices have a rotating disk with COis a variable count offset as determined from the count's two least
a fine grating of radial lines. A light generation and detection system significant binary digits and from p as calculated. The value of C,,
detects the movement of the grating and generates two analog signals also allows for significant amounts of hysteresis to be present in the
out of phase by 90" [2]. Although devices with a grating pitch counting circuitry which results in a possible discrepancy between the
of 16 arcsec are available, further interpolation within these cycles current counter quadrant and its nominal value expected for the phase
is required to generate the required angular precision. Although angle 9.Furthermore, should the discrepancy exceed the design value
some circuits are available based on resistive networks to perform for e,, a software warning can be issued which indicates a possible
the necessary interpolation within each sinusoidal cycle, these often failure condition or data invalidity, for example, a count loss may
exhibit hysteresis effects which do not allow the full capability of have occurred.
the encoder to be exploited. Furthermore, the hysteresis is often built Fig. 2 illustrates the relationship between the phase angle 9,the
into the counting circuitry in order to cope with slow movements count associated quadrant CAQand a possible set of the count's
of the encoder and noise on the analog signals without causing two least significant binary digits. The flow chart of Fig. 3 is used to
spurious counts. These methods have the further disadvantage of determine C, and set any wariiing flag. It is designed to accommodate
requiring faster counting circuitry as the number of divisions per the full range of 9 for any count associated quadrant C ~ QIt .also
encoder cycle is increased. Some of these problems are discussed allows for of hysteresis without error flagging. However, even if
in Kuzdrall [3]. Completely digital techniques have been described
is exceeded, the count offset calculated remains valid provided
recently by Hagiwara et. al. [4]. With such methods, however, the the actual hysteresis did not exceed 135". The scheme also works
clock speed of the system may become too great in practice as the for cases when the encoder phase 7 has moved out of the nominal
desired resolution increases. dz160" cycle to an adjacent one due to counter hysteresis while not
exceeding the maximum hysteresis criteria of 135".
11. SIGNAL
PROCESSING
The quadrature signals shown in Fig. 1 can be represented as 111. INITIAL CALIBRATION
The gain and offset -Ag, B,, -Ao, and Bo can be calibrated by
d, = A, sin k8 + A4cJ (1) analyzing a large number of random measurements to determine the
B3 = B , cos kH + B,, (2)
minimum and maximum values for A a n d B as follows:
il - .Amrdx - ilrm
where ,-2
(5)
k is the number of grating cycles in one rotation; 0 is the
angular position of the encoder shaft; -A,, and 13, are the electrical
signal amplitudes; -4, and Bo are the electrical signal offsets.
Within each cycle of the grating, the phase angle 9 = kB can
be calculated from the digitized versions of As and B,, namely,
A,/ and B,/, as
The same set of random readings can also provide the correspondence
between the count's two least significant binary digits and the
associated quadrant ( 1 to 4). This is done by counting the number
of times a particular pattern of the count's two least significant
binary digits appears for each of the four quadrants of 9.Only
with A and B being the sin (r^ and cos 9 quantities, respectively.
those measurements for which 9 is outside the hysteresis region are
Using high-level software, e.g., FORTRAN77, Q can be evaluated
considered.
for the full hr range.
9 can now be used as a fine adjustment to a divide-by-four counter
output to calculate the encoder shaft angle O,,,, . However, the counter PRECISION
IV. THEORETICAL
output C must be corrected by an offset C O ,an integer between -3 The theoretical sensitivity of the calculated encoder angle O,,,,.
+
and 4 , so that C C,, is the counter nominal value when (r^ = 0: with respect to errors on the quadrature signals can be evaluated
496 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 43, NO. 3, JUNE 1994

Also, from (5)-(8), we can derive the following sensitivity equations:

Assuming that the errors on the analog signals correspond to one bit
of the analog-to-digital converters, then

and

A -B - 2"-'
(18)
9 - 9-

Then from (13)-(16), we obtain AAo = AAg = AB, = AB, = 1


and finally from (1 1) and (12)
2+'4
AA = 2.w-I
~
(19)
2+B
A B = - 2"-' (20)

From (3), we can derive the sensitivity of p as follows:

and since B = CO\ q a n d d = sin p


1
A; = (sin p + cos p + sin 9 cos 9). (22)

The maximum error can be shown to occur at Q = 7r/4 which results


in
a,.=-Jz+;
2"-2 . (23)

For example, when using 12 bits of precision on the ADC and for no
other errors than the quantization process, A,- = 1.87 mrad or 3360
divisions per circle. The corresponding error on 6' is A y / k which for
the encoder used in the following experimental section is 0.00476
arcsec.

RESULTS
V. EXPERIMENTAL
Tests were conducted using a high-precision encoder with k =
Fig. 3. Flow chart for the determination of the count offset C, and the
81 000 cycles per shaft revolution. The analog signals were digitized
detection of potential data errors.
to 12 bits. Fig. 4 shows the setup used to assess the method. The
laser-tracking system shown on the right has the ability to lock its
by differentiation. If A a n d B are the offset and gain compensated laser beam onto a retroreflective target 1.
values for the quadrature signals, then The system aims a laser beam at the retroreflective target. The
optical hardware consists of a He--Ne linearly polarized laser head,
the output beam of which is turned into a circularly polarized beam
by a quarter-wave plate oriented at 45' to the beam polarization
plane. The beam is then partially transmitted through a beam splitter.
The beam splitter only transmits one state of polarization. The
beam is then repolarized circularly before being steered towards
The sensitivity of A and B , A A and A B , are functions of the errors the retroreflective target by two mirrors which are rotated by two
on the digitized signals and on the signal gains and offsets galvanometric scanners with their rotation axes orthogonal to each
AA = &(A& + A & ) + (Ad - .A,,)Ad, (1 1 )
other. One scanner moves the beam vertically, the other horizontally.
The target retroreflects the beam towards the subsystem parallel
A;
to the outgoing beam but laterally displaced by a quantity that is
B,(ABd 4- AB") + - B,)AB,
( B d
proportional to the distance between the outgoing beam and the
AB = (12)
B,2 target center. The returning beam re-enters the optical subsystem
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 43, NO. 3, JUNE 1994 491

Laser
N4 plate 2

Incident
beam to

Linear lnterferometre Scanning


- 0 7 i mirrors
0 10 20 30
Set angular position (arcsec)
t

Fig. 6. Calculated encoder angles B,,,, versus the set angular position f
h
I 1 motion. d I
for the unidirectional test.

1 .o
Fig. 4. Experimental setup based on a laser-tracking unit, a slide, and a
linear interferometer. 0.5

00

-0.5

-1 0

-1 5

-2.0
0 10 20 30 40
surtace Set angular position (arcsec)

Fig. 5. Control loop for the target-tracking action Fig. 7. Departure from the straight line for Bent versus Oset for the
unidirectional test.

following a path parallel to the outgoing beam through the optics


while preserving the tracking offset. Quarter-wave plate 1 re-polarizes The half factor is due to the reflection effect of the mirror. The error
the beam linearly so that it is now reflected towards the photodetector sensitivity AOset in rads with respect to errors A L and Ad, ford <<
L , can be shown to be given by

rd
by the beam splitter where its 2D offset vector from the incident beam
is monitored optoelectronically. This offset is used as part of a closed-
loop circuit to adjust the mirror angular positions to bring the incident A& e -
2
-
L
+d -
L2
.
beam closely aligned with the target center point. This principle is
illustrated in Fig. 5. Invariably some hunting of the target, even During the experiment Ad was estimated to be 1pm and random in
if stationary, will occur, introducing undue variation in the mirror nature, while AL was constant and up to 5 mm. As a result, ABset
angular positions. Under the test conditions, this was measured and has a random error content of 0.03 arsec and an error term varying
found to be an oscillation with a standard deviation of 0.5 arcsec. linearly with 1 of 57d arcsec. For a maximum d of 0.002 m this is
Two tracking axes are normally necessary, one primarily for the at the most equal to 0.1 arcsec.
target's vertical motion and the other primarily for the target's Three tests were conducted. Test 1 involved taking measurements
horizontal motion. For the purpose of this experiment only one was at intervals of about 1/3 arcsecond over a 35-arcsecond range. Ten
required; the target was positioned so that the beam was very closely readings were taken at each position and the calculated encoder
aiming at the target for both tracking mirrors with their normal vectors angles O,,, averaged. Fig. 6 shows O,, versusO,,t, and Fig. 7 is
at 45" to the beams. At this position, there is negligible coupling the departure from the straight line using the following fit:
between the two axes. A vertical motion of the target was achieved = 0.20623 - 0.99919 Oset.
Oenc,lineal (26)
using a precision slide. The slide was aligned so that the motion
was originally perpendicular to the laser beam and perpendicular to The combined effect of nonlinearity and averaged hunting noise and
the mirror rotati axi responsible for the laser beam's vertical motion. resolution produces a rms error of 0.3 arcsecond.
This meant that the angle needed for the tracking mirror to relock Test 2 aimed at assessing any nonrepeatability due to hysteresis
onto the target could be calculated from the distance to the target effects. Measurements were made at angular intervals of about
and the target vertical motion. The vertical motion of the target 3.5 arcseconds over a 70-arcseconds range while traveling in one
was independently controlled via a linear interferometer monitoring a direction and then taking similar measurements retuming to the initial
second retroreflector attached to the slideway platform. The distance position. Thirty readings were averaged at each position. Fig. 8 shows
L , traveled by the tracking beam from the first scanning mirror to the the encoder angle O,,, versus the set angle Os,, . Fig. 9 shows O,, -
retroreflector target, was nominally 3.0 m, and the target's vertical Osrt for the positive and negative directions. The difference between
motion d did not exceed 0.002 m, so that the corresponding tracking the mean errors in both directions is approximately 1 arcsecond and
angle was small and for no tracking error was closely given as gives an estimate of the bidirectional hysteresis present.
The results from test 1 were further processed, this time considering
(1
O,, 21 t g - 1 -.
L (24)
only the first sample at each position. Fig. 10 shows the A a n d B
signals for each point. It shows the good quality of the quadrature
498 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 43, NO. 3, JUNE 1994

U
- 20 12

U)

--g
01
o 0.8

ol
5 -20 04
z
f -40
01
j O0
=2
P
-60 4
-0.4
U
-
3

-80
20 40 60 80 -0.8

Set angular position (arcsec)


-1 2
Fig. 8. Calculated encoder angle Be,, versus the set angular positil -1 2 -0.8 -0 4 0.0 04 0.8 12
for the bidirectional test.
B signal

Fig. IO. Digitized ;1and B analog quadrature signals after gain and offset
-
- 2
compensation compared with the ideal unity radius circle.
J *
Positive motion
Negative motion
-Poslllve
3 ’ mean
--.Negative mean
I
P O
3
I ’
6
’20 0 20 40 60 80
n set angular position (arcsec)

Fig. 9. Bellr-Bset for the bidirectional test.

‘14
signals. Fig. 1 1 illustrates the relationship between the calculated Divide by four counter output
phase 9 and the divide-by-four counter output. It can be seen that
Fig, 11. Phase p versus the divide-by-four counter output for the first sample
a few readings have phase angles outside a single quadrant for the at each position of the unidirectional test.
same counter value. This is due to hysteresis in the counter circuitry.
A third test aimed at assessing the stability of the angular reading
in the absence of any hunting effect. This was achieved by simply ACKNOWLEDGMENT
switching the scanner drivers off. A number of sets of 100 samples
were taken for different scanner positions in order to have a file with The author wishes to thank Mr. Ian Taylor for designing and
9 S 35“ where the errors on the raw signals have the maximum implementing the electronic hardware for the signal conditioning,
effect on the calculated angle as shown in the previous section. For counting, and data acquisition of the encoder signals.
this test, the calibrated gains were A , = 1710andI3, = 1823. A
set of samples was found with a mean p = 45.8“ with the values of REFERENCES
&. B d , a n d 0 varying, due to noise, within a range of 63, 58, and
0.06 arcsecond. The standard deviations on A d , B,/. arid 0 were 12, [ I ] R. R. Mayer and G. A. Parker, “Calibration and assessment of a laser
based instrument for robot dynamic measurement,” presented at the
11, and 0.01 arcsecond, respectively. 1lth Triennal World Congress of the International Measurement Confed-
eration, Volume: Theory, Simulation, Calibration, Testing, Education.,
Houston, TX, Oct. 16-21, 1988, pp. 327-334.
VI. CONCLUSION 121 Canon Laser Rotary Encoder, Commercial Literature no. 7.5k-LRE-
A software-based method has been described that uses the output ZKG 1087.
[3] J. A. Kuzdrall, “Build an error-free encoder interface,” Elecfron.Design.
from a divide-by-four counter and the digitized analog quadrature pp. 81-86, Sept. 17, 1992.
signals to produce high-precision encoder shaft angular data. Given [4]N. Hagiwara, Y. Suzuki, and H. Murase, “A method of improving the
sufficient digitization precision, the method allows the full precision resolution and accuracy of rotary encoders using a code compensation
associated with the encoder signal quality to be exploited. Measure- technique,” IEEE Trans. Insfrumenf. Measure., vol. 41, no. I , pp.
98-101, Feb. 1992.
ments can be made at any time on an external sampling signal, making
possible simultaneous dynamic readings of multiple axes. The method
allows error flagging of conditions such as count loss or excessive lag
between counter output and encoder phase. It also allows substantial
hysteresis within the counting circuitry without precision loss. The
theoretical resolution for a 12-bit digital conversion of the analog
signals is 1/3360 of a pitch. Experimental results on an encoder built
into a laser-tracking measurement system and using 81 000 pitches
show a unidirectional rms error of 0.3 arcsecond, a mean bidirectional
hysteresis of 1 arcsecond, and a reading stability with a maximum
error range of 0.06 arcsecond.

You might also like