Share this

A Brief Analysis of Encoder Debugging Issues in Servo System Applications

2026-04-06 05:42:56 · · #1

Abstract: Leadshine AC servo drives have undergone 15 years of continuous improvement, maintaining a leading position in product performance and stability in China, and have become a widely acclaimed servo brand in the market. With the expansion of servo applications, customers require servo drives to be compatible with different servo motors in various applications. Leadshine's LD5 series servo drives offer exceptional versatility, supporting not only Leadshine brand servo motors but also DC brushless, coreless, and other brands of AC servo motors.

1. Encoder Principle

There are many types of encoders, and there are also many forms of output signals. Currently, the main type used is the photoelectric encoder, which outputs a pulse signal. Its principle is shown in Figure 1.

Figure 1

The photoelectric encoder disk is mounted on the motor shaft and has ring-shaped bright and dark markings. An LED emits a light source, and a matrix of multiple optocouplers enhances signal stability. The encoder internally compares the intensity of the light source and outputs two signals, A and B, with a 90-degree phase difference. Additionally, a Z-phase pulse is output per revolution to represent the zero-position reference.

Since phases A and B are 90 degrees out of phase, the forward and reverse rotation of the encoder can be determined by comparing whether phase A or phase B comes first.

To increase the stability of encoder signal transmission over long distances, the A, B, and Z signals are output differentially to enhance signal stability.

The Hall signals U, V, and W of photoelectric encoders are generated on the same principle as the A and B signals. Brushless or low-voltage servo motors also generate Hall signals using magnetic rings and Hall elements.

2. Hall Effect Application Principle in Servo Motors

As is well known, servo motors have much higher efficiency than other motors, mainly because they employ the principle of vector control. Simply put, a servo motor consists primarily of a rotating permanent magnet (rotor) and three sets of evenly distributed coils (stator), with the coils surrounding the stator and fixed externally. Current flowing through the coils generates a magnetic field, and the three magnetic fields superimpose to form a vector magnetic field. By controlling the current in each of the three sets of coils, we can make the stator generate a magnetic field of arbitrary direction and magnitude.

Simultaneously, the torque can be freely controlled through the mutual attraction and repulsion between the stator and rotor magnetic fields. For any angle of rotor rotation, the stator has an optimal magnetic field direction that generates the maximum torque. Obviously, if the direction of the magnetic field generated by the stator is orthogonal to the direction of the rotor's magnetic field, this position is where the maximum torque is generated.

The spatial current vector of a fixed coil has a fixed magnetic field direction, which is entirely determined by the interaction between the magnitude of the magnetic flux through the coil and the current flowing through it. Thus, we can use the spatial current vector to characterize the stator's magnetic field; this spatial current vector is the spatial superposition of the current vectors generated by the three sets of coils. This is the basic principle of servo vector control.

2.1 Application Principle of Hall Signals in AC Servo Motors

After receiving the operation command, the AC servo drive first determines the initial rotor position based on the signals fed back from the motor's Hall sensors U, V, and W. It then provides an initial current to create a magnetic field in the stator perpendicular to the rotor's magnetic field within that range, driving the rotor to rotate. When the rotor drives the encoder to output the first rising or falling edge of the Hall sensor (a high or low level change in any of U, V, or W), the driver immediately adjusts the current according to the rotor position to create a magnetic field in the stator perpendicular to the rotor's magnetic field. Subsequently, it determines the rotor position based on the A and B signals and outputs the current to ensure that the stator's magnetic field is always perpendicular to the rotor's magnetic field. To reduce the cumulative error of the A and B signals, the A and B signals are corrected each time a Z signal is encountered, thus minimizing error accumulation.

2.2 Demonstration

First: Determine the rotor position

Figure 2

As shown in Figure 2, the Hall U, V, and W signals obtained by the encoder reading head divide the rotor position into 6 regions, and the Hall signals are shown in Table 1.

Table 1

As shown in Figure 3, when the rotor is located at the 0-60° position, the stator provides a magnetic field perpendicular to the 30° position to make it rotate.

Figure 3

The direction of this magnetic field remains unchanged initially until it encounters the first rising or falling edge of the Hall effect, at which point it changes, as shown in Figure 4.

Figure 4

From then on, the rotor position was determined based on signals A and B, so that the stator magnetic field was always perpendicular to the rotor magnetic field.

3. Debugging Steps

3.1 Define the motor windings U, V, W

The back electromotive forces (EMFs) of the motor windings U, V, and W must satisfy the condition that U leads V and W. The back EMF waveforms of the three-phase motor windings are measured using an oscilloscope, as shown in Figure 5.

Figure 5

Figure 5 shows that the winding corresponding to the yellow waveform is U, the winding corresponding to the blue waveform is V, and the winding corresponding to the red waveform is W.

3.2 Check whether the encoder's defined positive rotation direction is consistent with the motor's positive rotation direction.

Many people easily overlook this point, often directly wiring the driver according to the encoder's definition and signal requirements. This frequently leads to situations where some encoders work, but others don't. The main reason for this problem is that the driver and encoder are not from the same manufacturer, so their defined rotation directions are inconsistent. Based on the encoders I've tested, Avago and Tamagawa define the rotation direction in the same way as Leadshine servo encoders, while Nemtec and Danaher define the rotation direction in the opposite way.

Therefore, for a new encoder, firstly, determine its defined rotation direction through documentation, and secondly, determine its rotation direction through testing. The method is as follows:

1. Rotate the motor in the direction defined by Leadshine (counterclockwise) to drive the encoder and test the defined A and B signal waveforms, as shown in Figure 6.

Figure 6

If, as shown in Figure 6, the test reveals that signal B leads signal A by 90°, then signal A must be defined as signal B, and signal B as signal A. If signals A and B are not redefined, the encoder's feedback stroke will be opposite to the actual operating stroke, causing the servo motor to "run away."

2. Rotate the motor in the direction defined by Leadshine (counterclockwise) to drive the encoder and test the defined Hall U, V, W signal waveforms, as shown in Figure 7.

Figure 7

If the Hall U, V, and W signals are currently in the order of Hall U leading Hall V leading Hall W, then this conforms to the Leadshine servo definition standard. If Hall U is found to be leading Hall W leading Hall V, then Hall W must be redefined as Hall V, and Hall V as Hall W. If these definitions are not made, according to the Hall signal application principle described above, the driver will make an error in judging the rotor position.

3. The phase relationship between the Hall signal and the back electromotive force is shown in Figures 8 and 9.

Figure 8 Figure 9

The zero-phase sequence in Figures 8 and 9 is as follows: Hall U to UV line back EMF (probe positive connected to U, negative connected to V), Hall V to VW line back EMF (probe positive connected to V, negative connected to W), Hall W to WU line back EMF (probe positive connected to W, negative connected to U). The phase relationship is the zero-crossing point of the rising edge of the Hall signal to the zero-crossing point of the rising edge of the back EMF.

The 146 phase sequence is as follows: Hall U versus U back electromotive force (probe positive connected to U, negative connected to the zero line), Hall V versus V back electromotive force (probe positive connected to V, negative connected to the zero line), Hall W versus W back electromotive force (probe positive connected to W, negative connected to the zero line), and the phase relationship is the zero-crossing point of the rising edge of the Hall signal versus the zero-crossing point of the rising edge of the back electromotive force.

4. Conclusion

With the above adjustments, you can use Leadshine's highly reliable servo drives to match various types of servo motors to meet various application requirements.

Read next

Discussion on the Integration and Upgrading of DCS Control Systems

1. Process Status and Automation System Background of Nantong Acetate Fiber Co., Ltd. Nantong Acetate Fiber Co., Ltd. (h...

Articles 2026-02-22
CATDOLL Jo Soft Silicone Head

CATDOLL Jo Soft Silicone Head

Articles
2026-02-22
CATDOLL Mimi Hard Silicone Head

CATDOLL Mimi Hard Silicone Head

Articles
2026-02-22