TMC4671 Datasheet • IC Version V1.00 | Document Revision V1.04 • 2018-Dec-11
35 / 157
4.7 Encoder Engine
The encoder engine is an unified position sensor interface. It maps the selected encoder position informa-
tion to electrical position (phi_e) and to mechanical position (phi_e). Both are 16 bit values. The encoder
engine maps single turn positions from position sensors to multi-turn positions. The user can overwrite
the multi-turn position for initialization.
The different position sensors are the position sources for torque and flux control via FOC, for velocity
control, and for position control. The PHI_E_SELECTION selects the source of the electrical angel phi_e
for the inner FOC control loop. VELOCITY_SELECTION selects the source for velocity measurement. With
phi_e selected as source for velocity measurement, one gets the electrical velocity. With the mechanical
angle phi_m selected as source for velocity measurement, one gets the mechanical velocity taking the
set number of pole pairs (N_POLE_PAIRS) of the motor into account. Nevertheless, for a highly precise
positioning, it might be useful to do positioning based on the electrical angel phi_e.
4.7.1 Open-Loop Encoder
For initial system setup, the encoder engine is equipped with an open-loop position generator. This allows
for turning the motor open-loop by specifying speed in rpm and acceleration in rpm/s, together with
a voltage UD_EXT in D direction. As such, the open-loop encoder is not a real encoder. It simply gives
positions as an encoder does. The open-loop decoder has a direction bit to define direction of motion for
the application.
Note
The open-loop encoder is useful for initial ADC setup, encoder setup, Hall signal
validation, and for validation of the number of pole pairs of a motor. The open-
loop encoder turns a motor open with programmable velocity in unit [RPM] with
programmable acceleration in unit [RPM/s].
With the open-loop encoder, the user can turn a motor without any position sensor and without any
current measurement as a first step of doing the system setup. With the turning motor, the user can
adjust the ADC scales and offsets and set up positions sensors (Hall, incremental encoder, . . . ) according
to resolution, orientation, and direction of rotation.
4.7.2 Incremental ABN Encoder
The incremental encoders give two phase shifted incremental pulse signals A and B. Some incremental
encoders have an additional null position signal N or zero pulse signal Z. An incremental encoder (called
ABN encoder or ABZ encoder) has an individual number of incremental pulses per revolution. The number
of incremental pulses define the number of positions per revolution (PPR). The PPR might mean pulses
per revolution or periods per revolution. Instead of positions per revolution, some incremental encoder
vendors call these CPR counts per revolution.
The PPR parameter is the most important parameter of the incremental encoder interface. With that, it
forms a modulo (PPR) counter, counting from 0 to (PPR-1). Depending on the direction, it counts up or
down. The modulo PPR counter is mapped into the register bank as a dual ported register. The user can
overwrite it with an initial position. The ABN encoder interface provides both the electrical position and
the multi-turn position, which are accessible through dual-ported read-write registers.
Note
The PPR parameter must be set exactly according to the used encoder.
The N pulse from an encoder triggers either sampling of the actual encoder count to fetch the position at
the N pulse or it re-writes the fetched n position on an N pulse. The N pulse can either be used as stand
©2018 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com