Share this

Phase compensation method and device for motor zero position and encoder zero position

2026-04-06 03:52:27 · · #1

0 Introduction

In the era of Industry 4.0, the country focuses on upgrading and transforming the manufacturing industry and developing high-end intelligent equipment. Servo control systems play a crucial role as direct executors in automation and high-end intelligent equipment. Permanent magnet synchronous motors (PMSMs) have been widely used in CNC machine tools, robots, manned spacecraft, variable frequency air conditioners and other applications due to their advantages such as high efficiency, high air gap magnetic density, high power factor, compact and simple structure, and linear response [1]. In servo drive control systems, whether the phase relationship between the zero position of the servo motor and the zero position of the encoder can be accurately obtained is related to whether the servo motor can start normally. An incorrect phase relationship will cause the PMSM to fail to start, and the rotor will exhibit adverse phenomena such as reverse rotation and shaking [2].

In order to accurately obtain the phase relationship between the servo motor zero position and the encoder zero position, Liu Jianwen summarized various phase alignment methods for different encoders. These methods are mainly based on manual alignment, and the basic alignment steps are as follows [3]:

(1) Direct current is directly applied to any two phases of the motor to lock the motor rotor in a fixed position. The electrical angle of the locked position of the motor rotor can be determined according to the phase sequence and direction of the current. For example, if the direct current enters from the a-phase winding and exits from the b-phase winding of the motor, the motor rotor will be locked at a position with an electrical angle of -30°.

(2) Manually adjust the relative position of the encoder and the motor rotor while using debugging tools, such as oscilloscopes or devices that can display encoder feedback data, to observe the encoder zero position mark. When the zero position mark appears on the debugging tool, fix the encoder shaft on the motor rotor to complete the phase alignment.

This manual search and calibration of the zero position is very laborious and affects the consistency of the zero position calibration accuracy of the corresponding encoder. As a result, various zero adjustment devices designed for different encoders have emerged. Wang Xinshe et al. designed a dedicated phase alignment servo driver for incremental encoders with UVW Hall signals. Multiple selection switches are used to control the phase alignment steps, and multiple LEDs are used to display the signal status. The encoder phase and rotor magnetic pole phase can be adjusted arbitrarily, and the motor can be driven to run. The operation is relatively simple, which improves production efficiency and phase accuracy. However, the encoder signals are not verified before zero position calibration, and the zero position calibration results are not verified [4]. Zhang Jingbo et al. designed a dedicated zero adjustment device that supports incremental and absolute encoders. The interface is user-friendly and the parameters can be set. However, the encoder signals are not verified before zero position calibration, and the zero position calibration results are not verified [5]. Therefore, the existing zero adjustment devices still have room for improvement. This paper mainly improves the phase compensation method between the motor zero position and the encoder zero position of the absolute encoder.

1. Working Principle

In the three-phase winding of an AC motor, the three-phase symmetrical instantaneous currents , , and can be represented by the projection of the combined current vector onto three time axes that are 120° apart by electrical angles [6], as shown in Figure 1.

Figure 1. Relationship between the composite current vector and the three-phase symmetrical instantaneous current

In Figure 1, the angle between the combined current vector and the a-phase current is the electrical angle, which is zero when it is zero, representing the motor's zero position. For AC servo motors, accurate electrical angles are crucial for vector control to achieve optimal output. For incremental encoders, the rising edge of the Hall U signal is typically aligned with the motor's zero position, or the index Z signal is aligned with the motor's zero position. For absolute encoders, since each output value corresponds to a unique position within a revolution, the absolute encoder's zero position is usually aligned with the motor's zero position.

The manual zero-alignment method involves first aligning the zero point and then fixing the absolute encoder to the motor shaft. The method described in this paper first arbitrarily installs the absolute encoder on the motor, then uses the device described in this paper to obtain the compensation angle between the absolute encoder's zero point and the motor's zero point, verifies the correctness of this compensation angle, and finally saves the compensation angle to the absolute encoder's built-in EEPROM. During servo driver power-on initialization, the compensation angle is read from the EEPROM and then superimposed on the real-time feedback angle of the absolute encoder to obtain the accurate electrical angle. This method eliminates the need for manual zeroing, improving the efficiency of motor encoder installation.

To ensure the accuracy of the entire process of acquiring the compensation angle, writing the compensation angle to the EEPROM, and reading the EEPROM, consider the following four points:

(1) For some single-turn absolute encoders, after power-on, they need to rotate a certain angle α to output the nominal resolution value. The output value within α has a relatively low resolution. However, after the motor is powered on with DC, the angle of rotation of the motor is less than α. Therefore, the absolute encoder value read by the CPU has low accuracy, resulting in a large zero-position correction error, which will reduce the performance of the servo driver. Therefore, during zero-position correction, the motor rotor must rotate through an angle α.

(2) For the split-type absolute encoder, due to assembly reasons, the feedback data may be incorrect. Therefore, the feedback data must be checked before obtaining the compensation angle.

(3) After calculating the compensation angle, the correctness of the compensation angle is verified by trial operation.

(4) After the compensation angle is written to the EEPROM, it needs to be read back to ensure that the data is read and written correctly.

Figure 2. Simplified block diagram of the control system

In Figure 2, the control system is divided into two stages: (1) Stage 1: When the switch S is in the "0" position, the system is locked shaft control and calculates the compensation angle. (2) Stage 2: When the switch S is in the "1" position, the system runs the motor according to the calculated compensation angle to verify the correctness of the compensation angle. Through the trial run, the correctness of the encoder assembly and encoder data feedback can also be verified.

2. Methods and Steps

The simplified operation steps of the compensation method are shown in Figure 3.

Figure 3. Brief operation steps of the compensation method

(S1) Power-on initialization: Based on the motor model and absolute encoder model set in the dedicated servo driver, the functions of each part of the dedicated servo driver are initialized using the motor parameters and absolute encoder parameters stored in the dedicated servo motor.

(S2) Lock the motor to phases a, b, and c in sequence: Lock the motor rotor in sequence "phase a → phase b → phase c → phase a" using vector control. After locking the motor rotor to the specified position each time, delay for a certain period of time, record the position value uploaded by the absolute encoder, and calculate the electrical angle corresponding to the position value uploaded by the absolute encoder, which is recorded as the measured angle.

(S3) Calculate the compensation angle: Let the electrical angle when locking the shaft be the target angle. Then, according to the formula: = +, calculate the compensation angle for each locking position. Finally, obtain the final compensation angle by averaging. When calculating the average value of the compensation angle, the average value of the period needs to be considered [7].

(S4) Motor test run: Using the obtained compensation angle, test run the motor according to the set method. The set method is: ① Low-speed forward rotation for several revolutions → ② Low-speed reverse rotation for several revolutions → ③ High-speed forward rotation for several revolutions → ④ High-speed reverse rotation for several revolutions. During the test run, detect errors such as absolute encoder data errors, overspeed, and overcurrent.

(S5) Parameter Programming: Proceed to this step when there are no error alarms during motor trial run. In this step, the motor parameters, absolute encoder parameters, and final compensation angle are programmed into the absolute encoder's EEPROM. A readback comparison operation is performed during parameter programming. Alarms for communication errors and programming errors are set.

3. Software Process

Two triggering methods are designed for the phase compensation of motor zero position and encoder zero position: one is through a single switch control method, and the other is through PC debugging software control method.

The flowchart of the single-switch control method is shown in Figure 4. As can be seen from Figure 4, only one switch is needed to control the entire process of motor rotor zero-position correction, trial operation, and EEPROM read/write.

Figure 5 shows the flowchart of the PC software control method. As can be seen from Figure 5, the PC software allows for independent control of the motor shaft locking, compensation angle calculation, parameter programming, and parameter operations. Parameter operations include uploading, modifying, and downloading motor parameters and absolute encoder parameters.

Figure 4 Flowchart of Single Switch Control Method

Figure 5 Flowchart of PC software control method

4 Platform Verification

The experimental platform shown in Figure 6 was constructed for verification.

Figure 6 Verification Platform

The PC software interface is shown in Figure 7.

Figure 7 PC software interface

The experimental results of the single-switch control method are shown in Figures 8 and 9.

Figure 8. Current waveforms of phases a/b/c throughout the entire process.

Figure 9. Phase relationship of three-phase currents a/b/c

As shown in Figure 8, when the motor rotor is locked in phases a, b, and c, the current in that phase is at its maximum, satisfying the vector control principle. After the first stage of the single-switch control mode is completed, it automatically enters the second stage for high and low speed test runs. Figure 9 shows the phase relationship of the three-phase currents a/b/c during deceleration and stopping at high speed, showing that a/b/c are 120° out of phase.

5. Conclusion

Based on experimental verification and on-site customer trials, the method and apparatus described in this paper have the following advantages:

(1) Motor manufacturers do not need to pay attention to the relative position of the absolute encoder zero position and the motor rotor zero position. It can be installed arbitrarily. The entire zero position calibration process can be triggered by a single switch. The operation is simple, greatly reducing the zero position calibration process and improving the installation efficiency of the absolute encoder of the motor.

(2) The motor rotor zero-position correction process includes high and low speed test runs of the motor, which can verify whether the compensation angle is correct. At the same time, the motor can be judged whether there is a fault by observing the motor's operating status at high and low speeds, thus reducing the need for the motor manufacturer to conduct separate test runs of the motor.

(3) EEROM read/write verification mechanism to ensure that data is correctly written into EEPROM.

References

[1]Khadija K, Benyounes M, Khalil BI, et al. A simple and robust Speed ​​Tracking Control of PMSM[J]. Przegląd Elektrotechniczny, 2011, 87(7): 202-207.

[2] Zeng Jianan, Zeng Yuenan, Ji Mianhao. Initial position detection of rotor of permanent magnet synchronous motor [J]. Electrical Engineering, 2005(4):44-45.

[3] Liu Jianwen. Various encoder calibration methods [J]. Elevator Industry, 2014(3):69-71.

[4] Wang Xinshe, Tang Huangsheng, Lin Rong, et al. Design of phase adjustment and operation system for AC servo motor encoder. Micro Motor, 2013, 46(1), 76~78.

[5] Zhang Jingbo, Ai Wu. Design of zero-point debugging instrument for servo motor encoder [J]. Micro Motor, 2012, 45(03): 61-65.

[6] Zhou Yangzhong, Hu Yuwen. Direct Torque Control of AC Motors [M]. Machinery Industry Press, 2009.

[7] Christopher M. Bishop. Pattern Recognition and Machine Learning(Information Science and Statistics)[M]. Springer. 2007:105-124.

Read next

CATDOLL 139CM Nonoka (TPE Body with Soft Silicone Head)

Height: 139cm Weight: 23kg Shoulder Width: 33cm Bust/Waist/Hip: 61/56/69cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22