Gravity compensation method and device, servo drive and servo drive system

By determining and applying gravity compensation value in the servo drive, the problem of strong parameter dependence of gravity compensation schemes in the prior art is solved, and real-time and stable gravity compensation effect is achieved, which is suitable for different equipment and shaft regulators.

CN114094910BActive Publication Date: 2024-11-26SUZHOU GAOCHUANG MOTION CONTROL TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111348989.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-15
Publication Date
2024-11-26
Estimated Expiration
2041-11-15

AI Technical Summary

Technical Problem

The existing gravity compensation scheme has strong parameter dependence, resulting in lag in compensation speed, and the consistency of gravity compensation effect is poor when the parameters of different equipment and shaft regulators are different.

Method used

When the servo drive is enabled, the servo motor is controlled according to the gravity compensation value, current feedback value and current command to achieve real-time gravity compensation without relying on the regulator parameters. The compensation speed is fast and the effect is stable.

Benefits of technology

Real-time gravity compensation without dependent on regulator parameters is achieved, with fast compensation speed, stable effect, strong applicability, and both control performance and compensation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114094910B_ABST
    Figure CN114094910B_ABST
Patent Text Reader

Abstract

The present invention discloses a gravity compensation method and device, a servo driver and a servo drive system, wherein the method comprises: determining a gravity compensation value when the servo driver is enabled; applying the gravity compensation value to a current regulator in the servo driver so that the current regulator controls the servo motor according to the gravity compensation value, a current feedback value and a current instruction. The gravity compensation method of the present invention can perform gravity compensation in real time, is independent of regulator parameters, has a fast compensation speed, and has a stable compensation effect and is highly versatile.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electromechanical control technology, and in particular to a gravity compensation method, a computer-readable storage medium, a servo driver, a gravity compensation device and a servo drive system. Background Art

[0002] The current gravity compensation solution is to output the compensation value through the regulator. After the motor is enabled, if the load drops, the motor encoder feedback position change, the position regulator outputs the speed command according to the position deviation, and the speed command outputs the torque command through the speed regulator to achieve gravity compensation. This compensation method is highly dependent on parameters. When the parameter gain is low, the gravity compensation speed will lag seriously, causing the load to drop. In addition, due to different equipment performance requirements, when there are differences in the parameters of each axis regulator, the gravity compensation effect will also be different, and the consistency is poor. Summary of the invention

[0003] The present invention aims to solve one of the technical problems in the related art to at least some extent. To this end, the first object of the present invention is to propose a gravity compensation method that can perform gravity compensation in real time, is independent of regulator parameters, has a fast compensation speed, and has a stable compensation effect and strong versatility.

[0004] A second object of the present invention is to provide a computer-readable storage medium.

[0005] A third object of the present invention is to provide a servo drive.

[0006] A fourth objective of the present invention is to provide a gravity compensation device.

[0007] A fifth objective of the present invention is to provide a servo drive system.

[0008] To achieve the above-mentioned purpose, an embodiment of the first aspect of the present invention proposes a gravity compensation method, which is applied to a servo drive. The method includes: when the servo drive is enabled, determining a gravity compensation value; applying the gravity compensation value to a current regulator in the servo drive so that the current regulator controls the servo motor according to the gravity compensation value, current feedback value and current instruction.

[0009] According to the gravity compensation method of the embodiment of the present invention, applied to the servo drive, when the servo drive is enabled, the gravity compensation value is determined, and the gravity compensation value is applied to the current regulator in the servo drive, so that the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current instruction. Therefore, the method can perform gravity compensation in real time, does not rely on the regulator parameters, has a fast compensation speed, and has a stable compensation effect, and has strong versatility.

[0010] In addition, the gravity compensation method according to the above embodiment of the present invention may also have the following additional technical features:

[0011] According to an embodiment of the present invention, the gravity compensation value is preset according to the load corresponding to the servo motor.

[0012] According to one embodiment of the present invention, determining the gravity compensation value includes: determining the position difference between the rotor position feedback value and the position command of the servo motor when the servo motor brake begins to release, and determining the compensation coefficient according to the position difference; determining the gravity compensation value according to the compensation coefficient and a preset gravity compensation value.

[0013] According to one embodiment of the present invention, after the servo motor brake is completely released, the gravity compensation value remains constant.

[0014] According to an embodiment of the present invention, after the servo motor brake is completely released, the method further includes: performing a fading process on the gravity compensation value according to a preset fading slope.

[0015] According to one embodiment of the present invention, before the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current command, the method also includes: processing the position difference between the rotor position feedback value of the servo motor and the position command by a position regulator to obtain a speed command; processing the speed difference between the speed feedback value of the servo motor and the speed command by a speed regulator to obtain a current command.

[0016] According to one embodiment of the present invention, the speed feedback value of the servo motor is determined according to the rotor position feedback value of the servo motor.

[0017] To achieve the above-mentioned purpose, a second aspect of the present invention provides a computer-readable storage medium on which a gravity compensation program is stored. When the gravity compensation program is executed by a processor, the above-mentioned gravity compensation method is implemented.

[0018] The computer-readable storage medium of the embodiment of the present invention can perform gravity compensation in real time by executing the above-mentioned gravity compensation method, is independent of regulator parameters, has a fast compensation speed, and has a stable compensation effect and strong versatility.

[0019] To achieve the above-mentioned purpose, a servo drive proposed in an embodiment of the third aspect of the present invention includes a memory, a processor, and a gravity compensation program stored in the memory and executable on the processor. The processor executes the above-mentioned gravity compensation method by running the gravity compensation program.

[0020] The servo driver of the embodiment of the present invention implements the above-mentioned gravity compensation method by running the above-mentioned gravity compensation program through the processor, can perform gravity compensation in real time, is independent of regulator parameters, has a fast compensation speed, and has a stable compensation effect and is highly versatile.

[0021] To achieve the above-mentioned purpose, a gravity compensation device proposed in an embodiment of the fourth aspect of the present invention is applied to a servo drive, and the device includes: a determination module, used to determine the gravity compensation value when the servo drive is enabled; a compensation module, used to apply the gravity compensation value to the current regulator in the servo drive, so that the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current instruction.

[0022] The gravity compensation device according to the embodiment of the present invention is applied to a servo drive. When the servo drive is enabled, the gravity compensation value is determined by the determination module, and the compensation module applies the gravity compensation value to the current regulator in the servo drive, so that the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current instruction. Thus, the device can perform gravity compensation in real time, does not rely on the regulator parameters, has a fast compensation speed, and has a stable compensation effect, and has strong versatility.

[0023] In addition, the gravity compensation device according to the above embodiment of the present invention may also have the following additional technical features:

[0024] According to an embodiment of the present invention, the gravity compensation value is preset according to the load corresponding to the servo motor.

[0025] According to one embodiment of the present invention, a determination module determines a gravity compensation value, which is specifically used to: determine the position difference between the rotor position feedback value and the position command of the servo motor when the servo motor brake begins to release, and determine the compensation coefficient based on the position difference; determine the gravity compensation value based on the compensation coefficient and a preset gravity compensation value.

[0026] According to one embodiment of the present invention, after the servo motor brake is completely released, the gravity compensation value remains constant.

[0027] According to one embodiment of the present invention, after the servo motor brake is completely released, the device further comprises: a gravity decay module, configured to decay the gravity compensation value according to a preset decay slope.

[0028] According to one embodiment of the present invention, before the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current command, the compensation module is also used to: process the position difference between the rotor position feedback value of the servo motor and the position command through the position regulator to obtain the speed command; process the speed difference between the speed feedback value of the servo motor and the speed command through the speed regulator to obtain the current command.

[0029] According to one embodiment of the present invention, the speed feedback value of the servo motor is determined according to the rotor position feedback value of the servo motor.

[0030] To achieve the above-mentioned purpose, the fifth aspect of the present invention proposes a servo drive system, including: a servo motor; a servo drive, the servo drive including a position regulator, a speed regulator and a current regulator, wherein the position regulator is used to process the position difference between the rotor position feedback value of the servo motor and the position command to obtain the speed command; the speed regulator is used to process the speed difference between the speed feedback value of the servo motor and the speed command to obtain the current command; the current regulator is used to control the servo motor according to the gravity compensation value determined when the servo drive is enabled, as well as the current feedback value and the current command.

[0031] According to the servo drive system of the embodiment of the present invention, the position difference between the rotor position feedback value of the servo motor and the position command is processed by the position regulator to obtain the speed command, and the speed difference between the speed feedback value of the servo motor and the speed command is processed by the speed regulator to obtain the current command, and the current regulator controls the servo motor according to the gravity compensation value determined when the servo driver is enabled, the current feedback value and the current command. Therefore, the system can perform gravity compensation in real time, does not rely on the regulator parameters, has a fast compensation speed, and has a stable compensation effect, and has strong versatility.

[0032] In addition, the servo drive system according to the above embodiment of the present invention may also have the following additional technical features:

[0033] According to an embodiment of the present invention, the gravity compensation value is preset according to the load corresponding to the servo motor.

[0034] According to one embodiment of the present invention, the above-mentioned servo drive system further includes: a gravity compensation determination module, which is used to determine the compensation coefficient according to the position difference when the servo motor brake begins to release, and determine the gravity compensation value according to the compensation coefficient and a preset gravity compensation value.

[0035] According to one embodiment of the present invention, after the servo motor brake is completely released, the gravity compensation value remains constant.

[0036] According to an embodiment of the present invention, the servo drive system further includes: a gravity decay module, which is used to decay the gravity compensation value according to a preset decay slope after the servo motor brake is completely released.

[0037] According to one embodiment of the present invention, the speed feedback value of the servo motor is determined according to the rotor position feedback value of the servo motor.

[0038] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a flow chart of a gravity compensation method according to an embodiment of the present invention;

[0040] Figure 2 It is a schematic diagram of a gravity compensation solution in the related art;

[0041] Figure 3 is a schematic diagram of a gravity compensation method according to an embodiment of the present invention;

[0042] Figure 4 is a schematic diagram of a gravity compensation method according to another embodiment of the present invention;

[0043] Figure 5 is a schematic diagram of a gravity compensation method according to yet another embodiment of the present invention;

[0044] Figure 6 is a block diagram of a servo driver according to an embodiment of the present invention;

[0045] Figure 7 4 is a block diagram of a gravity compensation device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0047] The gravity compensation method, computer-readable storage medium, servo driver, gravity compensation device and servo drive system proposed in the embodiments of the present invention are described below with reference to the accompanying drawings.

[0048] Figure 2This is a gravity compensation solution in the related art, in which the position regulator processes the deviation between the position command and the position feedback and outputs the speed command; the speed regulator processes the deviation between the speed command and the speed feedback and outputs the torque command; the current regulator processes the deviation between the current command and the current feedback and outputs the torque command. This solution uses a regulator to adjust the position error to perform gravity compensation. When the load slides due to gravity, the position error increases. Gravity compensation is achieved through the position-speed-current regulator, which has hysteresis, and the compensation effect depends on the parameters of the regulator. When the control performance and the compensation effect conflict, it is difficult to take both into account.

[0049] In order to solve the above problems, the present invention proposes a gravity compensation method, which can determine the gravity compensation value according to the load conditions when the servo drive is enabled, so that the current regulator can control the servo motor according to the gravity compensation value, the current feedback value and the current instruction, so that gravity compensation can be performed in real time, does not depend on the regulator parameters, has a fast compensation speed, and a stable compensation effect, and has strong versatility.

[0050] Figure 1 4 is a flow chart of a gravity compensation method according to an embodiment of the present invention.

[0051] In one embodiment of the present invention, the gravity compensation method is applied to a servo drive.

[0052] like Figure 1 As shown, the gravity compensation method of the embodiment of the present invention may include the following steps:

[0053] S1, when the servo drive is enabled, determines the gravity compensation value.

[0054] Among them, in one embodiment of the present invention, enabling the servo driver means sending a drive signal to the driver so that the driver can power the motor to drive the load to work, that is, after receiving this drive signal, the current regulator, speed regulator and position regulator enter the working state.

[0055] When the servo drive is enabled, the gravity compensation value can be pre-set according to the corresponding load, that is, different gravity compensation values ​​are determined according to different loads. For example, when the load mass is known, the gravity compensation value can be determined according to the load mass, wherein the gravity compensation value has a one-to-one correspondence with the load mass, or a gravity compensation value can be corresponding to the load mass within a certain range; when the load mass is unknown, the gravity compensation value can be determined according to the position deviation generated when the load slides down.

[0056] S2, applying the gravity compensation value to the current regulator in the servo driver, so that the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current command.

[0057] Specifically, if Figure 3 As shown, after the gravity compensation value is determined in step S1, the gravity compensation value is applied to the current regulator. When the load mass is known, the compensation value is directly applied to the current regulator. The position regulator processes the deviation between the rotor position feedback value and the rotor position command to obtain the speed command. The speed regulator processes the deviation between the obtained speed command and the speed feedback value to obtain the current command. The current regulator outputs the result based on the deviation between the current command and the current feedback value combined with the gravity compensation value, and controls the servo motor according to the result. The speed regulation is fast and has nothing to do with the parameters of other regulators (position regulator, current regulator), that is, the compensation effect does not depend on the parameters of other regulators. Even if there is a conflict between the control performance and the compensation effect, both the control performance and the compensation effect can be taken into account at the same time. Under the premise of ensuring the control performance of the current regulator and the servo motor driver, gravity compensation is effectively realized.

[0058] In order to more accurately control the servo motor, according to one embodiment of the present invention, the gravity compensation value is determined, including: when the servo motor brake begins to release, determining the position difference between the rotor position feedback value of the servo motor and the position command, and determining the compensation coefficient according to the position difference; determining the gravity compensation value according to the compensation coefficient and the preset gravity compensation value. Wherein, the servo motor brake means that when the servo motor is not powered, the brake coil is not powered, and the motor is automatically held to prevent it from falling. Then, the brake begins to release when the brake coil is powered and the motor begins to fall.

[0059] Further, in one embodiment of the present invention, after the servo motor brake is completely released, the gravity compensation value remains constant.

[0060] Specifically, if the load mass is known, the gravity compensation value can be set to act directly on the current regulator; if the load mass is unknown or cannot be estimated, after the servo driver is enabled, the servo motor brake begins to release (the servo motor brake coil is energized and begins to slowly release the motor). When the load slides down due to gravity, position deviation will occur. At this time, the compensation coefficient of the preset gravity compensation value needs to be determined based on the motor's rotor position deviation. For example, Figure 4As shown, when the motor brake starts to release, there will be a rotor position feedback value, wherein the rotor position can be obtained according to the corresponding sensor detection, and the detection value is used as the rotor position feedback value, and the deviation value between the position command and the rotor position feedback is calculated, and then the pre-stored rotor position deviation value-compensation coefficient correspondence table (or the corresponding curve diagram) is called to determine the corresponding compensation coefficient under the current deviation value, and then the compensation coefficient is multiplied by the rotor position deviation value The result is summed with the preset gravity compensation value to determine the gravity compensation value, and finally the gravity compensation value is directly applied to the current regulator. The position regulator processes the deviation between the rotor position feedback value and the rotor position command to obtain the speed command, and the speed regulator processes the deviation between the obtained speed command and the speed feedback value to obtain the current command. The current regulator outputs the result based on the deviation between the current command and the current feedback value combined with the gravity compensation value, and controls the servo motor based on the result, so that it can compensate to the current command more accurately. After the brake is fully released, the gravity compensation value is a constant value, which is suitable for applications where the load direction does not change, for example, the load is the vertical axis of a multi-axis device, a ball screw, a gear rack, etc.

[0061] Among them, during the release of the servo motor brake, since the rotor position of the motor is constantly changing, the deviation value of the rotor position is also changing in real time, and accordingly, the compensation coefficient obtained is also changing dynamically in real time with the deviation value of the rotor position. After the servo motor brake is completely released, the rotor position no longer changes, and the corresponding compensation coefficient remains constant at this time. Under the condition of unchanged load, the gravity compensation value is obtained with a constant compensation coefficient. In addition, the pre-stored rotor position deviation value-compensation coefficient can be a one-to-one correspondence, that is, one rotor position deviation value corresponds to one compensation coefficient, or one rotor position deviation value corresponds to one compensation coefficient when it is within a certain range, or multiple rotor position deviation values ​​correspond to one compensation coefficient, which is not limited here.

[0062] After the servo motor brake is fully released (i.e., a constant gravity compensation value acts on the current regulator), if the load changes, for example, when the load is a robotic arm, the posture of the robotic arm will change, which will cause the gravity compensation value to not match the actual load, bringing additional burden to the current regulator and the servo driver. Therefore, in one embodiment of the present invention, after the servo motor brake is fully released, the gravity compensation value is also faded according to a preset fading slope. The preset fading slope can be calibrated according to actual conditions. For example, the preset fading slope can be determined according to the load change. The faster the load changes, the larger the corresponding preset fading slope, and the slower the load changes, the smaller the corresponding preset fading slope. For example, the preset fading slope is a fixed value.

[0063] Specifically, if Figure 5 As shown, in the above embodiment, when the servo motor brake is fully released, the gravity compensation value remains constant. If the load does not change, then maintaining a constant gravity compensation value will not have any effect on the current regulation and the control performance of the servo drive. However, when the load is variable, for example, in the field of robotics, when the load is a mechanical arm, when the mechanical arm is in different postures, the load borne by the motor may be greatly different. If the mechanical arm moves to different postures, and still uses a constant gravity compensation value to act on the current regulator, it will cause the gravity compensation to not match the actual load, which will bring additional burdens to the current regulator and servo drive. In severe cases, it will cause the current regulator to be saturated, affecting its control performance and further affecting the normal operation of the servo motor. At this time, it is necessary to fade the gravity compensation value, that is, gradually reduce the gravity compensation value until the gravity compensation value becomes 0. For example, the gravity compensation value can be gradually reduced according to the set fading slope until the gravity compensation value is completely withdrawn.

[0064] It should be noted that the preset fading slope can be a fixed value, so that the gravity compensation is smoothly faded and will not have too much impact on the current regulator, or it can be an incremental value, which can speed up the fading speed of the gravity compensation. The specific selection method can be determined according to the actual situation. In addition, the method of fading the constant gravity compensation value is not limited to the robot arm, but can also be used in other loads with variable postures.

[0065] In one embodiment of the present invention, Figure 3-5 As shown, the servo drive system of the embodiment of the present invention may also include a speed sensor S for detecting the current speed of the servo motor to obtain a speed feedback value. In addition, a speed reduction mechanism may also be included for controlling the driving speed of the driving load according to the control instruction.

[0066] In summary, the gravity compensation method of the present invention directly sets the gravity compensation value when the load weight is known, and the gravity compensation value is continuously valid after being enabled, does not depend on the regulator parameters, has a fast compensation speed, and has a stable compensation effect. When the load weight cannot be estimated, the gravity compensation can be directly calculated through the position deviation, and the gravity compensation is continuously valid after being enabled, which is suitable for occasions where the gravity of the load carried by the motor remains unchanged. When the gravity compensation remains constant, if the load runs in different postures, the gravity compensation can also be faded to prevent the gravity compensation from not matching the actual load, which will burden the driver and current regulator and affect the control performance.

[0067] Furthermore, in one embodiment of the present invention, before the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current command, the method also includes: processing the position difference between the rotor position feedback value of the servo motor and the position command through a position regulator to obtain a speed command; processing the speed difference between the speed feedback value of the servo motor and the speed command through a speed regulator to obtain a current command.

[0068] That is to say, the speed command can be obtained by processing the deviation between the rotor position feedback value and the rotor position command, and the speed regulator can obtain the current command by processing the deviation between the obtained speed command and the speed feedback value. The current regulator processes the current command, gravity compensation value, and current feedback value, and the obtained result drives the motor to work.

[0069] In summary, the gravity compensation method according to the embodiment of the present invention is applied to the servo drive. When the servo drive is enabled, the gravity compensation value is determined, and the gravity compensation value is applied to the current regulator in the servo drive, so that the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current instruction. Therefore, the method can perform gravity compensation in real time, does not rely on the regulator parameters, has a fast compensation speed, and has a stable compensation effect, and has strong versatility.

[0070] Corresponding to the above embodiment, the present invention also proposes a computer-readable storage medium.

[0071] The computer-readable storage medium of the embodiment of the present invention stores a gravity compensation program, and the gravity compensation program implements the above-mentioned gravity compensation method when executed by a processor.

[0072] The computer-readable storage medium of the embodiment of the present invention can perform gravity compensation in real time by executing the above-mentioned gravity compensation method, is independent of regulator parameters, has a fast compensation speed, and has a stable compensation effect and strong versatility.

[0073] Corresponding to the above embodiment, the present invention also proposes a servo driver.

[0074] like Figure 6 As shown, the servo driver 100 of the embodiment of the present invention includes a memory 110, a processor 120, and a gravity compensation program stored in the memory 110 and executable on the processor 120. The processor 120 executes the gravity compensation program to execute the above-mentioned gravity compensation method.

[0075] The servo driver of the embodiment of the present invention implements the above-mentioned gravity compensation method by running the above-mentioned gravity compensation program through the processor, can perform gravity compensation in real time, is independent of regulator parameters, has a fast compensation speed, and has a stable compensation effect and is highly versatile.

[0076] Corresponding to the above embodiment, the present invention also proposes a gravity compensation device.

[0077] like Figure 7 As shown, the gravity compensation device 200 according to the embodiment of the present invention is applied to the servo drive 100 , and the device 200 may include: a determination module 210 and a compensation module 220 .

[0078] The determination module 210 is used to determine the gravity compensation value when the servo drive is enabled. The compensation module 220 is used to apply the gravity compensation value to the current regulator in the servo drive so that the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current command.

[0079] It should be noted that for details not disclosed in the gravity compensation device of the embodiment of the present invention, please refer to the details disclosed in the gravity compensation method of the embodiment of the present invention, and the details will not be repeated here.

[0080] The gravity compensation device according to the embodiment of the present invention is applied to a servo drive. When the servo drive is enabled, the gravity compensation value is determined by the determination module, and the compensation module applies the gravity compensation value to the current regulator in the servo drive, so that the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current instruction. Thus, the device can perform gravity compensation in real time, does not rely on the regulator parameters, has a fast compensation speed, and has a stable compensation effect, and has strong versatility.

[0081] Corresponding to the above embodiment, the present invention also proposes a servo drive system.

[0082] like Figure 3-5 As shown, the servo drive system 300 of the embodiment of the present invention may include: a servo motor 310 and a servo drive 320 , wherein the servo drive 320 includes a position regulator 321 , a speed regulator 322 and a current regulator 323 .

[0083] Among them, the position regulator 321 is used to process the position difference between the rotor position feedback value of the servo motor and the position command to obtain the speed command. The speed regulator 322 is used to process the speed difference between the speed feedback value of the servo motor and the speed command to obtain the current command. The current regulator 323 is used to control the servo motor according to the gravity compensation value determined when the servo driver is enabled, the current feedback value and the current command.

[0084] According to one embodiment of the present invention, Figure 3-5 As shown, the above-mentioned servo drive system 300 also includes: a gravity compensation determination module 330, which is used to determine the compensation coefficient according to the position difference when the servo motor brake begins to release, and determine the gravity compensation value according to the compensation coefficient and the preset gravity compensation value.

[0085] According to one embodiment of the present invention, after the servo motor brake is completely released, the gravity compensation value remains constant.

[0086] According to an embodiment of the present invention, the servo drive system 300 further includes: a gravity reduction module 340, which is used to reduce the gravity compensation value according to a preset reduction slope after the servo motor brake is completely released.

[0087] According to one embodiment of the present invention, the speed feedback value of the servo motor is determined according to the rotor position feedback value of the servo motor.

[0088] Specifically, when the servo drive is enabled, different gravity compensation values ​​are determined according to different loads, and the compensation values ​​are directly applied to the current regulator. The position regulator processes the deviation between the rotor position feedback value and the rotor position command to obtain the speed command, and the speed regulator processes the deviation between the obtained speed command and the speed feedback value to obtain the current command. The current regulator outputs the result based on the deviation between the current command and the current feedback value combined with the gravity compensation value, and controls the servo motor based on the result.

[0089] Among them, when the load mass is known, the preset gravity compensation value can be determined according to the load mass, wherein the gravity compensation value has a one-to-one correspondence with the load mass, or a gravity compensation value corresponds to the load mass within a certain range, and the gravity compensation value is directly applied to the current regulator.

[0090] Under the premise that the mass of the load is unknown or cannot be estimated, after the servo driver is enabled, the servo motor brake begins to release (the brake coil of the servo motor is energized and begins to slowly release the motor). When the load slides down due to gravity, a position deviation will occur. At this time, the compensation coefficient needs to be determined according to the rotor position deviation of the motor. When the motor brake begins to release, there will be a rotor position feedback value, in which the rotor position can be obtained according to the corresponding sensor detection, and the detection value is used as the rotor position feedback value to calculate the deviation between the position command and the rotor position feedback, and then call the pre-stored rotor position deviation value-compensation coefficient correspondence table (or corresponding curve chart) to determine the corresponding compensation coefficient under the current deviation value, and then multiply the compensation coefficient by the rotor position deviation value to obtain the result and sum it with the preset gravity compensation value to determine the gravity compensation value, and finally directly apply the gravity compensation value to the current regulator. In this way, it can compensate to the current command more accurately. After the brake is completely released, the gravity compensation value is a constant value, which is suitable for applications where the load direction does not change, for example, the load is the vertical axis of a multi-axis device, a ball screw, a gear rack, etc.

[0091] Among them, during the release of the servo motor brake, since the rotor position of the motor is constantly changing, the deviation value of the rotor position is also changing in real time, and the corresponding compensation coefficient is also changing dynamically in real time with the deviation value of the rotor position. After the servo motor brake is completely released, the rotor position no longer changes. At this time, the corresponding compensation coefficient remains constant. Under the condition of unchanged load, the gravity compensation value is obtained with a constant compensation coefficient. In addition, the pre-stored rotor position deviation value-compensation coefficient can be a one-to-one correspondence, that is, one rotor position deviation value corresponds to one compensation coefficient, or one compensation coefficient corresponds to one rotor position deviation value within a certain range, or multiple rotor position deviation values ​​correspond to one compensation coefficient, which is not limited here.

[0092] When the servo motor brake is fully released, when the load is variable, for example, in the field of robotics, when the load is a mechanical arm, when the mechanical arm is in different postures, the load borne by the motor may be greatly different. If the mechanical arm moves to different postures, and still uses a constant gravity compensation value to act on the current regulator, it will cause the gravity compensation to not match the actual load, which will bring additional burdens to the current regulator and servo drive. In severe cases, it will cause the current regulator to be saturated, affecting its control performance and further affecting the normal operation of the servo motor. At this time, the gravity compensation value needs to be faded, that is, the gravity compensation value is gradually reduced until the gravity compensation value becomes 0. For example, the gravity compensation value can be gradually reduced according to the set fading slope until the gravity compensation value is completely withdrawn.

[0093] In one embodiment of the present invention, Figure 3-5 As shown, the servo drive system of the embodiment of the present invention may also include a speed sensor S for detecting the current speed of the servo motor to obtain a speed feedback value. In addition, a speed reduction mechanism may also be included for controlling the driving speed of the driving load according to the control instruction.

[0094] In summary, when the load weight is known, the gravity compensation value is set directly. After it is enabled, the gravity compensation value is continuously valid, independent of the regulator parameters, with fast compensation speed and stable compensation effect. When the load weight cannot be estimated, the gravity compensation can be directly calculated through the position deviation, and the gravity compensation is continuously valid after it is enabled, which is suitable for occasions where the gravity of the load carried by the motor remains unchanged. When the gravity compensation remains constant, if the load runs in different postures, the gravity compensation can also be faded to prevent the gravity compensation from not matching the actual load, which will burden the driver and current regulator and affect the control performance.

[0095] It should be noted that for details not disclosed in the servo drive system of the embodiment of the present invention, please refer to the details disclosed in the gravity compensation method of the embodiment of the present invention, and the details will not be repeated here.

[0096] According to the servo drive system of the embodiment of the present invention, the position difference between the rotor position feedback value of the servo motor and the position command is processed by the position regulator to obtain the speed command, and the speed difference between the speed feedback value of the servo motor and the speed command is processed by the speed regulator to obtain the current command, and the current regulator controls the servo motor according to the gravity compensation value determined when the servo driver is enabled, the current feedback value and the current command. Therefore, the system can perform gravity compensation in real time, does not rely on the regulator parameters, has a fast compensation speed, and has a stable compensation effect, and has strong versatility.

[0097] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0098] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0099] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0100] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A gravity compensation method, characterized in that: Applied to a servo drive, the method comprises: When the servo drive is enabled, determining a gravity compensation value; The gravity compensation value is applied to a current regulator in the servo driver so that the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current command, wherein determining the gravity compensation value includes: In the case where the load mass is unknown, when the servo motor brake begins to release, determining the position difference between the rotor position feedback value of the servo motor and the position command, and determining the compensation coefficient according to the position difference; Determining the gravity compensation value according to the compensation coefficient and a preset gravity compensation value; After the servo motor brake is completely released, the gravity compensation value remains constant; After the servo motor brake is completely released, the gravity compensation value is faded according to a preset fade slope.

2. The method according to claim 1, characterized in that When the load mass is known, the gravity compensation value is preset according to the load corresponding to the servo motor.

3. The method according to claim 1 or 2, characterized in that: Before the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current command, the method further includes: The position difference between the rotor position feedback value of the servo motor and the position command is processed by a position regulator to obtain a speed command; The speed difference between the speed feedback value of the servo motor and the speed command is processed by a speed regulator to obtain the current command.

4. The method according to claim 3, characterized in that The speed feedback value of the servo motor is determined according to the rotor position feedback value of the servo motor.

5. A computer-readable storage medium, characterized in that: A gravity compensation program is stored thereon, and when the gravity compensation program is executed by a processor, the gravity compensation method according to any one of claims 1-4 is implemented.

6. A servo drive, characterized in that: The invention comprises a memory, a processor and a gravity compensation program stored in the memory and executable on the processor, wherein the processor executes the gravity compensation method according to any one of claims 1 to 4 by running the gravity compensation program.

7. A gravity compensation device, characterized in that: Applied to a servo drive, the device comprises: A determination module, used to determine a gravity compensation value when the servo drive is enabled; A compensation module, used for applying the gravity compensation value to a current regulator in the servo driver, so that the current regulator controls the servo motor according to the gravity compensation value, the current feedback value and the current command; The determination module is further used to determine, when the load mass is unknown, a position difference between a rotor position feedback value of the servo motor and a position command when the servo motor brake begins to release, and determine a compensation coefficient according to the position difference, and determine the gravity compensation value according to the compensation coefficient and a preset gravity compensation value, wherein the gravity compensation value remains constant after the servo motor brake is completely released; The gravity reduction module is used to reduce the gravity compensation value according to a preset reduction slope after the servo motor brake is completely released.

8. A servo drive system, characterized in that: include: Servo motor; A servo drive, the servo drive comprising a position regulator, a speed regulator and a current regulator, wherein: The position regulator is used to process the position difference between the rotor position feedback value of the servo motor and the position command to obtain a speed command; The speed regulator is used to process the speed difference between the speed feedback value of the servo motor and the speed command to obtain a current command; The current regulator is used to control the servo motor according to the gravity compensation value and the current feedback value determined when the servo driver is enabled and the current instruction; A gravity compensation determination module, for determining a compensation coefficient according to the position difference when the servo motor brake starts to release when the load mass is unknown, and determining the gravity compensation value according to the compensation coefficient and a preset gravity compensation value, wherein the gravity compensation value remains constant after the servo motor brake is completely released; The gravity reduction module is used to reduce the gravity compensation value according to a preset reduction slope after the servo motor brake is completely released.

9. The servo drive system according to claim 8, characterized in that: When the load mass is known, the gravity compensation value is preset according to the load corresponding to the servo motor.

10. The servo drive system according to claim 8 or 9, characterized in that: The speed feedback value of the servo motor is determined according to the rotor position feedback value of the servo motor.