Encoder Position for PM Motors

Permanent-magnet (PM) motors have become popular options in elevator applications over the years due to their increased efficiency and performance characteristics. Since a PM motor’s rotor is magnetized by permanent magnets, rather than induced, the variable-frequency drive (VFD) must know the rotor position in relation to a stator pole pair to modulate at the correct commutation angle to produce maximum torque output. The rotor position can be determined by an absolute position encoder mounted on the motor shaft. This article will explain how the rotor position of a PM motor is measured with the VFD and some common problems associated with incorrect encoder position.

Why Does the VFD Need to Know the Rotor Position?

PM motors consist of a rotor with PMs mounted on the surface (or internal to the rotor) and stator coils, which are magnetized by current output by the VFD. The interaction between rotor PMs and stator electromagnet fields follow the general laws of magnetism, where opposites attract, and like forces repel. Then, as the drive modulates the output voltage frequency, a rotating magnetic stator field is created to produce torque. But, the proper stator magnetic-field commutation angle is necessary for maximum torque output. Maximum torque output occurs when the stator and rotor magnetic fields are 90° from each other (Figure 1). Otherwise, if the angle between the stator and magnetic fields is greater or less than 90°, more current must be applied to the stator to create a stronger magnetic field to produce the same amount of torque.

Therefore, the rotation of the three-phase AC voltage applied to the stator winding must be exactly synchronized (e.g., electrically commutated) to the rotation of the PM field on the rotor. This can be accomplished by using an absolute position encoder mounted directly to the motor shaft. Absolute position encoders have a channel pair, in addition to the typical speed channels for single-turn rotor position, and a reference procedure must be performed during startup so the drive has a position value corresponding to a known position, such as a motor pole, which is then used as an offset reference. The physical relationship between the motor shaft and encoder is crucial for providing the correct commutation angle to the PM magnetic field.


What Happens When the Learned Rotor Position Is Incorrect?

Below are a few indications that the measured rotor position may be incorrect:

• High motor current

• Drifting car (pulled in direction of weighting)

• No or slight motor shaft movement

If the rotor position is incorrect, the drive will commutate the stator field at the wrong angle or, perhaps, be out of synchronization with the rotor field. Error in the commutation angle results in more current required at the stator to create a stronger electromagnetic field to produce the same amount of torque. For large degrees of error, this may result in high current draw at the motor, but not enough torque to move or hold the motor. As the amount of error in the electrical commutation angle increases, the motor current draw increases at an exponential rate (Figure 2).

In Figure 2, “Iqds” is the total stator or phase current of the motor. As the degree (electrical) of error in the commutation angle increases, the motor has to draw more current to generate the required torque. It is essential that the position of the encoder on the motor shaft not change to maintain proper stator-field commutation.

Encoder Shaft Position and Precision

360° (electrical) corresponds to one cycle of the AC voltage waveform of a given frequency. Applied to the motor stator windings, this translates to a north electromagnetic pole during the positive half cycle and a south electromagnetic pole during the negative half cycle. Thus, 360° (electrical) on the stator corresponds to a north/south pair of motor poles (Figure 3). Equation 1 can be used to determine the relationship between mechanical and electrical degrees:


As the number of motor poles increases, the mechanical degrees the rotor must rotate for 360° (electrical) decreases. For example, a six-pole motor would have 120° (mechanical) degrees between pole pairs, whereas a 20-pole motor would have 36° (mechanical) between pole pairs.

The encoder electrical position can be expressed in a range of counts that corresponds to 0-360° (electrical). While the electrical position can be used to relate to the active commutation angle for motor rotation, it is most commonly referred to as a static position offset (e.g., relative to one of the motor poles). For this article, a 16-bit resolution of encoder electrical position counts between pole pairs is considered; in this case, the encoder electrical position between pole pairs would correspond to a range of 0–65,535 counts. The relationship between counts and mechanical degrees can then be expressed as:


As the number of motor poles increases, the number of counts per mechanical degree increases; that is, the degree of mechanical error translates to the corresponding degree in electrical error and increases as the number of motor poles increases. This makes the mechanical alignment of the encoder that much more critical for proper operation. This can be highlighted by continuing the previous example; a six-pole motor would have 546 counts per mechanical degree, whereas a 20-pole motor would have 1,820 counts per mechanical degree.

For PM motors, torque can be maximized when the stator and rotor magnetic fields are 90° apart. The electrical degree of error will, therefore, dictate the maximum torque for a given current supplied to the motor. The electrical degree of error is shown in Equation 4, and the percentage of maximum torque for a given electrical error is shown in Equation 5:

This maximum torque will occur within a window of approximately 4,000 counts (± 2,000 counts). An error of 2,000 counts corresponds to an error of 11° electrical on the stator magnetic-field sine wave commutation angle from Equation 6:

An error of 10.98° (electrical) in the stator-field commutation angle means there is only a 1.83% error in torque:

But, as was shown in Figure 2, there is a nonlinear relationship between the electrical degree of error (due to the mechanical degree of error) and the current (and, therefore, torque, since this is linearly related with current for PM motors) due to the sine function in Equation 5.


Further continuing the previous examples to exemplify this, 1° of mechanical mounting error of the encoder on the motor shaft for a 20-pole motor translates to 1,820 counts of electrical error, which results in 1.52% loss of motor torque for a given current, whereas 2° of mechanical mounting on the same motor equates to 6.0% motor torque loss, and 3° of error a equates to a 13.4% motor torque loss, etc. It’s not difficult to see how encoder mounting becomes critical and must remain precise without slippage. Even for a very large 2-in. diameter encoder shaft with a circumference (π X diameter) of 6.28 in., 3° of mechanical error corresponds to about 1/128 in. of movement on the outer diameter. If the encoder is ever removed, an encoder position offset learn procedure will need to be performed again.

The following section contains a few reasons why the position of the encoder on the motor shaft may have changed. Part I focuses on a car that had previously been running trouble free, while Part II focuses on issues encountered during the startup and commissioning phase.

Part I: Encoder Issues With a Previously Running Car

Encoder Slippage Due to Poor Mounting/Loose Connection

Encoder slippage can occur when the position of the encoder on the motor shaft changes over time, in different hoistway positions or in different directions. This could be due to poor or improper mounting, grease on the mounting shaft, a broken mounting tab or catching. To ensure the encoder is not slipping, the car can be run to the bottom of the hoistway after the initial encoder position offset learn, and another encoder position offset learn can be completed. Then, the car can be run to the top of the hoistway and a final encoder position offset learn can be completed. These three encoder position offset learn values can then be compared against each other. If the rotor position changes drastically (≥±2,000 counts) between these procedures, it is likely due to the change in the physical relationship between the encoder and motor shaft. In some rare cases, slippage can occur between the motor shaft and rotor steel laminations (e.g., loose fit, broken weld, etc.). The degree of encoder slippage may not be visually detectable.

Ensure the motor shaft is clear of dirt and debris that could cause mounting problems. Verify that all set screws are tight and that the encoder is mounted squarely on the motor shaft. Some encoders have a screw that fits inside of the end of the motor shaft, rather than relying on a set screw for mounting. If the screw used to mount the encoder is too long, it may bottom out on the motor-shaft threads, resulting in a poor/loose connection. Figures 5-8 show examples of encoder slippage and mounting problems.

Part II: Encoder Issues During Startup

Incorrect Encoder Channel Phasing

After an encoder offset position learn has been performed, if the motor does not turn and draws high current, its phasing may need to be changed (e.g., "Not Inverted" to "A-B Swapped"). Depending on the mounting orientation of the encoder and phasing of the motor, the incremental A-B speed channel phasing may need to be swapped. Depending on the VFD, the channels may be swapped via a software parameter setting.

After an encoder offset position learn has been performed, if the motor runs without drawing high current, but runs in the wrong direction in both the up and down directions, then only the direction of rotation needs to be changed (e.g., "Not Inverted" to "Inverted Rotation"). Note that each channel phase pair will have a corresponding encoder position value. If changing the encoder channel phasing by swapping A-B phasing, or vice versa, a new encoder position offset learn procedure must be completed. See the following section "Incorrect Motor Phasing and Encoder Mounting" for more information.

Incorrect Motor Data

If the rotor position is changing drastically (≥±2,000 counts) between encoder position offset learn procedures, the sheave is not moving, and encoder mounting has been verified, the motor data entered into the drive may be incorrect. Equation 8 holds true for all PM synchronous AC motors and should be verified against nameplate motor data:

Some motor manufactures may de-rate motor data depending on the application. De-rated motor data must be scaled properly so that the number of motor poles remains constant. Using motor data from Figure 9, a motor originally meant to run at 200 fpm can be used to run in an application at 100 fpm by reducing the speed and frequency by a factor of two. It is important that both the frequency and speed are scaled by the same factor to ensure pole count consistency.

Incorrect Motor Phasing and Encoder Mounting

In three-phase AC motor applications, the UVW motor phasing determines the direction of rotation. If the motor turns in the wrong direction, two phases can be swapped to switch the direction. This does not present a problem in open-loop induction-motor applications without an encoder. However, when an absolute encoder is used, proper motor phasing impacts the A-B channel phasing of the encoder.

The UVW phasing of the motor and A-B phasing of the encoder are related such that the encoder has an established convention for incrementing and decrementing position values coinciding with the direction of the motor stator field. This convention is typically indicated by the encoder manufacture with a diagram like Figure 10.

The encoder position values will increment or decrement according to the manufactures established convention. This happening in the wrong direction can cause the motor to draw high current or not turn. The A-B channel feedback from the encoder determines if the position values are incrementing or decrementing. Absolute encoders typically feature incremental speed channels consisting of sine and cosine waves with amplitude of 1Vpp, phase shifted by 90° for the A and B channels (Figure 11).

Depending on the A-B phasing of the encoder and the established position incrementing and decrementing convention, channel A may "lead" or "lag" channel B.

The position value convention also applies to the physical mounting of the encoder on the motor shaft. Depending on motor and encoder type, the encoder may be mounted on either side of the motor (stub shaft, etc.) or has an adjustable mounting configuration on the motor shaft. This will cause a discrepancy in the position value incrementing and decrementing convention. It is recommended practice to phase the drive and motor together: U-U, V-V and W-W, and adjusting the A-B phasing as needed. The A-B channels of the encoder may be swapped physically at the interface or with a software parameter setting based on drive type.


Due to their design, PM motors require rotor position in relation to a stator pole pair to be known by the VFD. Proper encoder mounting, alignment, channel phasing, and motor data/phasing are essential for maximum torque output and trouble-free operation. Encoder problems such as slippage can be difficult to diagnose, since they may happen gradually over time or not be visible to the user. However, troubleshooting using the above steps can quickly identify encoder problems.

Tyler Pecha is an application engineer in the Elevator Group at KEB America. He has been with KEB since 2016 and has a BS in Mechanical Engineering from the University of St. Thomas-Minnesota.

Tony Heiser is business development manager for elevator applications at KEB America, Inc. He received a bachelor’s degree in Electrical Engineering from the University of Minnesota, Minneapolis-Saint Paul.