Sie sind auf Seite 1von 6

$5RWDU\(QFRGHU6\VWHPZLWK'LJLWDOO\,QFUHDVHG

5HVROXWLRQ
)DELR&KHUFKL9DOHQWLQR/LEHUDOL*XLGR7RUHOOL
Dipartimento di Elettronica, Universit di Pavia
Via Ferrata 1, I-27100 Pavia, Italy

$QGUHD6LPRQL
Centro per la Ricerca Scientifica e Tecnologica, Istituto Trentino di Cultura
Via Sommarive 18, I-38055 Povo (TN), Italy
e-mail: JXLGRWRUHOOL#HOHXQLSYLW
$EVWUDFW  7KLV SDSHU GHVFULEHV D WHFKQLTXH WR HQKDQFH WKH UHVROXWLRQ LQ D URWDU\
HQFRGHU'DWDIURPDPL[HGDEVROXWHLQFUHPHQWDOHQFRGLQJGLVFZLWKDEVROXWHDQG
LQFUHPHQWDOWUDFHVLVGLJLWDOO\SURFHVVHGWRDFKLHYHDUHVROXWLRQRIELWV7KHPRVW
VLJQLILFDQW ELWV FRPH IURP WKH DEVROXWH VHFWLRQ RI WKH HQFRGHU ZKLOH WKH  OHDVW
VLJQLILFDQW ELWV DUH REWDLQHG E\ LQWHUSRODWLQJ WKH VLJQDOV IURP WKH LQFUHPHQWDO VHFWLRQ
3URJUDPPDELOLW\RIWKHSURFHVVLQJFLUFXLWU\DOORZVWKHXVHUWRVHOHFWWKHXQLWRIPHDVXUH
DQGWKHUHVROXWLRQRIRXWSXWGDWD

,1752'8&7,21

A rotary encoder system is an angular rotation/position transducer. It is made up


of a glass disc with a suitable number of concentric traces, each having
alternated opaque and transparent zones. All traces are illuminated by a LED
from one side of the disc. On the opposite side, the light beam is modulated by
the disc traces and, after passing through a collimating slit, is collected by a
photodiode array (a photodiode is provided per each trace). From photogenerated current signals, the information corresponding to the angular position
is extracted.
Two types of optical rotary encoders are available, namely absolute and
incremental encoders [1]. An absolute encoder measures the angular position at
any time, independently of the rotation speed of the disc; the number of traces is
equal to the number of resolution bits. On the other hand, in an incremental
encoder a pulse is generated each time a transparent zone passes above the
collimating slit and, therefore, each time the angle of rotation changes by a
predetermined amount. Such an encoder needs to count pulses to measure an
angle, and has a fixed number of traces on the disc.
Control systems for mechanical position require absolute encoders with
resolution up to 16 bits, thus leading to large discs, difficult to realise with
existing serigraphy techniques.

In this paper, we propose a method for increasing the resolution of a rotary


encoder without actually increasing the number of traces on the disc.
The proposed approach uses an encoder system of mixed absolute/incremental
type. It is made up of a disc with 13 traces, 11 carrying an absolute Gray code
and 2 providing incremental information. Fig. 1 shows the four outmost traces
of the disc (two absolute and two incremental traces).

Figure 1. Detail of the mixed absolute/incremental encoder disc

The output signal is extracted by 13 photodiodes, 13 readout channels and a


dedicated digital signal processing unit (EPU16, 16 bit Encoder Processing
Unit). The proposed approach allows the angular position to be determined with
16 bits of accuracy in binary code. Moreover, our solution allows the user to
program the resolution over a certain range. Photodiodes, analogue readout
channels and the digital processing unit are integrated onto the same chip.
In next sections, we will describe the logic blocks that constitute the EPU16
unit, which performs the following main functions:
Gray code to binary code conversion (from the absolute section);
programmable resolution;
increase of maximum resolution from 13 to 16 bits (from the incremental
section).
EPU16 has been designed using VHDL [2].


$5&+,7(&785(2)(38

The digital processing unit must process two types of digital signals: those
coming from the absolute traces, and those coming from the incremental ones.
These signals must be handled separately, at least in the first processing stage.
The absolute signal is an 11-bit word in Gray code and represents the 11 most
significant bits of the output data. To provide an output binary-weighted code,
the first processing step is the conversion from Gray code to binary code.
The incremental signal comes from the two outmost traces of the encoder disc.
The two analogue signals corresponding to these two traces are sampled and
converted by two 8-bit analogue-to-digital (A/D) converters with a sampling
frequency of 110 kHz. Due to the rotation of the disc, the two analogue signals

can be approximated by sin([) and cos([) functions. The sinewave frequency


depends on the rotation speed of the disc. The first stage of the incremental
signal processing implements an interpolation algorithm that receives two
samples of the sine function (with 4 bits of amplitude resolution) and provides
the 5 least significant bits of the 16-bit output data.
The absolute and the incremental signals, adequately processed, are merged into
one 16-bit word by the second processing stage, where the angular position is
also calculated in user-defined units of measure.
Fig. 2 shows the schematic diagram of EPU16, which has the following input
signals:
a 19 bit input bus. Bits from 0 to 10 come from the absolute traces, bits from
11 to 14 and from 15 to 18 are produced by A/D conversion of the two
incremental signals;
a clock signal (4 MHz);
a reset signal;
a load signal for programming the unit of measure for angles.
The 16-bit output bus carries the angular information measured by the sensor
and processed by EPU16.
EPU16
LOAD
CH1
CH2

INC5

INC2ABS

OUTBUS

INBUS

SCALE

DEMUX19
(19 bit)
GRAY

ABS11

BIN2ANG16
(16 bit)

GRAY2BIN11

CLOCK

RESET
1ST STAGE

2ND STAGE

Figure 2. Schematic diagram of the digital processing unit EPU16

*5$<72%,1$5<&2'(&219(56,21

The absolute encoder section of the disc produces 11-bit words in Gray code.
To merge these words together with the binary-weighted 5-bit words
corresponding to the incremental section, conversion into a binary code is
necessary. The Gray2Bin11 cell converts a Gray word ( J Q J Q 1...J1 J 0 ) into a
binary-weighted word ( EQ EQ 1...E1E0 ) in the following way:

EQ = J Q

EL = J L EL +1 , for L = 0, 1, 2, ..., Q 1
This conversion is implemented with EXOR gates [3].

352*5$00$%/(2873875(62/87,21

EPU16 determines the angular position with a resolution programmed during


the load phase. This option allows the user to select how the angular
information is provided, choosing between degrees or radians and selecting the
desired resolution. The minimum resolution steps are 0.01 and 0.0001 rad,
respectively. Programming the resolution is made possible through the input
bus, under the control of the load signal.
The input cell Demux19 receives the signals from the external bus,
discriminates between sensor and programming data, and separates the absolute
from the incremental information.
Programming the scale factor is independent on both reset and clock lines.
In particular, dynamic setting is possible, with a setting time of few nanoseconds, which is negligible even with respect to the minimum period of the
signal coming from the outmost trace (asynchronous operation).
The value of the scale factor is stored into the input cell (Demux19) and is fed
to the output cell (Bin2Ang16) through the Scale bus. The latter cell merges
the 11-bit absolute signal Abs11<10:0> with the 5-bit incremental signal
Inc5<4:0>, thus producing a 16-bit binary-coded signal Bin<15:0>. Then
it calculates the output data through the relationship:
Bin Scale
Outbus =
216
In this way, the possible input word collisions (i.e., the events when two or
more input words correspond to the same output word) are proportionally
distributed along the whole circle.


5(62/87,21,1&5($6(%<,17(532/$7,21

Cell Inc2Abs is the main cell of EPU16. Through an interpolation process, at


every sampling period the two incremental signals coming from the two
outmost traces of the encoder disc are processed to obtain the 5 least significant
bits of the output data.
The proposed processing method consists in finding the time position of these
two samples within the corresponding sinewave period 7, by comparing their
amplitude with reference values stored into a ROM. The incremental signal
frequency is exactly twice as large as the frequency of the signal corresponding

to the least significant bit (Abs<0>) of the absolute binary code, as is shown in
Fig. 3. To achieve a correct result from the interpolation process, the allowed
maximum frequency of the incremental signal is I inc, max = 2048 Hz, corresponding to 60 rpm. This limitation comes from the sampling frequency used
in the A/D conversion. However, this does not result in performance
degradation of the whole system, because motion control requires a fine
regulation only at very low rotation speed.
13th trace

12th trace

11th bit

10th bit
Angle

Figure 3. Absolute and incremental signals from the outmost four traces

To achieve a resolution increase of 5 bits through interpolation, 32 stored


samples would be needed for each reference. However, it is possible to reduce
the number of stored samples by suitably processing the input incremental
values. In the interpolated word Inc5<4:0>, the 3 most significant bits
Inc5<4:2> correspond to one eighth of a sinewave period. They are
calculated directly using the following relationships:
Inc5 < 4 > = sign(Ch2)
Inc5 < 3 > = sign(Ch1) sign(Ch2)
0, if Ch1 > Ch2
Inc5 < 2 > =
1, if Ch1 Ch2
where Ch1 = cos([) (13-th trace) and Ch2 = sin([) (12-th trace).
After calculating Inc5<4:2>, we obtain the two least significant bits
Inc5<1:0> by a comparison with four values of the sine and cosine
references in the interval (0, /4).
To obtain a more area-efficient storing, we combined the two reference signals
into the function ref( [) = 1 cos( [) sin( [) . The function ref([) is periodical
with period /2. As shown in Fig. 4, it is very close to linearity, and can be
4[
for [ [0, / 4] .
approximated by ref( [)

After this linearisation, only 12 samples with 3-bit resolution need to be stored.
The maximum non-linearity error introduced in the interpolation process is
about 1 6 LSB.
EPU16 has been synthesised from VHDL, and its layout has been generated in a
0.8 m CMOS technology. The silicon area occupied by the digital processing
unit (without the A/D converters) is 1.27 mm2.
1
cos(x)
.75

ref(x)

.50

sin(x)

.25

pi/16

pi/8

3pi/16

pi/4

Figure 4. Plot of sin([), cos([) and ref([) for [ [0, / 4] (first eighth of the period)

&21&/86,21

A resolution enhancement technique for rotary encoders has been presented in


this paper. The proposed approach is based on mixed absolute/incremental
encoding. It increases the encoder resolution up to 16 bits, while using a 13-bit
encoder disc. The dedicated digital processing circuitry is programmable and
allows output data to be expressed in the unit of measure selected by the user.
$&.12:/('*(0(17
This work has been supported by the Italian National Research Council (CNR)
within the MADESS-II project. The authors wish to thank Mauro Stefani of
LIKA Electronics for fruitful discussions and comments.
5()(5(1&(6
[1] R. Ohba. ,QWHOOLJHQW 6HQVRU 7HFKQRORJ\ John Wiley & Sons, Chichester,
UK, 1992.
[2] D. L. Perry. 9+'/ QGHGLWLRQ  McGraw-Hill, New York, USA, 1994.
[3] E. J. McCluskey. /RJLF 'HVLJQ 3ULQFLSOHV ZLWK (PSKDVLV RQ 7HVWDEOH
6HPLFXVWRP&LUFXLWV Prentice-Hall, Englewood Cliffs, NJ, USA, 1986.

Das könnte Ihnen auch gefallen