Download Encoder Signal Processing

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Beyond Bits
Motor Control Edition
Encoder Signal Processing
Devices for industrial applications
Introduction
Quadrature encoders are widely used
in industrial motor control applications
as precise rotor position sensors
mounted directly on the motor shaft.
This article will provide information on
the principle of the encoder operation
and the quadrature decoder MCU
module used for decoding of the
position information.
Quadrature Incremental
Encoder
processed by the on-chip hardware
of the controlling MCU.
The quadrature incremental encoder
is a position feedback device that
provides incremental counts. The
incremental encoder provides relative
information, where the feedback
signal is always referenced to a start
position. The signals are directly
The quadrature encoder typyically
has three output signals. The “phase
A” and “phase B” signals consist
of a series of pulses, the phase
shifted by 90° (therefore the term
“quadrature” is used). The third signal,
called “index,” provides the absolute
position information, in motion
Figure 1: Quadrature Encoder Output Signals and Position Encoding Modes
Phase A
Phase B
Counter
Increment/
Decrement
+1 +1 +1 +1 +1 +1 +1
+1
-1 -1 -1 -1 -1 -1
-1
+1 +1 +1 +1 +1 +1 +1
+1
-1 -1 -1 -1 -1 -1
-1
+1 +1 +1 +1 +1 +1 +1
Counter
Value
Time
Phase A
Phase B
Counter
Increment/
Decrement
+1 +1 +1
+1 +1
+1 +1 +1
-1
-1
-1
-1
-1
Counter
Value
Time
Beyond Bits
control used to check the pulse
counting consistency. That means,
after each revolution, the value of
the counted pulses is captured and
compared against the defined value.
If a difference is detected, the control
algorithm then must perform the
position offset compensation.
Quadrature Decoder
The quadrature decoder is the MCU
peripheral module used for hardware
decoding of the encoder signals
and is a standard component of
Freescale motor control dedicated
chips. Though there are differences in
the implementation of the quadrature
decoders in particular MCU families, the
principle is the same: it counts rising
and falling edges of both phase signals.
The internal logic of the quadrature
decoder evaluates the direction of the
rotation by increasing or decreasing
the counter value. There are also other
arrangements of the output encoder
signals. For example, the phase A
signal is a chain of the pulses while
the polarity of phase B determines the
counting direction, as shown in the
lower time diagram in figure 1.
Implementation of the
Quadrature Decoder
on DSCs
The special purpose enhanced
quadrature encoder/decoder module
is part of the newly introduced
MC56F84xx family of DSCs. It
provides interfacing capability to
position/speed sensors used in
industrial motor control applications
and has four input signals: phase
A, phase B, index and home. This
module is used to decode shaft
position, revolution count and speed.
It also supports different sources of
interrupt events.
Implementation of the
Quadrature Decoder
on Kinetis MCUs
The quadrature decoder is one of
several features of the FlexTimer
module that is part of the Kinetis family
of MCUs. It is not as rich in features
as the previously mentioned module
and only has two input signals, phase
A and phase B, so only the position
can be evaluated directly. If required,
processing of the index signal has to
be made by another on-chip timer.
Motor Control Edition
More information on the initialization
and configuration of the quadrature
decoders can be found in the
following application notes, design
reference manuals and device
reference manuals:
•A
N4381 (Configuring the
FlexTimer for Position and Speed
Measurement with an Encoder)
•D
RM128 (PMSM Vector Control
with Quadrature Encoder on Kinetis)
RM102 (PMSM Vector Control
•D
with Single-Shunt Current-Sensing
Using MC56F8013/23)
•M
C56F844XXRM,
K40P100M72SF1RM
These documents are available at
freescale.com/motorcontrol.
Beyond Bits
Motor Control Edition
How to Reach Us:
Home Page:
freescale.com
Motor Control
Portfolio Information:
freescale.com/motorcontrol
e-mail:
[email protected]
USA/Europe or Locations Not Listed:
Freescale Semiconductor
Technical Information Center, CH370
1300 N. Alma School Road
Chandler, Arizona 85224
1-800-521-6274
480-768-2130
[email protected]
Europe, Middle East, and Africa:
Freescale Halbleiter Deutschland GmbH
Technical Information Center
Schatzbogen 7
81829 Muenchen, Germany
+44 1296 380 456 (English)
+46 8 52200080 (English)
+49 89 92103 559 (German)
+33 1 69 35 48 48 (French)
[email protected]
Information in this document is provided solely to enable system and software implementers to
use Freescale Semiconductor products. There are no express or implied copyright license granted
hereunder to design or fabricate any integrated circuits or integrated circuits based on the information
in this document.
Freescale Semiconductor reserves the right to make changes without further notice to any products
herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the
suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any
liability arising out of the application or use of any product or circuit, and specifically disclaims any
and all liability, including without limitation consequential or incidental damages. “Typical” parameters
which may be provided in Freescale Semiconductor data sheets and/or specifications can and do
vary in different applications and actual performance may vary over time. All operating parameters,
including “Typicals” must be validated for each customer application by customer’s technical experts.
Freescale Semiconductor does not convey any license under its patent rights nor the rights of others.
Freescale Semiconductor products are not designed, intended, or authorized for use as components
in systems intended for surgical implant into the body, or other applications intended to support or
sustain life, or for any other application in which the failure of the Freescale Semiconductor product
could create a situation where personal injury or death may occur. Should Buyer purchase or use
Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall
indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and
distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney
fees arising out of, directly or indirectly, any claim of personal injury or death associated with such
unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was
negligent regarding the design or manufacture of the part.
Japan:
Freescale Semiconductor Japan Ltd.
Headquarters
ARCO Tower 15F
1-8-1, Shimo-Meguro, Meguro-ku,
Tokyo 153-0064, Japan
0120 191014
+81 3 5437 9125
[email protected]
Asia/Pacific:
Freescale Semiconductor Hong Kong Ltd.
Technical Information Center
2 Dai King Street
Tai Po Industrial Estate,
Tai Po, N.T., Hong Kong
+800 2666 8080
[email protected]
For more information, visit freescale.com/motorcontrol
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off.
All other product or service names are the property of their respective owners.
© 2012 Freescale Semiconductor, Inc.
Document Number: BBENCDRSIGPRCART REV 0