Newsletter

Programmable Logic DesignLine  >  Design Center

How to use FPGAs for quadrature encoder-based motor control applications

The accuracy and performance of quadrature encoders are superior to traditional solutions in high-speed motor control schemes.

Page 1 of 2

Programmable Logic DesignLine

Precisely tracking speed, acceleration, and position of a motor's rotor is an essential requirement for many motor control applications found in everyday equipment such as fax machines, elevators, and medical equipment. A closed-loop control scheme is able to bring motor feedback information, such as back electromotive force (BEMF) voltage or supply current to the control system. Rotary encoding is a common mechanism for the delivery of accurate speed, acceleration, and position of the motor rotor.

Rotary encoders are commonly deployed in the closed-loop rotor systems used in a wide variety of applications from robotics and high end photographic lenses to opto-mechanical mice and trackballs to rotating radar platforms. A rotary encoder is an electro-mechanical device for converting the angular position of a shaft or axle to a digital code. For many applications and equipment that need to track object location, velocity and accelerations accurately, a rotary encoder offers a cost-effective solution.

Relative and Absolute are two primary types of rotary encoders. A quadrature encoder is in the relative encoder family and is most commonly used in high-speed motor control systems; it also facilitates the ability to determine motor direction.

Relative rotary encoder
The relative rotary encoder, also known as incremental encoder, is an applied optical encoding methodology. Generally, the rotary encoder utilizes a patterned spinning disc attached to the motor shaft marked with a large number of radial lines like the spokes of a wheel (see Fig 1 below). An optical switch, such as a photodiode, generates an electrical pulse whenever one of the lines passes through its field of view. An electronic control circuit counts the pulses to determine the angle through which the shaft has turned.


1. Example of rotary encoder.

This system, in its simplest form, cannot measure the absolute angle of the shaft. It can only measure the change in angle relative to some arbitrary datum, such as the shaft's position at the time when the power was switched on. This uncertainty is not a problem for computer input devices, such as mice and trackballs. However, when an application demands the determination of absolute position, a second sensor can be added that detects when the shaft passes its zero position. Neither of these two implementations can determine the direction of rotation. Rotation direction is determined by adding a second sensor placed at a slightly different angle around the shaft from the initial sensor. The direction of rotation can then be inferred from the order in which the two sensors detect each radial line. This type of encoder is known as a quadrature encoder.

Quadrature encoder
A quadrature encoder is a common type of incremental encoder that supports two output channels (A and B) to sense position, velocity, and direction of rotation. Using two code tracks with sectors positioned 90 degrees out of phase, the two output channels of the quadrature encoder indicate both position and direction of rotation. If A leads B, the disk is rotating in one direction (clockwise in this case). By comparison, if B leads A, then the disk is rotating in the opposite (or counter-clockwise) direction (Fig 2).


2. Quadrature encoder output channels.

Position monitoring
In order to decode the output from quadrature encoders, two sequential samples are required. Sample from Time 'n' and Time 'n+1' (Tn and Tn+1) respectively. These two sets of data points create a 4-bit word that is used for a 16 entry look-up table. The table will contain four each of "go-tos" for count up, count down, no change (glitch) and error (both phase changed, probably overspeed).

The major advantage offered by a quadrature encoder is high resolution. Precision quadrature encoders are available that produce over 10,000 pulses per revolution at speeds exceeding 5000 RPM. Their high resolutions, extreme durability, and ease of installation make quadrature encoders ideal for a wide variety of applications in many divergent markets such as:

  • Office equipment: printers, fax machines and copy machines use quadrature encoders to synchronize various moving parts for trouble free operation.
  • Industrial Machinery: elevators use quadrature encoders to maintain velocity and acceleration and for correct door alignment.
  • Medical: automated blood analyzers use quadrature encoders to ensure the exact position of vials containing blood samples while performing automated tests.

High-speed and precision applications that utilize these quadrature encoders for velocity and acceleration control require hardware that can deterministically process quadrature encoder signals to determine velocity and acceleration and create the corresponding output controls signals at very low latency.

Velocity and acceleration monitoring
There are several accepted methods for determining the angular velocity and acceleration of a quadrature encoder. The following is an example that will count the number of quadrature encoder pulses in a fixed time interval to estimate the velocity and acceleration of the encoder – Fig 3 demonstrates this procedure. This method is appropriate for high speed applications.


3. Speed estimation.

Once the number of pulses in a fixed time interval is measured, the angular velocity of the quadrature encoder can be calculated using the following formula:

Where "Encoder Pulses" is the number of quadrature encoder pulses received in the Fixed Time Interval.

Acceleration is the rate of change of velocity. The following formula can be used to estimate the acceleration of the quadrature encoder:

Where the numerator divided by one Fixed Time Interval represents the change in velocity, and dividing the change in velocity by one Fixed Time Interval gives the acceleration.

Page 2: next page  

Page 1 | 2



Rate this article
WORSE | BETTER
1 2 3 4 5




Actel
Related Content

TECH PAPER
1. Programmable Logic Migration Platforms for Military Applications

TECH PAPER
2. Flash FPGAs in the Value-Based Market

TECH PAPER
3. Fusion Technology

TECH PAPER
4. Live at Power-Up: PLD Effects on System Design

 

 Featured Jobs
T-Mobile seeking Senior Facilities Engineer in Bellevue, WA

Protingent Staffing seeking Quality Engineer in Irvine, CA

Broadcom seeking Principal Packaging Engineer in Irvine, CA

ITT Corporation seeking Systems Engineer in Thousand Oaks, CA

Comverge, Inc. seeking Senior Firmware Engineer in Norcross, GA

More jobs on EETimesCareers
 Sponsor
 CAREER CENTER
Ready to take that job and shove it?
SEARCH JOBS:

 SPONSOR

 RECENT JOB POSTINGS
For more great jobs, career related news, features and services, please visit EETimes' Career Center.