Calibration and compensation system and method of encoder
Patent Information
- Application Number
- TW114112718
- Authority / Receiving Office
- TW · TW
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2045-04-01
AI Technical Summary
Existing encoder calibration methods require disassembly and reassembly of circuit wiring for alignment, are cumbersome due to cogging torque-induced origin position deviations, and inefficient, necessitating factory recalibration.
A method and system that calculates the actual offset angle of the encoder using motor offset angles from forward and reverse rotations, eliminating the need for external power and disassembly, and compensating for cogging torque effects.
Improves calibration accuracy, efficiency, and user convenience by integrating into automated processes without motor disassembly, reducing the need for factory recalibration.
Smart Images

Figure TWG2TA001079990_001 
Figure TWG2TA001079990_002 
Figure TWG2TA001079990_003
Abstract
Description
[Technical Field]
[0001] This case relates to a calibration and compensation system and method, and more particularly to a calibration and compensation system and method for an encoder. [Previous Technology]
[0002] Existing encoder calibration methods involve inputting DC power to the motor through an external power source, causing the motor rotor to be aligned to the origin position, and then writing the origin position into the encoder through a programmer to complete the calibration. However, the above process of performing current alignment on the motor through an external power source requires disassembling and reassembling the circuit wiring, making it difficult to integrate into the automation process.
[0003] Furthermore, due to the influence of the motor's cogging torque, the origin position deviates, therefore the encoder's origin position needs to be recalibrated. Currently, the compensation method for encoder origin position deviation usually involves repeatedly adjusting the compensation angle input to the encoder using empirical rules to complete the compensation of the origin position. However, this process is complicated and time-consuming, and therefore inefficient. Moreover, when the encoder has a deviation, it is not possible to calibrate the encoder's origin position without disassembling the motor. Therefore, the motor must be sent back to the factory for recalibration, causing inconvenience to the user.
[0004] Therefore, it is an urgent need to develop a correction and compensation system and method for encoders that can improve the defects of the above-mentioned conventional technology. [Summary of the Invention]
[0005] The purpose of this invention is to provide an encoder calibration and compensation system and method, which calculates the actual offset angle of the encoder using the offset angles obtained by the motor in forward and reverse rotation. The encoder calibration and compensation technology of this invention does not require external DC power for calibration, thus eliminating the need to disassemble circuit wiring and facilitating its integration into automated processes. Furthermore, since the actual offset angle of the encoder calibration and compensation technology of this invention is calculated from the offset angles of the motor in forward and reverse rotation, it is unaffected by cogging torque, thereby improving the accuracy of the calibration results. Moreover, since repeated adjustments to the compensation angle are not required, calibration efficiency is improved. Furthermore, since the encoder calibration and compensation method of this invention does not require additional power supply or platform equipment, this calibration and compensation method can perform encoder calibration and compensation without disassembling the motor, eliminating the need to send the motor back to the factory for recalibration and compensation, thus improving user convenience.
[0006] According to one aspect of the concept, this invention provides a method for calibrating and compensating an encoder, comprising the steps of: (a) providing a motor, an encoder, and a driver electrically connected to each other, wherein the driver is mounted on the motor and electrically connected to the encoder, the motor includes a rotor, and the encoder is mounted on the motor to detect the operation of the motor; (b) continuously providing a d-axis current command to the motor using the driver to drive the motor to rotate; (c) providing an increasing positive frequency to the motor using the driver to make the rotor rotate forward; (d) when the motor operates to a steady state, obtaining the origin position of the encoder using the driver, and obtaining a first offset angle based on the d-axis direction and the origin position of the encoder; (e) providing an increasing negative frequency to the motor using the driver to make the rotor rotate in reverse; (f) when the motor operates to a steady state, obtaining the origin position of the encoder using the driver, and obtaining a second offset angle based on the d-axis direction and the origin position of the encoder; (g) calculating an actual offset angle using the driver based on the first offset angle and the second offset angle; and (h) compensating the encoder using the driver based on the actual offset angle.
[0007] According to another aspect of the present invention, an encoder calibration and compensation system is provided, comprising a motor, an encoder, and a driver. The motor includes a rotor. The encoder is electrically connected to the motor and configured to detect the operation of the motor. The driver is electrically connected to the motor and the encoder, and configured to drive and control the motor, and control the encoder. The driver continuously provides a d-axis current command to the motor to drive the motor to rotate. The driver provides an increasing positive frequency to the motor to cause the motor rotor to rotate forward. When the motor reaches a steady state, the driver obtains the origin position of the encoder and obtains a first offset angle based on the d-axis direction and the origin position of the encoder. The driver provides an increasing negative frequency to the motor to cause the motor rotor to rotate in reverse. When the motor reaches a steady state, the driver obtains the origin position of the encoder and obtains a second offset angle based on the d-axis direction and the origin position of the encoder. The driver calculates an actual offset angle based on the first offset angle and the second offset angle, the actual offset angle being used to compensate the encoder.
[0008] In some embodiments, the first offset angle is the difference between the actual offset angle and the lag angle, and the second offset angle is the sum of the actual offset angle and the lag angle, wherein the lag angle is the angle difference between the rotor's rotational position during forward and reverse rotation and the d-axis direction, and wherein the actual offset angle is the angle difference between the rotor's rotational position during forward and reverse rotation and the encoder's origin position.
[0009] In some embodiments, when the motor operates to a steady state, the error between the motor frequency and the target frequency is less than the error percentage.
[0010] In some embodiments, when the error between the motor frequency and the target frequency is greater than the error percentage, the driver outputs a warning signal to the motor to stop the motor from running.
[0011] In some embodiments, the error percentage is 10%.
[0012] In some embodiments, the motor is a three-phase motor or a six-phase motor.
[0013] In some embodiments, after obtaining the actual offset angle, the driver stops providing d-axis current commands to the motor.
[0014] In some embodiments, after providing the d-axis current command to the motor, the motor is driven to rotate in an open-loop manner.
Implementation Method
[0015] Some typical embodiments embodying the features and advantages of this case will be described in detail in the following description. It should be understood that this case can have various variations in different forms, all of which do not depart from the scope of this case, and the descriptions and illustrations therein are essentially for illustrative purposes and not intended to limit this case.
[0016] As shown in Figure 1, the encoder calibration and compensation system 1 of this invention includes a motor 2, an encoder 3, and a driver 4. The motor 2 includes a rotor 20. The encoder 3 is electrically connected to the motor 2 and is configured to detect the operation of the motor 2. In some embodiments, the encoder 3 detects the rotational position of the motor 2. The driver 4 includes a control unit 41, a signal processing unit 42, and a communication unit 43. The driver 4 is electrically connected to the motor 2 and the encoder 3 and is configured to drive and control the motor 2 and control the encoder 3. In some embodiments, the motor 2 is a three-phase motor or a six-phase motor. In some embodiments, the rotor 20 can be considered as a magnet with N and S poles. The signal processing unit 42 and the communication unit 43 are electrically connected between the encoder 3 and the control unit 41, so the control unit 41 can operate and control the encoder 3 through the signal processing unit 42 and the communication unit 43.
[0017] In the calibration and compensation process of the encoder 3 in this case, firstly, the control unit 41 of the driver 4 continuously provides a d-axis current command to the motor 2 to drive the motor 2 to rotate, wherein the direction of the d-axis current command is defined as the d-axis direction. Next, the control unit 41 sequentially provides gradually increasing positive and negative frequencies to the motor 2, causing the rotor 20 of the motor 2 to rotate forward and reverse respectively, and then obtains the actual offset angle of the encoder 3 by measuring the offset angle during forward and reverse rotation respectively. The case where the control unit 41 provides a gradually increasing positive frequency to the motor 2 to make the rotor 20 of the motor 2 rotate forward is illustrated in Figure 2A, and the case where the control unit 41 provides a gradually increasing negative frequency to the motor 2 to make the rotor 20 of the motor 2 rotate reverse is illustrated in Figure 2B.
[0018] Please refer to Figure 2A first. The control unit 41 of the driver 4 provides an increasing positive frequency to the motor 2, causing the rotor 20 of the motor 2 to rotate clockwise. In this embodiment, the rotation direction F1 of the rotor 20 when rotating clockwise is counterclockwise. When the motor 2 reaches a steady state, the error between the motor frequency of the motor 2 and the target frequency is less than the error percentage. At this time, the communication unit 43 of the driver 4 obtains the origin position O1 of the encoder 3, and the signal processing unit 42 of the driver 4 obtains the first offset angle θ1 based on the d-axis direction and the origin position O1 of the encoder 3. In some embodiments, when the motor 2 reaches a non-steady state, the error between the motor frequency of the motor 2 and the target frequency is greater than the error percentage. At this time, the control unit 41 outputs a warning signal to the motor 2, causing the motor 2 to stop operating. The error percentage may be, for example, but not limited to, 10%. In some embodiments, the target frequency is the frequency expected when the motor 2 reaches a steady state, and the target frequency is provided by the manufacturer.
[0019] Referring again to Figure 2B, the control unit 41 of the driver 4 provides an increasing negative frequency to the motor 2, causing the rotor 20 of the motor 2 to reverse. In this embodiment, the rotation direction F2 of the rotor 20 when it reverses is clockwise. When the motor 2 reaches a steady state, the error between the motor frequency of the motor 2 and the target frequency is less than the error percentage. At this time, the communication unit 43 of the driver 4 obtains the origin position O2 of the encoder 3, and the signal processing unit 42 of the driver 4 obtains the second offset angle θ2 based on the d-axis direction and the origin position O2 of the encoder 3. In some embodiments, when the motor 2 reaches a non-steady state, the error between the motor frequency of the motor 2 and the target frequency is greater than the error percentage. At this time, the control unit 41 outputs a warning signal to the motor 2, causing the motor 2 to stop operating. The error percentage may be, for example, but not limited to, 10%.
[0020] After acquiring the first offset angle θ1 and the second offset angle θ2, the signal processing unit 42 of the driver 4 calculates the actual offset angle θ0 based on the first offset angle θ1 and the second offset angle θ2. The actual offset angle θ0 is used to compensate the encoder 3. Since the actual offset angle θ0 in this case is calculated based on the offset angles during forward and reverse rotation, this actual offset angle θ0 can be considered as simultaneously taking into account the effects of forward and reverse friction. In some embodiments, after acquiring the actual offset angle θ0, the control unit 41 of the driver 4 stops providing d-axis current commands to the motor 2. In some embodiments, after acquiring the actual offset angle θ0, the signal processing unit 42 converts the actual offset angle θ0 into a mechanical angle, and the communication unit 43 of the driver 4 outputs this mechanical angle to the encoder 3 to complete the compensation of the encoder 3.
[0021] In the encoder calibration and compensation system 1 of this invention, the actual offset angle of the encoder 3 is calculated using the offset angles obtained by the motor 2 in forward and reverse rotation. The encoder 3 calibration and compensation technology of this invention does not require external DC power for calibration, thus eliminating the need to disassemble circuit wiring and facilitating its integration into automated processes. Furthermore, since the actual offset angle of the encoder 3 calibration and compensation technology of this invention is calculated using the offset angles of the motor 2 in forward and reverse rotation, it is unaffected by cogging torque, thereby improving the accuracy of the calibration results. Moreover, since repeated adjustments to the compensation angle are not required, calibration efficiency is improved. Furthermore, since the encoder 3 calibration and compensation method of this invention does not require additional power supply or platform equipment, this calibration and compensation method can perform encoder 3 calibration and compensation without disassembling the motor 2, eliminating the need to send the motor 2 back to the factory for recalibration and compensation, thus improving user convenience.
[0022] The following example illustrates how the signal processing unit 42 of the driver 4 in this case calculates the actual offset angle θ0 of the encoder 3 based on the first offset angle θ1 and the second offset angle θ2.
[0023] First, please refer to Figure 2A again. The rotational position of rotor 20 when rotating forward is R1. At this time, the origin position of encoder 3 is O1. If the actual offset angle θ0 leads the origin position O1, the first offset angle θ1 is the difference between the actual offset angle θ0 and the lag angle θa, where the lag angle θa is the angle difference between the rotational position R1 of rotor 20 when rotating forward and the d-axis direction. The lag angle θa is affected by the forward friction force generated by rotor 20 when rotating forward. The actual offset angle θ0 is the angle difference between the rotational position R1 of rotor 20 when rotating forward and the origin position O1 of encoder 3. Therefore, the first offset angle θ1 can be expressed by equation (1). θ1 = θ0-θa (1)
[0024] Next, please refer to Figure 2B. The rotational position of rotor 20 in reverse is R2. At this time, the origin position of encoder 3 is O2. The second offset angle θ2 is the sum of the actual offset angle θ0 and the lag angle θb. The lag angle θb is the angle difference between the rotational position R2 of rotor 20 in reverse and the d-axis direction. The lag angle θb is affected by the reverse friction force generated by rotor 20 in reverse. The actual offset angle θ0 is the angle difference between the rotational position R2 of rotor 20 in reverse and the origin position O2 of encoder 3. The actual offset angle θ0 of rotor 20 is the same in both forward and reverse rotation. Therefore, the second offset angle θ2 can be expressed by equation (2). θ2 = θ0 + θb (2)
[0025] Since the forward and reverse friction forces of rotor 20 are the same in magnitude, the lag angles θa and θb are the same. Therefore, equations (1) and (2) above can be derived into equations (3) and (4), thereby obtaining the actual offset angle θ0. Specifically, the actual offset angle θ0 is the average of the first offset angle θ1 and the second offset angle θ2. θ1+θ2 = θ0+θ0 (3) θ0 = (θ1+θ2) / 2 (4)
[0026] The following uses actual angle calculation as an example to illustrate how the signal processing unit 42 of the driver 4 obtains the first offset angle θ1 and the second offset angle θ2 based on the d-axis direction and the origin position of the encoder 3. Please refer to Figures 1 and 3 simultaneously. In this embodiment, the origin position of the encoder 3 has an encoder electrical angle α, and the d-axis current command has a d-axis current electrical angle β. When the motor frequency of the motor 2 is greater than 0, it means that the rotor 20 of the motor 2 is rotating forward, and the time interval during which the rotor 20 rotates forward is the time interval T1. Therefore, when the rotor 20 of the motor 2 is rotating forward (motor frequency greater than 0) and the error between the motor frequency and the target frequency is less than the error percentage, it means that the rotor 20 of the motor 2 is rotating forward and has reached a steady state. When the rotor 20 is rotating forward (i.e., the time interval T1) and has reached a steady state, the signal processing unit 42 obtains the offset angle θ by calculating the encoder electrical angle α and the d-axis current electrical angle β obtained from the encoder 3 through the communication unit 43. At this time, the amplitude of the offset angle θ is the first offset angle θ1. In some embodiments, during time period T1, the signal processing unit 42 uses the difference between the encoder electrical angle α and the d-axis current electrical angle β as the offset angle θ, and the amplitude of the offset angle θ is the first offset angle θ1.
[0027] Conversely, when the motor frequency of motor 2 is less than 0, it means that the rotor 20 of motor 2 is in reverse, and the time period during which the rotor 20 is in reverse is time period T2. Therefore, when the rotor 20 of motor 2 is in reverse (motor frequency less than 0) and the error between the motor frequency and the target frequency is less than the error percentage, it means that the rotor 20 of motor 2 is in reverse and has reached a steady state. When the rotor 20 is in reverse (i.e., time period T2) and has reached a steady state, the signal processing unit 42 obtains the encoder electrical angle α and the d-axis current electrical angle β from the encoder 3 through the communication unit 43, and calculates and obtains the offset angle θ. At this time, the amplitude of the offset angle θ is the second offset angle θ2. In some embodiments, during time period T2, the signal processing unit 42 uses the difference between the encoder electrical angle α and the d-axis current electrical angle β as the offset angle θ, and the amplitude of the offset angle θ is the second offset angle θ2.
[0028] After acquiring the first offset angle θ1 and the second offset angle θ2, the signal processing unit 42 of the driver 4 calculates the actual offset angle θ0 used to compensate the encoder 3 based on the first offset angle θ1 and the second offset angle θ2. In some embodiments, the control unit 41 uses the average value of the first offset angle θ1 and the second offset angle θ2 as the actual offset angle θ0.
[0029] The following uses the encoder electrical angle α and the d-axis current electrical angle β to illustrate the differences between encoder 3 before and after calibration and compensation. Please refer to Figures 1, 4A, 4B, 5A, and 5B. In Figures 4A and 5A, due to the high waveform density of encoder electrical angle α and d-axis current electrical angle β, to maintain the simplicity of the diagram, Figures 4A and 5A do not distinguish encoder electrical angle α and d-axis current electrical angle β by line type. The details of encoder electrical angle α and d-axis current electrical angle β are illustrated with different line types in Figures 4B and 5B. As can be seen from Figure 4B, before the calibration and compensation of encoder 3, there is an offset angle between encoder electrical angle α and d-axis current electrical angle β, that is, encoder electrical angle α and d-axis current electrical angle β do not overlap. As shown in Figure 5B, after the encoder 3 is corrected and compensated, the offset angle between the encoder electrical angle α and the d-axis current electrical angle β is approximately 0, that is, the encoder electrical angle α and the d-axis current electrical angle β overlap, indicating that the encoder 3 has been corrected and compensated.
[0030] After the encoder 3 completes the calibration and compensation, the motor 2 is placed on the friction force measuring platform to measure the friction force of 0Nm. As shown in Figure 6, the rotor 20 rotates forward when the speed is greater than 0 and rotates in reverse when the speed is less than 0. When the rotor 20 rotates at the same speed in both forward and reverse directions, the difference between the corresponding forward and reverse friction forces is less than a preset error value. Therefore, it can be determined that the friction forces of the motor 2 in both forward and reverse directions are symmetrical. Thus, it can be further confirmed that the calibration and compensation of the encoder 3 has been completed.
[0031] As shown in Figures 1, 2A, 2B and 7, the encoder calibration and compensation method of this invention includes steps S1, S2, S3, S4, S5, S6, S7 and S8. In step S1, a motor 2, an encoder 3 and a driver 4 are provided that are electrically connected to each other. The motor 2 includes a rotor 20, and the encoder 3 is configured to detect the operation of the motor 2. The driver 4 includes a control unit 41, a signal processing unit 42 and a communication unit 43, and the driver 4 is configured to drive and control the motor 2 and control the encoder 3. The signal processing unit 42 and the communication unit 43 are electrically connected between the encoder 3 and the control unit 41, so the control unit 41 can operate and control the encoder 3 through the signal processing unit 42 and the communication unit 43.
[0032] In step S2, the control unit 41 of the driver 4 provides a d-axis current command to the motor 2 to drive the motor 2 to rotate. This d-axis current command is preferably a fixed value. In step S3, the control unit 41 of the driver 4 provides an increasing positive frequency to the motor 2 to make the rotor 20 rotate forward and gradually accelerate. In step S4, when the motor 2 reaches a steady state, the communication unit 43 of the driver obtains the origin position of the encoder 3, and the signal processing unit 42 of the driver 4 obtains the first offset angle θ1 based on the d-axis direction and the origin position O1 of the encoder 3. In step S5, the control unit 41 of the driver 4 provides an increasing negative frequency to the motor 2 to make the rotor 20 rotate in reverse. In step S6, when the motor 2 reaches a steady state, the communication unit 43 of the driver 4 obtains the origin position of the encoder 3, and the signal processing unit 42 of the driver obtains the second offset angle θ2 based on the d-axis direction and the origin position O2 of the encoder 3. In step S7, the signal processing unit 42 of the driver 4 calculates the actual offset angle θ0 based on the first offset angle θ1 and the second offset angle θ2. In step S8, the encoder 3 is compensated based on the actual offset angle θ0, and the actual offset angle θ0 is provided to the control unit 41 using the communication unit 43 of the driver 4.
[0033] In some embodiments, step S2 further includes: when the control unit 41 provides a d-axis current command to the motor 2, the control unit 41 drives the motor 2 to rotate in an open-loop manner.
[0034] In some embodiments, step S4 further includes: when the motor 2 operates to an unsteady state, the control unit 41 outputs a warning signal to the motor 2 to stop the motor 2 from operating. When the motor 2 operates to an unsteady state, the error between the motor frequency of the motor 2 and the target frequency is greater than the error percentage.
[0035] In some embodiments, step S6 further includes: when the motor 2 operates to an unsteady state, the control unit 41 outputs a warning signal to the motor 2 to stop the motor 2 from operating. When the motor 2 operates to an unsteady state, the error between the motor frequency of the motor 2 and the target frequency is greater than the error percentage.
[0036] In some embodiments, the encoder calibration and compensation method further includes the step of: after obtaining the actual offset angle, the control unit 41 of the driver 4 stops providing d-axis current commands to the motor 2.
[0037] In summary, this invention provides an encoder calibration and compensation system and method, which calculates the actual offset angle of the encoder using the offset angles obtained by the motor in forward and reverse rotation. The encoder calibration and compensation technology of this invention does not require external DC power for calibration, thus eliminating the need to disassemble circuit wiring and facilitating its integration into automated processes. Furthermore, since the actual offset angle of the encoder calibration and compensation technology of this invention is calculated using the offset angles of the motor in forward and reverse rotation, it is unaffected by cogging torque, thereby improving the accuracy of the calibration results. Moreover, since repeated adjustments to the compensation angle are not required, calibration efficiency is improved. Furthermore, since the encoder calibration and compensation method of this invention does not require additional power supply or platform equipment, this calibration and compensation method can perform encoder calibration and compensation without disassembling the motor, eliminating the need to send the motor back to the factory for recalibration and compensation, thus improving user convenience.
[0038] It should be noted that the above are merely preferred embodiments for illustrative purposes. This application is not limited to the described embodiments, and the scope of this application is determined by the claims of the appended patent application. Furthermore, this application may be modified in various ways by those skilled in the art, but all such modifications shall not depart from the protection sought by the claims of the appended patent application. [Simplified Explanation of the Diagram]
[0039] Figure 1 is a schematic diagram of the system architecture of the encoder correction and compensation system 1 of the preferred embodiment of this case.
[0040] Figures 2A and 2B are schematic diagrams showing the states when the motor in Figure 1 is rotating in the forward and reverse directions, respectively.
[0041] Figure 3 is a waveform diagram of the offset angle θ corresponding to the motor frequency when the motor in Figure 1 is running.
[0042] Figure 4A is a waveform diagram of the motor frequency combined with the encoder electrical angle α and the d-axis current electrical angle β before encoder calibration and compensation in this case.
[0043] Figure 4B is an enlarged view of box A in Figure 4A.
[0044] Figure 5A is a waveform diagram of the motor frequency combined with the encoder electrical angle α and the d-axis current electrical angle β after encoder calibration and compensation in this case.
[0045] Figure 5B is an enlarged view of box B in Figure 5A.
[0046] Figure 6 is a schematic diagram of the friction force in the forward and reverse rotations when the motor is measured with 0 Nm friction force after encoder calibration and compensation.
[0047] Figure 7 is a flowchart of the encoder calibration and compensation method of the preferred embodiment of this case.
Claims
1. A method for calibrating and compensating an encoder, comprising the steps of: (a) providing a motor, an encoder, and a driver electrically connected to each other, wherein, The driver is configured to drive the motor and is electrically connected to the encoder, the motor including a rotor, and the encoder is configured to detect the operation of the motor; (b) continuously provide a d-axis current command to the motor using the driver to drive the motor to rotate; (c) provide an increasing positive frequency to the motor using the driver to make the rotor rotate forward; (d) when the motor operates to a steady state, obtain an origin position of the encoder using the driver, and obtain a first offset angle based on a d-axis direction and the origin position of the encoder; (e) provide an increasing negative frequency to the motor using the driver to make the rotor rotate in reverse; (f) when the motor operates to the steady state, obtain the origin position of the encoder using the driver, and obtain a second offset angle based on the d-axis direction and the origin position of the encoder; (g) calculate an actual offset angle using the driver based on the first offset angle and the second offset angle; and (h) compensate the encoder using the driver based on the actual offset angle.
2. The encoder calibration and compensation method as described in Request 1, wherein, The first offset angle is the difference between the actual offset angle and a lag angle, and the second offset angle is the sum of the actual offset angle and the lag angle. The lag angle is the angle difference between a rotational position of the rotor in forward and reverse rotation and the d-axis direction. The actual offset angle is the angle difference between the rotational position of the rotor in forward and reverse rotation and the origin position of the encoder.
3. The encoder calibration and compensation method as described in Request 1, wherein, In steps (d) and (f), when the motor operates to the steady state, the error between one of the motor frequencies and a target frequency is less than a percentage error.
4. The encoder calibration and compensation method as described in request item 3, wherein, The steps (d) and (f) further include: when the motor operates to a non-steady state, the driver outputs a warning signal to the motor to stop the motor from operating, wherein when the motor operates to the non-steady state, the error between the motor frequency and the target frequency is greater than the error percentage.
5. The encoder calibration and compensation method as described in request item 3, wherein, The error percentage is 10%.
6. The encoder calibration and compensation method as described in Request 1, wherein, The motor can be a three-phase motor or a six-phase motor.
7. The encoder calibration and compensation method of request item 1 further includes the step of: after obtaining the actual offset angle, the driver stops providing the d-axis current command to the motor.
8. The encoder calibration and compensation method as described in Request 1, wherein, In step (b), the driver drives the motor to rotate in an open-loop manner.
9. An encoder calibration and compensation system, comprising: a motor including a rotor; an encoder electrically connected to the motor and configured to detect the operation of the motor; and a driver electrically connected to the motor and the encoder, configured to drive and control the motor, and control the encoder, wherein... The driver continuously provides a d-axis current command to the motor to drive the motor to rotate. The driver provides an increasing positive frequency to the motor to cause the motor rotor to rotate forward. When the motor reaches a steady state, the driver obtains the origin position of the encoder and obtains a first offset angle based on the d-axis direction and the encoder's origin position. The driver also provides an increasing negative frequency to the motor to cause the motor rotor to rotate in reverse. When the motor reaches the steady state, the driver obtains the origin position of the encoder and obtains a second offset angle based on the d-axis direction and the encoder's origin position. The driver calculates an actual offset angle based on the first and second offset angles, which is used to compensate the encoder.
10. The encoder calibration and compensation system as described in claim 9, wherein, The first offset angle is the difference between the actual offset angle and a lag angle, and the second offset angle is the sum of the actual offset angle and the lag angle. The lag angle is the angle difference between a rotational position of the rotor in forward and reverse rotation and the d-axis direction. The actual offset angle is the angle difference between the rotational position of the rotor in forward and reverse rotation and the origin position of the encoder.
11. The encoder calibration and compensation system as described in claim 9, wherein, When the motor operates to the steady state, the error between one of the motor frequencies and a target frequency is less than a certain percentage.
12. The encoder calibration and compensation system as described in claim 11, wherein, When the motor operates to a non-steady state, the driver outputs a warning signal to the motor to stop it from operating. When the motor operates to the non-steady state, the error between the motor frequency and the target frequency is greater than the error percentage.
13. The encoder calibration and compensation system as described in claim 11, wherein, The error percentage is 10%.
14. The encoder calibration and compensation system as described in claim 9, wherein, The motor can be a three-phase motor or a six-phase motor.
15. The encoder calibration and compensation system as described in claim 9, wherein, After obtaining the actual offset angle, the driver stops providing the d-axis current command to the motor.
16. The encoder calibration and compensation system as described in claim 9, wherein, After the driver provides the d-axis current command to the motor, it drives the motor to rotate in an open-loop manner.
