Industrial Motion Control Systems
Optical Encoders
Ho Chi Minh City
University of Technology 1 1
Optical Encoders
• Incremental Encoder
• Absolute Encoder
• Velocity Estimation
2
Optical Encoders
An encoder is a sensor that converts rotational or linear displacement into
digital signals. A typical optical encoder consists of:
(1) light source (LED),
(2) code disk,
(3) stationary mask,
(4) light detector (photodetector),
(5) signal conditioning circuit.
3
Incremental Encoder
A rotary incremental encoder produces a series of pulses as the disk rotates.
4
Incremental Encoder
A circuit in the motion controller can count the number of pulses as the shaft rotates. If the
number of counts per revolution is known, then the motion controller can convert the
accumulated pulse count into angular distance traveled by the shaft.
Cannot tell whether the shaft is rotating clockwise or counterclockwise.
Add a second detector.
The detectors can be placed 90∘ E apart. One electrical cycle of the digital pulses consists of one
high and one low pulse. One electrical cycle is equal to 360∘ E. Hence, when the two detectors
are placed 90∘ E apart and side by side, each will point to a quarter of the electrical cycle. This
arrangement creates the so-called quadrature signal pattern out of two channels CH A and CH B.
When the disk moves, the alternating pattern seen by the detectors generates two square
waveforms that are shifted in phase by 90∘ E.
5
Incremental Encoder
Lines per revolution (LPR) or
pulses per revolution (PPR) are
terms used in describing how
many lines an incremental
encoder disk has
6
Incremental Encoder
Incremental encoders are also available as linear encoders (linear scales). The operating
principle is the same as the rotary encoders. However, the code disk is replaced by a
linear strip with the code printed on it. They are used to measure displacement along a
linear axis.
7
SinCos Encoders
SinCos (sine-cosine) encoders are incremental encoders with analog outputs.
Unlike the discrete on/off outputs of the incremental encoders, the SinCos encoders provide two
sinusoidal outputs shifted by 90∘ in phase. Hence, they are also known as sinusoidal encoders.
• Industry standard for SinCos
encoders is 1V peak-to-peak
sine/cosine voltages.
• Due to the low voltage analog
output signals, these encoders
are sensitive to noise. As a
result, complimentary channels
are used for each signal.
• In addition, to avoid having to
use negative power supply,
typically 2.5 V DC offset is
added to the signals
8
Complimentary Channels
Electrical noise, such as due to the transients generated by the switching power electronics in
the drive, can interfere with the encoder signals leading to wrong position counts.
Shielded, twisted-pair cables need to be used and good wiring practices must be followed.
An effective way to reduce the impact of noise is to use complimentary signals and balanced
differential line drivers. In this approach, each encoder channel has its complimentary
channel, which is inverted
What is the disadvantage of
Incremental Encoder?
9
Absolute Encoder
An absolute encoder uses a disk that generates a unique digital code for each position of
the disk. Therefore, the absolute position of the shaft can be determined at any time, even
during power up. If an axis uses an absolute encoder, there is no need to move it to a
known reference point (home position) in the power up sequence.
The resolution of an absolute encoder is determined by the number of bits in its output.
3-bit binary
code disc
3-bit gray
code disc
10
Multiturn absolute encoder
A single-turn absolute encoder can provide a unique code
for each angular position within one revolution of the shaft.
However, if the shaft rotates more than one revolution, then
the codes will be repeated.
A multiturn absolute encoder can count the number of
revolutions and store them. It contains a gear train with
high-precision gears. Each gear has its own code disk
to count the turns. Multiturn encoders with 4-code disks are
available. The code disks on the turn counters typically use
the 4-bit Gray code (= 16 steps).
Gray code disk (9-bits)
11
Serial Encoder Communications
Several serial communication protocols have been developed to output absolute encoder data.
Some of these protocols are proprietary, while the others are open protocols. Performance
trade-offs include wire count, specific hardware requirements, and update rates.
SSI® (Synchronous Serial Interface)
EnDat® (Encoder Data)
HIPERFACE
BiSS® (Bi-directional Synchronous Serial Interface)
Synchronous Serial Interface
HIPERFACE 12
Velocity Estimation
Powerful computational capabilities of the drives and the shift to AC motors requiring
commutation led to systems using solely position feedback. The velocity is estimated from the
position data typically coming from an encoder.
An encoder quantizes the position with a limited resolution.
For example:
• A 1000-line encoder with quadrature decoding would give 4000 cts∕rev. Hence, the
minimum position we can detect is 1∕4000 = 0.00025 revolutions.
• Controllers, sample position at a fixed rate called the sampling period ts.
One way to estimate the velocity is by calculating the change in the position counts during the
sampling period. This approach is called the fixed-time (FT) method and is given by
13
Velocity Estimation
Another way to estimate velocity is by measuring the time elapsed between two consecutive
encoder pulses (one count increase in the position). This method is often called the 1/T
interpolation method and is given by
The denominator is the time elapsed between two consecutive encoder counts. This
approach requires a highly accurate timer in the controller. Today’s motion controllers have
timers with 1μs accuracy.
14
Velocity Estimation
Consider a motor with a 1000-line incremental encoder and quadrature decoder.
(a) Assume that the controller has 2.5 kHz sampling rate and uses the fixed-time method
for velocity estimation.
What will be the speed estimation error if a one-count error was made in the position
counts while the motor was running at the minimum detectable speed?
(b)Assume that the encoder is connected to a controller that uses the 1/T interpolation
method with a 1 μs timer.
If the motor is running at the same minimum speed as in the first case, what will be the
speed estimation error if a 1-count error was made in the timer counts?
15
encoder: 4000
xung/vòng
16
17
Classwork
1. Một động cơ servo sử dụng bộ mã hóa gia lượng 1024 xung. Nếu động cơ chạy
với vận tốc 3600 vòng/phút và bộ điều khiển sử dụng bộ giải mã quadrature
(dùng 2 kênh AB), thì bộ mã hóa sẽ tạo ra bao nhiêu lần đếm mỗi giây?
2. Trục máy sử dụng bộ truyền động vít bi có bước vít 10 vòng/phút. Động cơ trục
được ghép trực tiếp với vít bi. Trục phải có độ chính xác ± 0,0005. Độ phân giải
tối thiểu mà bộ mã hóa động cơ nên có là bao nhiêu?
3. Một bộ mã hóa gia tăng với 1024 PPR và giải mã quadrature được sử dụng với
một bánh xe đo có đường kính 10 cm như trong hình. Sự thay đổi tối thiểu về
khoảng cách tuyến tính có thể được đo bằng bánh xe này là bao nhiêu? Nếu bộ
phận được đo đang chuyển động ở tốc độ 1.2 m∕s thì tần số của các xung bộ mã
hóa tính bằng cts∕s sẽ là bao nhiêu?
18