Backlash compensation method and device of servo driver
By detecting the reverse gap meshing interval through a fully closed-loop system and an encoder, the compensation value is automatically generated and superimposed on the torque command, solving the problem of complicated gap compensation in the existing technology and realizing high-precision servo drive gap compensation, which is suitable for high-precision machining.
Patent Information
- Application Number
- CN202510709567.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-10-17
AI Technical Summary
The existing servo drive gap compensation method requires measuring the reverse gap value in advance, which is complicated to operate and difficult to achieve efficient dynamic compensation.
A servo drive gap compensation method using a fully closed-loop system is used. The main encoder and auxiliary encoder form a position feedback system, which detects the reverse gap engagement interval in real time, automatically generates a compensation value through the current difference, and dynamically adds it to the torque command to achieve seamless compensation.
There is no need to pre-determine the gap compensation value, which simplifies the operation and improves the position control accuracy. In particular, it eliminates the quadrant error in circular contour processing and is suitable for high-precision processing scenarios.
Smart Images

Figure CN120811204A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of servo motor control, and particularly relates to a gap compensation method and device for a servo driver. BACKGROUND
[0002] In a numerical control machine tool processing system, due to the wear of the feed transmission components and the tool, the output shaft has a certain delay and discontinuity when changing the direction of movement, which affects the dynamic response and positioning accuracy of the control system. Reducing the transmission gap is particularly crucial to the machining accuracy of the numerical control machine tool. Currently, transmission gap compensation mainly includes mechanical compensation and control strategy compensation. Mechanical compensation mainly includes reasonably designing a gap elimination structure or improving the transmission scheme to weaken the gap. Such methods have limited gap elimination effect. Control strategy compensation includes static compensation and dynamic compensation. Static compensation mainly includes gap detection and gap compensation. Common gap detection is mainly manual measurement or precision measurement by a laser interferometer to obtain the gap value that needs to be compensated. The gap compensation value is stored in the servo driver. When the motor direction is reversed, the servo driver compensates for the reverse gap error. This method is mainly used to eliminate the static positioning error caused by the reverse gap. For the short-term stall of the motor when it is running in reverse, i.e., the short-term static of the motor, to achieve the best control effect, static compensation is combined with dynamic compensation to eliminate the positioning error caused by the reverse gap and further eliminate the error caused by the over quadrant.
[0003] In order to solve the problems in the prior art, people have made long-term exploration and proposed various solutions. For example, a method for quadrant point compensation of a bus-based servo control system is disclosed in Chinese patent literature [202411526878.9], which includes: using a numerical control system or a controller supporting a bus to issue a first segment torque feedforward compensation value and a reverse gap compensation value before the numerical control system part sends the first segment torque feedforward compensation value when the reverse direction is determined by the tool path; the driver executes the received first segment torque feedforward instruction and reverse gap instruction immediately; after the numerical control control reverse gap sending is completed, the second segment torque feedforward instruction is continued to be sent, and the driver is notified to cache the second segment torque feedforward instruction; when the driver executes the reverse gap instruction, the second segment torque feedforward instruction is started to be executed; the system feeds back the first segment torque feedforward instruction, the reverse gap instruction and the second segment torque feedforward instruction to the motor at the servo control part, and then the motor feeds back to the workbench through the coupling.
[0004] The above-mentioned scheme solves the problem of reverse gap compensation to some extent, but the scheme still has many deficiencies, such as the need to measure the reverse gap value in advance, complex operation, etc. SUMMARY
[0005] The present application aims at the above-mentioned problems, and provides a gap compensation method and device for a servo driver, which is reasonable in design and does not need additional measurement.
[0006] To achieve the above-mentioned purpose, the present application adopts the following technical scheme: a gap compensation method for a servo driver, comprising the following steps:
[0007] S1: compensation value acquisition, full-closed loop system configuration, determination of reverse gap engagement interval, and calculation of compensation value;
[0008] S2: compensation value addition, real-time compensation during reverse gap effect, compensation effect verification and iteration.
[0009] In the above-mentioned gap compensation method for a servo driver, step S1 adopts a main encoder and an auxiliary encoder to form a full-closed loop position feedback system, wherein the main encoder monitors the motor shaft speed and the auxiliary encoder monitors the actual position of the mechanical end.
[0010] In the above-mentioned gap compensation method for a servo driver, the determination process of the positive engagement interval in step S1 is as follows:
[0011] The main encoder end speed is from negative to positive, the auxiliary encoder speed is 0, which is the starting point of the positive engagement, and the current is recorded as Ia; when the auxiliary encoder end speed is not 0, the positive engagement is ended, and the current is recorded as Ib.
[0012] In the above-mentioned gap compensation method for a servo driver, the determination process of the negative engagement interval in step S1 is as follows:
[0013] The main encoder end speed is from positive to negative, the auxiliary encoder speed is 0, which is the starting point of the negative engagement, and the current is recorded as Ic; when the auxiliary encoder end speed is not 0, the negative engagement is ended, and the current is recorded as Id.
[0014] In the above-mentioned gap compensation method for a servo driver, the positive compensation current value in step S1 is Ib-Ia; and the negative compensation current value is Id-Ic.
[0015] In the above-mentioned gap compensation method for a servo driver, step S2 superimposes the positive compensation current value to the torque command in the positive engagement interval.
[0016] In the above-mentioned gap compensation method for a servo driver, step S2 superimposes the negative compensation current value to the torque command in the negative engagement interval.
[0017] In the above-mentioned gap compensation method for a servo driver, step S2 calculates the theoretical profile error according to the actual machining parameters, compares the actual profile error before and after compensation, and verifies the effectiveness of the compensation value. In the above-mentioned gap compensation method for a servo driver, step S2 calculates the theoretical profile error according to the actual machining parameters, compares the actual profile error before and after compensation, and verifies the effectiveness of the compensation value.
[0018] In the above-mentioned gap compensation method of a servo driver, the machining parameters in step S2 include machining circle radius, machining speed and reverse gap width.
[0019] A gap compensation device of a servo driver adopts the gap compensation method of a servo driver.
[0020] Compared with the prior art, the advantages of the present application are that: the reverse gap error compensation method based on torque feedforward does not need to determine the gap compensation value in advance, the compensation starting point and ending point and the compensation value are automatically generated by the algorithm, the compensation method is simple and effective, the system position tracking error can be effectively reduced, and the position control precision is improved; it is suitable for high-precision machining scenes, especially in circular contour machining, and can eliminate the error at the over quadrant; based on the bus communication architecture, the real-time synchronization of the compensation instruction and the servo control is realized, and the seamless connection of the compensation action and the motor movement is ensured. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 is the principle diagram of the gap compensation method of the present application;
[0022] Figure 2 is the principle diagram of the servo control system of the present application; DETAILED DESCRIPTION
[0023] The present application will be further described in detail below in combination with the drawings and specific embodiments.
[0024] As shown in Figure 1-2 , a gap compensation method of a servo driver needs to establish a servo control system based on a hysteresis model as shown in Figure 2 , wherein B is a reverse gap hysteresis model, m is an equivalent mass, c is an equivalent viscous damping, and Egr is a gear ratio; the speed loop transfer function can be equivalent to:
[0025]
[0026] The speed loop transfer function is a second-order system with a zero point, and the loop is simplified to 1. When the direction of motor movement changes, the motor displacement is obtained by first passing through the reverse gap model, which is represented by the following formula:
[0027]
[0028] According to the hysteresis model of the reverse gap, the actual position remains unchanged during the reverse gap engagement. When d(t) is equal to the reverse gap width, t0 is the hysteresis time caused by the reverse gap. Based on this model, the reverse gap of different machining systems is calculated as follows:
[0029] Linear machining system: the servo position instruction is a slope: P cmd(t) = v * t; for such applications, the existence of reverse gap only affects the servo response in the meshing state, and brings profile error in the starting section of processing. The influence at the starting time is mainly that the reverse gap is meshed with the servo motor in the forward direction, and there is no need for compensation; when running in reverse, the reverse gap is meshed with the servo motor in the reverse direction, and the motor runs through the gap first and then moves to the correct position.
[0030] Calculate the reverse gap:
[0031] Further get the lag time caused by the reverse gap:
[0032] Thus the position tracking error is calculated as: According to the Laplace transform, the time domain signal of the position tracking error is calculated. It can be seen that for a linear processing system, the reverse gap error affects the starting section of linear processing.
[0033] Circular contour processing system: 2-axis cooperation is required, and the position command of XY should be a sine signal:
[0034] X cmd (t) = R * sin (ωt - φ)
[0035] Y cmd (t) = R * cos (ωt - φ)
[0036] The simplified control system can be regarded as a first-order closed-loop system, and the amplitude-frequency and phase-frequency characteristics are obtained from the first-order transfer function, and then the position feedback of XY axis is obtained as follows:
[0037] X l (t) = R * sin (ωt) * cos φ
[0038] Y l (t) = R * cos (ωt) * cos φ
[0039] Without reverse gap, the XY axis motion trajectory is a circle with as the radius; the integral equation passing through the reverse gap is calculated, and the reverse gap lag time t0 is further calculated, and finally the profile error is obtained:
[0040]
[0041] From the error equation, in the circular contour processing system, the reverse gap mainly appears in the quadrant of the circle, the reverse gap slowly increases before meshing, and reaches the maximum value at t0; the error of the reverse gap is related to the reverse gap width, the circle radius, and the processing angular velocity ω. According to the profile error, the reverse gap error amplitude can be conveniently estimated.
[0042] The compensation method based on speed feedforward mainly calculates the position to be compensated according to the profile error or position tracking error, increases the command pulse signal amplitude to reduce the hysteresis, but may cause under-compensation or over-compensation, so the reverse gap compensation is carried out by adopting the steps comprising:
[0043] S1: compensation value acquisition, full-closed loop system configuration, determination of reverse gap engagement interval, calculation of compensation value;
[0044] S2: compensation value addition, real-time compensation during reverse gap action, compensation effect verification and iteration.
[0045] The stall phenomenon occurring when the system crosses the quadrant is mainly caused by the gap, deformation and nonlinear friction. Through the motor voltage equation, torque equation and force equation during the reverse gap action, the servo system differential equation is obtained:
[0046]
[0047] As can be seen from the differential equation, the error contains two parts, the system response characteristics and the friction characteristics; for the error caused by the response, the rigidity should be improved as much as possible; when the system runs across the quadrant, it is basically in the zero speed area, so it is difficult to establish a friction model, therefore, the position error equation obtained by using the reverse gap hysteresis model is used for compensation.
[0048] Specifically, to accurately obtain the reverse gap engagement time, step S1 adopts a main encoder and an auxiliary encoder to form a full-closed loop position feedback system, wherein the main encoder monitors the motor shaft speed and the auxiliary encoder monitors the actual position of the mechanical end, so as to accurately measure the start and end points of the reverse gap engagement.
[0049] The reverse gap action time acquisition method is as follows: in the full-closed loop mode, the servo motor is controlled to run; the speed waveforms of the main encoder and the auxiliary encoder are acquired in real time; according to the speed waveforms, it is determined whether the motor is in the reverse gap engagement interval, and the torque feedback value during the reverse gap engagement is recorded. The reverse gap action interval is the start to end interval of the forward engagement; the start to end interval of the negative engagement.
[0050] Further, the forward engagement interval determination process in step S1 is as follows:
[0051] The main encoder end speed is from negative to positive, the motor starts to move reversely, the auxiliary encoder speed is 0, the mechanical end does not move, which is the start point of the forward engagement, and the current is recorded as Ia; when the auxiliary encoder end speed is not 0, the mechanical end starts to move, the forward engagement ends, and the current is recorded as Ib.
[0052] Further, the negative engagement interval determination process in step S1 is as follows:
[0053] The main encoder end speed is from positive to negative, the motor starts to move in positive direction, the auxiliary encoder speed is 0, which is the starting point of negative engagement, and the current is recorded as Ic; when the auxiliary encoder end speed is not 0, the negative engagement is over, and the current is recorded as Id.
[0054] Further, the positive compensation current value in step S1 is Ib-Ia, that is, the current increment during the positive engagement of the reverse gap, reflecting the friction and inertial resistance; the negative compensation current value is Id-Ic, that is, the current increment during the negative engagement of the reverse gap. Without complex components such as bus communication architecture or ring buffer, the compensation logic directly superimposes based on real-time current difference value, the algorithm is simple, and the controller algorithm requirement is low.
[0055] In addition, in step S2, the positive compensation current value is superimposed into the torque command in the positive engagement interval.
[0056] Meanwhile, in step S2, the negative compensation current value is superimposed into the torque command in the negative engagement interval, without segmentation buffer mechanism, the execution process is continuous without interruption, avoiding the lag or loss of compensation command caused by bus communication delay or buffer management exception.
[0057] Obviously, in step S2, the theoretical profile error is calculated according to the actual machining parameters, the actual profile error before and after compensation is compared, the validity of the compensation value is verified, and the compensation amount is dynamically adjusted if necessary.
[0058] Obviously, in step S2, the machining parameters include machining circle radius, machining speed and reverse gap width.
[0059] A gap compensation device of a servo driver adopts the above-mentioned gap compensation method of the servo driver, is suitable for non-high-speed high-precision scenes, and can effectively reduce the reverse gap compensation cost of the servo driver.
[0060] In summary, the principle of the embodiment is that: based on the reverse gap compensation method of torque feedforward, the reverse gap engagement interval and the corresponding current distortion are detected in real time, the compensation value is dynamically calculated and superimposed into the torque command, and the friction and nonlinear error caused by the gap are offset. Without pre-calibration compensation amount, the double-encoder information of the full-closed-loop system is used to accurately capture the reverse gap action time, and the compensation value is automatically generated based on the current feedback difference.
[0061] The specific embodiments described herein are merely illustrative of the spirit of the present application. Those skilled in the art of the present application can make various modifications or supplements to the described specific embodiments or use similar ways to replace them, without deviating from the spirit of the present application or exceeding the scope defined by the appended claims.
[0062] Although the terms full closed loop system, compensation value, and the like are used herein, the use of other terms is not excluded. The use of these terms is merely for the convenience of describing and explaining the nature of the present application; any interpretation that these terms are intended as any kind of additional limitation is contrary to the spirit of the present application.
Claims
1. A servo drive gap compensation method, characterized in that: The steps include: S1: Compensation value acquisition, full closed-loop system configuration, determination of backlash engagement range, and calculation of compensation value; S2: Compensation value is added, real-time compensation is performed during the reverse gap, and the compensation effect is verified and iterated.
2. The backlash compensation method of a servo drive according to claim 1, characterized in that: The step S1 uses a main encoder and an auxiliary encoder to form a full closed-loop position feedback system, wherein the main encoder monitors the motor shaft speed and the auxiliary encoder monitors the actual position of the mechanical end.
3. The backlash compensation method for a servo drive according to claim 1, wherein: The positive engagement interval determination process in step S1 is as follows: The main encoder end speed transitions from negative to positive, the auxiliary encoder speed is 0, which is the starting point of positive engagement, and the recorded current is Ia; When the auxiliary encoder terminal speed is not 0, the forward engagement ends and the recorded current is Ib.
4. The backlash compensation method of a servo drive according to claim 3, characterized in that: The negative engagement range determination process in step S1 is as follows: When the main encoder terminal speed transitions from positive to negative, the auxiliary encoder speed is 0, which is the starting point of negative engagement, and the recorded current is Ic; when the auxiliary encoder terminal speed is not 0, the negative engagement ends, and the recorded current is Id.
5. The backlash compensation method for a servo drive according to claim 4, characterized in that: In step S1 , the positive compensation current value is Ib-Ia; the negative compensation current value is Id-Ic.
6. The backlash compensation method of a servo drive according to claim 1, characterized in that: In the step S2, in the forward meshing range, the forward compensation current value is added to the torque command.
7. The backlash compensation method of a servo drive according to claim 1, characterized in that: In the step S2, in the negative engagement interval, the negative compensation current value is added to the torque command.
8. The backlash compensation method of a servo drive according to claim 1, characterized in that: In step S2, the theoretical contour error is calculated according to the actual processing parameters, and the actual contour errors before and after compensation are compared to verify the effectiveness of the compensation value.
9. The backlash compensation method of a servo drive according to claim 8, characterized in that: The processing parameters in step S2 include the processing circle radius, the processing rate and the backlash width.
10. A backlash compensation device for a servo drive, characterized in that: The backlash compensation method of the servo drive described in any one of claims 1 to 9 is adopted.
Citation Information
Patent Citations
Quadrant point compensation method based on bus servo control system
CN119396082A