Servo motor and encoder correction method
Patent Information
- Application Number
- CN202210067397.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-12-28
- Filing Date
- 2022-01-20
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-01-20
AI Technical Summary
然而,传统的方法会遇到校正无法收敛及校正完相位后已经校正过的增益和/或偏移量又产生变动的问题
Smart Images

Figure CN116358613B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a servo motor and its encoder calibration method. Background Technology
[0002] Servo motors are frequently used in precision control systems. One factor determining the accuracy of servo motor control is the timeliness and correctness of encoder calibration. Encoder calibration typically targets three parameters: gain, offset, and phase. Traditional encoder calibration usually calibrates the gain and offset before correcting the phase. However, traditional methods encounter problems such as calibration failure to converge and changes in the already corrected gain and / or offset after phase calibration. Failure to converge results in prolonged calibration time and insufficient timeliness. Changes in the already corrected gain and / or offset after phase calibration lead to inaccurate calibration results, affecting the control accuracy of the servo motor. Therefore, it is necessary to improve the encoder calibration method for servo motors. Summary of the Invention
[0003] This invention discloses an encoder calibration method for a servo motor. The encoder calibration method includes: calculating a gain error, an offset error, and a phase error based on a first signal and a second signal output by an encoder using an error correction block; calculating at least one gain correction parameter, at least one offset correction parameter, and at least one phase correction parameter based on the gain error, the offset error, and the phase error using the error correction block; and sequentially correcting the gain, offset, and phase of the first signal and the second signal using the encoder based on the at least one gain correction parameter, the at least one offset correction parameter, and the at least one phase correction parameter, wherein at least one gain correction and one offset correction are performed after the phase correction is completed.
[0004] Another embodiment of the present invention discloses a servo motor. The servo motor includes a motor, an encoder, and a drive circuit. The motor includes a detection means for detecting rotation information of the motor. The encoder is coupled to the motor and is used to generate a first signal and a second signal according to the rotation information. The drive circuit includes an error correction block coupled to the encoder and is configured to calculate a gain error, an offset error, and a phase error according to the first signal and the second signal, and to calculate at least one gain correction parameter, at least one offset correction parameter, and at least one phase correction parameter according to the gain error, the offset error, and the phase error. The encoder sequentially corrects the gain, offset, and phase of the first signal and the second signal according to the at least one gain correction parameter, the at least one offset correction parameter, and the at least one phase correction parameter, wherein at least one gain correction and one offset correction are performed after the phase correction is completed.
[0005] To provide a better understanding of the above and other aspects of the present invention, specific embodiments are described below in conjunction with the accompanying drawings: Attached Figure Description
[0006] Figure 1 A block diagram of a servo motor according to an embodiment of the present invention is shown.
[0007] Figure 2 A flowchart illustrating the calibration process of a servo motor according to an embodiment of the present invention is shown.
[0008] Figure 3 A schematic diagram illustrating an error correction block and an encoder according to an embodiment of the present invention is shown.
[0009] Figures 4-7 A schematic diagram of a correction parameter generator and encoder according to an embodiment of the present invention is shown.
[0010] [Symbol Explanation]
[0011] 10: Servo Motor
[0012] 102: Motor
[0013] 104, 304, 410, 510, 610: Encoders
[0014] 106, 300: Drive circuit
[0015] 108, 310: Error correction blocks
[0016] 110: Drive Control Block
[0017] S200~S205: Steps
[0018] 310: Error Calculator
[0019] 312: Noise-resistant error estimator
[0020] 314: Adaptive Error Adjuster
[0021] 320, 400, 500, 600, 700: Calibration parameter generator
[0022] 412, 512, 616, 716: Phase Correction
[0023] 414, 516, 612, 618, 714, 720: Gain Correction
[0024] 416, 514, 614, 620, 712, 718: Offset Correction
[0025] S1: First signal
[0026] S2: Second signal Detailed Implementation
[0027] Please refer to Figure 1 , Figure 1 A block diagram of a servo motor according to an embodiment of the present invention is shown. The servo motor 10 includes a motor 102, an encoder 104, and a drive circuit 106. The encoder 104 is coupled to the motor 102. The drive circuit 106 is coupled to the motor 102 and the encoder 104.
[0028] The motor 102 may include detection means to acquire rotation information of the motor 102 and transmit the rotation information to the encoder 104 in the form of a signal. The rotation information may include, but is not limited to, the rotational speed and rotor address of the motor 102. Generally, the signal containing the rotation information is a sine wave and a cosine wave. In the rotation information of the motor 102 under normal operation, the gain of the sine wave will be equal to the gain of the cosine wave, the offset between the sine wave and the cosine wave is zero, and the phase difference is ninety degrees.
[0029] After receiving the rotation information from the motor 102, the encoder 104 generates a first signal corresponding to a sine wave and a second signal corresponding to a cosine wave, and transmits both signals to the drive circuit 106. The first signal contains information about the sine wave in the rotation information, and the second signal contains information about the cosine wave in the rotation information. Theoretically, the first and second signals should maintain a relationship in gain, offset, and phase between the sine and cosine waves. However, in reality, there will be errors in gain, offset, and / or phase between the first and second signals generated by the encoder 104.
[0030] The drive circuit 106 may include an error correction block 108 and a drive control block 110. The error correction block 108 is used to calculate a gain error, an offset error, and a phase error based on the first signal and the second signal, and to generate and transmit at least one gain correction parameter, at least one offset correction parameter, and at least one phase correction parameter to the encoder 104 based on the gain error, offset error, and phase error. Specifically, if the drive circuit 106 directly drives and controls the speed and / or addressing of the motor 102 based on the first signal and the second signal without calibrating the encoder 104, the control will be inaccurate.
[0031] The encoder 104 will sequentially correct the gain, offset and phase of the first signal and the second signal according to the gain correction parameters, offset correction parameters and phase correction parameters transmitted from the drive circuit 106, so as to generate the corrected first signal and the second signal.
[0032] The drive control block 110 of the drive circuit 106 generates a drive signal based on the corrected first signal and the corrected second signal to control the speed and / or address of the motor 102.
[0033] Please refer to Figure 2 , Figure 2 A flowchart illustrating the operation of a servo motor according to an embodiment of the present invention is shown.
[0034] In the S200, the servo motor is powered on and begins to rotate.
[0035] In S201, the motor detection method acquires the motor's rotation information and transmits it to the encoder.
[0036] In S202, the encoder generates a first signal and a second signal to the drive circuit based on the rotation information transmitted by the motor.
[0037] In S203, the error correction block of the drive circuit calculates the gain error, offset error and phase error based on the first signal and the second signal, and generates and transmits the gain correction parameter, offset correction parameter and phase correction parameter to the encoder based on the gain error, offset error and phase error.
[0038] In S204, in response to the gain correction parameter, offset correction parameter and phase correction parameter, the encoder sequentially adjusts the gain, offset and phase of the first signal and the second signal according to the gain correction parameter, offset correction parameter and phase correction parameter, and transmits the corrected first signal and the corrected second signal to the drive circuit.
[0039] In S205, the drive control block of the drive circuit generates and transmits a drive signal to the motor based on the corrected first signal and the corrected second signal. After completing S205, the servo motor completes the startup process.
[0040] Please refer to Figure 3 , Figure 3 A schematic diagram illustrating an encoder and an error correction block according to an embodiment of the present invention is shown. The error correction block 300 may include an error correction block 310 and a correction parameter generator 320. In one embodiment, the error correction block 310 may include a noise immunity error estimator 312 and an adaptive error adjuster 314.
[0041] A noise immunity error estimator 312 may be coupled to an encoder 304 to receive a first signal S1 and a second signal S2. The noise immunity error estimator 312 can be used to remove noise from the first signal S1 and the second signal S2, and to calculate the gain error, offset error, and phase error between the first signal S1 and the second signal S2 based on the first signal S1 and the second signal S2. In an alternative embodiment, the noise immunity error estimator may be coupled to the encoder via a data extractor (not shown). The data extractor receives the first signal S1 and the second signal S2, and extracts the gain, offset, and phase from the first signal S1 and the second signal S2. The noise immunity error estimator 312 calculates the gain error, offset error, and phase error based on the gain, offset, and phase of the first signal S1 and the second signal S2 provided by the data extractor.
[0042] An adaptive error adjuster 314 is coupled to an anti-noise error estimator 312. The adaptive error adjuster 314 can adaptively adjust the output of the gain error, offset error, and phase error obtained from the anti-noise error estimator 312 based on environmental parameters. Environmental parameters refer to parameters in the environment in which the motor operates; different environmental parameters may be used in different embodiments. For example, in some embodiments, environmental parameters may be temperature and humidity.
[0043] The correction parameter generator 320 is coupled to the error correction block 310. The correction parameter generator 320 is used to generate gain correction parameters, offset correction parameters, and phase correction parameters based on the gain error, offset error, and phase error. These gain correction parameters, offset correction parameters, and phase correction parameters are transmitted to the encoder 304.
[0044] Please refer to Figure 4 , Figure 4A schematic diagram illustrating a correction parameter generator and encoder correction according to an embodiment of the present invention is shown. In this embodiment, the error calculator 400 generates and transmits a gain correction parameter, an offset correction parameter, and a phase correction parameter to the encoder 410 based on the gain error, offset error, and phase error. The encoder 410 sequentially corrects the phase 412, gain 414, and offset 416 of the first signal S1 and the second signal S2 in response to the gain correction parameter, offset correction parameter, and phase correction parameter.
[0045] It is important to note that the order in which gain, offset, and phase corrections are performed is crucial. Generally, when correcting phase, if at least one gain and / or at least one offset correction has already been performed, the adjusted gain and / or offset will change. Conversely, when correcting gain and offset, if phase correction has already been performed, the adjusted phase will not change. This means that phase correction must be performed before gain and offset correction. Otherwise, phase correction will cause the already corrected gain and / or offset to deviate from the corrected values. Therefore, after phase correction, at least one gain correction and one offset correction are required.
[0046] Please refer to Figure 5 , Figure 5 A schematic diagram illustrating a calibration parameter generator and encoder calibration according to another embodiment of the present invention is shown. Figure 4 The difference in the embodiment is that the encoder 510 performs corrections according to the gain correction parameters, offset correction parameters, and phase correction parameters transmitted by the correction parameter generator 500 in the following order: phase 512, offset 514, and gain 516. That is, the correction order of offset and gain can be interchanged.
[0047] Please refer to Figure 6 , Figure 6A schematic diagram illustrating a calibration parameter generator and encoder calibration according to another embodiment of the present invention is shown. In this embodiment, the calibration parameter generator 600 generates a first-level gain calibration parameter, a first-level offset calibration parameter, a phase calibration parameter, a second-level gain calibration parameter, and a second-level offset calibration parameter based on gain error, offset error, and phase error. The encoder 610 sequentially performs first-level gain calibration 612 based on the first-level gain calibration parameter, first-level offset calibration 614 based on the first-level offset calibration parameter, phase calibration 616 based on the phase calibration parameter, second-level gain calibration 618 based on the second-level gain calibration parameter, and second-level offset calibration 620 based on the second-level offset calibration parameter. That is, calibration for at least one of gain, offset, and phase can be divided into multiple levels, but it must meet the requirement that "after phase calibration, at least one gain calibration and one offset calibration must be performed." It should be noted that in other embodiments, the number of levels can be two or more. Furthermore, as mentioned above, the order of gain calibration and offset calibration can be reversed. Figure 7 As shown, the first-level offset 712 can be performed first, followed by the first-level gain correction 714. Similarly, the second-level offset 718 can be performed first, followed by the second-level gain correction 720.
[0048] By observing the Lissajous curve synthesized from the sine and cosine waves in the rotation information of the motor after correction using the encoder correction method of the present invention, it can be found that the Lissajous curve synthesized from the sine and cosine waves in the rotation information presents a stable circle with its center at the origin, rather than an ellipse with its center not aligned with the origin. This indicates that the correction effect can achieve stable convergence.
[0049] The servo motor and encoder calibration method proposed in this invention performs at least one gain calibration and one offset calibration after phase calibration to ensure stable convergence of the calibration results, thereby shortening the calibration time and improving the accuracy of the calibration.
[0050] In summary, although the present invention has been disclosed above with reference to embodiments, it is not intended to limit the invention. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. An encoder calibration method for a servo motor, comprising: The gain error, offset error, and phase error are calculated based on the first and second signals output by the encoder using the error correction block. The error correction block calculates at least one gain correction parameter, at least one offset correction parameter, and at least one phase correction parameter based on the gain error, the offset error, and the phase error; and The encoder sequentially corrects the gain, offset, and phase of the first signal and the second signal based on at least one gain correction parameter, at least one offset correction parameter, and at least one phase correction parameter, wherein at least one gain correction and one offset correction are performed after the phase correction is completed. The at least one gain correction parameter includes a first-level gain correction parameter and a second-level gain correction parameter, and the at least one offset correction parameter includes a first-level offset correction parameter and a second-level offset correction parameter. The encoder sequentially performs first-level gain correction based on the first-level gain correction parameter, first-level offset correction based on the first-level offset correction parameter, phase correction based on the phase correction parameter, second-level gain correction based on the second-level gain correction parameter, and second-level offset correction based on the second-level offset correction parameter; or, the encoder sequentially performs first-level offset correction based on the first-level offset correction parameter, first-level gain correction based on the first-level gain correction parameter, phase correction based on the phase correction parameter, second-level offset correction based on the second-level offset correction parameter, and second-level gain correction based on the second-level gain correction parameter.
2. The encoder calibration method as claimed in claim 1, wherein the encoder sequentially calibrates the gain, offset, and phase of the first signal and the second signal according to the at least one gain calibration parameter, the at least one offset calibration parameter, and the at least one phase calibration parameter, wherein the gain and offset calibrations can be interchanged in order after at least one gain calibration and one offset calibration are performed after the phase calibration is completed.
3. The encoder calibration method as described in claim 1, wherein the encoder sequentially performs first-level gain calibration and first-level offset calibration according to the first-level gain calibration parameter and the first-level offset calibration parameter; Phase correction is performed based on at least one phase correction parameter; And perform second-level gain correction and second-level offset correction based on the second-level gain correction parameter and the second-level offset correction parameter.
4. The encoder calibration method as described in claim 1, further comprising: The drive control block drives and controls the motor according to the corrected first signal and the corrected second signal, wherein the Lissajous curve synthesized from the sine and cosine waves in the rotation information of the motor is a circle whose center coincides with the origin.
5. A servo motor, comprising: A motor, including detection methods for detecting the rotation information of the motor; An encoder, coupled to the motor, is used to generate a first signal and a second signal based on the rotation information; as well as A drive circuit, including an error correction block coupled to the encoder, is configured to calculate a gain error, an offset error, and a phase error based on the first signal and the second signal, and to calculate at least one gain correction parameter, at least one offset correction parameter, and at least one phase correction parameter based on the gain error, the offset error, and the phase error. The encoder sequentially corrects the gain, offset, and phase of the first signal and the second signal based on at least one gain correction parameter, at least one offset correction parameter, and at least one phase correction parameter, wherein at least one gain correction and one offset correction are performed after the phase correction is completed. The at least one gain correction parameter includes a first-level gain correction parameter and a second-level gain correction parameter, and the at least one offset correction parameter includes a first-level offset correction parameter and a second-level offset correction parameter. The encoder sequentially performs first-level gain correction based on the first-level gain correction parameter, first-level offset correction based on the first-level offset correction parameter, phase correction based on the phase correction parameter, second-level gain correction based on the second-level gain correction parameter, and second-level offset correction based on the second-level offset correction parameter; or, the encoder sequentially performs first-level offset correction based on the first-level offset correction parameter, first-level gain correction based on the first-level gain correction parameter, phase correction based on the phase correction parameter, second-level offset correction based on the second-level offset correction parameter, and second-level gain correction based on the second-level gain correction parameter.
6. The servo motor as described in claim 5, wherein the gain and offset corrections can be reversed in sequence.
7. The servo motor as claimed in claim 5, wherein the encoder sequentially performs first-level gain correction and first-level offset correction according to the first-level gain correction parameter and the first-level offset correction parameter, performs phase correction according to the at least one phase correction parameter, and performs second-level gain correction and second-level offset correction according to the second-level gain correction parameter and the second-level offset correction parameter.
8. The servo motor as described in claim 5, wherein the drive circuit further includes a drive control block, the drive control block drives and controls the motor according to the corrected first signal and the corrected second signal, and the Lissajous curve synthesized from the sine wave and cosine wave in the rotation information after the motor is controlled is a circle whose center coincides with the origin.
Citation Information
Patent Citations
Phase correction circuit of encoder signal
CN101213423A
Offset correction device and position measuring device
CN112146687A