Smooth interpolation method for position instruction of servo driver
By adopting the smooth interpolation method in the servo drive and using sinusoidal curve fitting speed interpolation, the problem of poor curve control accuracy in servo drive interpolation planning is solved, and higher machining accuracy and dynamic tracking performance are achieved.
Patent Information
- Application Number
- CN202510426245.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-08-05
AI Technical Summary
In the prior art, the servo driver interpolation planning cannot be effectively reverse-fitted to the controller's planning curve, resulting in poor curve control accuracy and reducing position dynamic tracking performance.
A servo driver position instruction smooth interpolation method is adopted. The controller issues target position instructions regularly with the instruction cycle T. The servo driver performs internal position interpolation control with T0 as the control cycle, calculates the average speed and fits the speed interpolation curve using the sinusoidal curve to obtain the position increment value of each interpolation discrete point of the servo driver to realize the smoothing characteristics of the interpolation position instructions of the servo driver.
It improves the tracking accuracy of the controller command curve, improves the accuracy of machining, avoids the impact of speed step changes, and improves the dynamic tracking performance of the servo drive.
Smart Images

Figure CN120428656A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of numerical control technology, and in particular to a method for smooth interpolation of position instructions of a servo drive. Background Art
[0002] In a servo position control system, as the servo driver receives commands from an external controller and completes the relevant position trajectory control according to those commands, the controller samples the planned position curve according to its command cycle and then issues it as a command to the driver. Because the controller's position command cycle is much longer than the servo driver's position control cycle, to ensure the accuracy of the position command, the servo driver must perform position interpolation internally to back-fit the controller's planned curve, thereby obtaining a position following curve with the highest possible accuracy. However, with the development and application of communication technologies, particularly real-time bus technologies, the controller's command cycle and the servo's control cycle are gradually shrinking. Currently, the mainstream curve back-fitting methods are position mean interpolation or position command modulo mean interpolation.
[0003] The above method has high requirements on curve accuracy, especially when the controller's command curve has a large curvature, the trajectory back-fitting accuracy is very poor; and the command speed at the connection of each command cycle in the above method is a step change curve. In actual interpolation planning, it is necessary to increase the subsequent first-order filter time constant to eliminate the influence of the step change of the command speed, which greatly reduces the position dynamic tracking performance and has poor use effect. Summary of the Invention
[0004] The object of the present invention is to provide a method for smooth interpolation of position instructions of a servo drive in view of the above problems.
[0005] To achieve the above object, the present invention adopts the following technical solution: a method for smooth interpolation of position instructions for a servo drive, the method comprising the following steps:
[0006] S1, the controller sends the target position command regularly with the command cycle T, and the servo driver performs internal position interpolation control with T0 as the control cycle;
[0007] S2, average speed calculation within the instruction cycle;
[0008] S3. Obtain the speed interpolation curve of the servo drive using the average speed;
[0009] S4. Obtain the position increment value of each interpolation discrete point of the servo driver through the speed interpolation curve.
[0010] In step S1, T0 satisfies T=n i *T0 relationship, where n i It is the multiple relationship between the controller's i-th instruction cycle and the driver's interpolation control cycle T0.
[0011] In the above-mentioned method for smooth interpolation of servo drive position instructions, the target position instruction issued by the controller is an absolute position instruction, and the controller position instruction obtained by the servo drive for the i-th time is S i .
[0012] In step S2, the average speed of the controller in the i-th instruction cycle is calculated by taking the difference between the two position instructions obtained before and after. The calculation formula is:
[0013] Step S3 specifically includes the following steps:
[0014] S31, with the average speed V of the i-1th instruction i-1 As a starting point;
[0015] S32, with the average speed V of the i-th instruction i for the goal;
[0016] S33. Fitting the deformed sine curve to obtain the i-th servo driver speed interpolation curve and formula.
[0017] In step S33, the servo drive speed interpolation curve formula is:
[0018] in
[0019] In step S4, the position increment value of each interpolation discrete point of the servo drive in the i-th instruction cycle is obtained by integrating the fitted servo drive speed interpolation curve. The acquisition formula is:
[0020]
[0021] Where n is a non-negative integer, T0 is the servo interpolation control cycle time, T=n i *T0.
[0022] In step S4, the interpolation control position command output by the servo driver is: S in =S i-1 +Δ in .
[0023] In the above-mentioned method for smooth interpolation of position instructions of a servo drive, the interpolation control position instruction S output by the servo drive is in The generation period is T0, and T0 is an integer fraction of T.
[0024] In the above-mentioned method for smooth interpolation of servo drive position instructions, the multiple relationship between the servo drive control period T0 and the controller instruction period T is ni It is a dynamically adjustable parameter.
[0025] Compared with the prior art, the advantages of the present invention are: it can effectively utilize the infinitely differentiable characteristic of the sine and cosine functions, realize the effective smoothing characteristic of the servo drive interpolation position command, improve the tracking accuracy of the controller command curve, better realize the accuracy of mechanical processing, avoid the influence of speed step changes caused by the currently commonly used position mean interpolation method, effectively reduce the subsequent first-order filtering time constant, and improve the dynamic tracking performance of the servo drive position command. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a schematic diagram of the servo drive speed interpolation curve of the present invention; DETAILED DESCRIPTION
[0027] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0028] like Figure 1 As shown, a method for smooth interpolation of position instructions for a servo drive comprises the following steps:
[0029] S1, the controller sends the target position command regularly with the command cycle T, and the servo driver performs internal position interpolation control with T0 as the control cycle;
[0030] S2, average speed calculation within the instruction cycle;
[0031] S3. Obtain the speed interpolation curve of the servo drive using the average speed;
[0032] S4. Obtain the position increment value of each interpolation discrete point of the servo driver through the speed interpolation curve.
[0033] In step S1, T0 satisfies T=n i *T0 relationship, where n i It is the multiple relationship between the controller's i-th instruction cycle and the driver's interpolation control cycle T0.
[0034] Among them, the target position command issued by the controller is an absolute position command, and the controller position command obtained by the servo driver for the i-th time is S i .
[0035] The present invention is explained using the absolute position instruction issued by the controller as an example, but the invention is not limited to absolute position instruction control systems. It is also applicable to incremental position instruction control systems. The difference is that the absolute position instruction system calculates the position increment by the difference between the two previous instructions, while the incremental position instruction system directly uses the incremental position issued by the controller for the i-th time for calculation.
[0036] In step S2, the average speed of the controller in the i-th instruction cycle is calculated by taking the difference between the two position instructions obtained before and after. The calculation formula is:
[0037] Step S3 specifically includes the following steps:
[0038] S31, with the average speed V of the i-1th instruction i-1 As a starting point;
[0039] S32, with the average speed V of the i-th instruction i for the goal;
[0040] S33. Fitting the deformed sine curve to obtain the i-th servo driver speed interpolation curve and formula.
[0041] In step S33, the servo drive speed interpolation curve formula is:
[0042] in
[0043] In step S4, the position increment value of each interpolation discrete point of the servo drive in the i-th instruction cycle is obtained by integrating the fitted servo drive speed interpolation curve. The acquisition formula is:
[0044]
[0045] Where n is a non-negative integer, T0 is the servo interpolation control cycle time, T=n i *T0.
[0046] In step S4, the interpolation control position command output by the servo driver is: S in =S i-1 +Δ in .
[0047] In detail, the interpolation control position command S output by the servo driver in The generation period is T0, and T0 is an integer fraction of T.
[0048] In addition, the multiple relationship between the servo drive control cycle T0 and the controller instruction cycle T is n i It is a dynamically adjustable parameter.
[0049] In this paper, the controller instruction cycle T and the servo interpolation control cycle T0 are fixed multiples of n. iThe relationship between and describes the above interpolation method in detail. However, this method is not limited to the fixed multiple relationship between the controller instruction cycle and the servo interpolation control cycle. The servo interpolation cycle T0 is generally a fixed value. For real-time synchronous controllers, its communication cycle T is a fixed value, but for non-real-time synchronous controllers, its communication cycle T is a non-fixed value. This paper uses the sine curve as a benchmark for speed curve fitting, making full use of the easy expansion of the sine function period. For non-real-time synchronous controllers, the method of this paper is also applicable.
[0050] In summary, the principle of this embodiment is: based on the average speed of the position command of the controller, the position command speed is smooth and continuous during the servo interpolation cycle through the fitted sinusoidal speed curve, that is, the characteristic of the infinite differentiation of the sine and cosine functions is utilized to achieve the effective smoothness of the servo driver interpolation position command; the position command interpolation method based on the continuity of the position command speed can reversely fit the command curve of the controller, improve the tracking accuracy of the controller command curve, and thus achieve the continuity of the command speed of the entire controller, effectively avoiding the speed step change effect brought by the currently commonly used position mean interpolation method, and can effectively reduce the subsequent first-order filter time constant, improve the dynamic tracking performance of the servo driver position command, and thus better achieve the accuracy of mechanical processing.
[0051] The specific embodiments described herein are merely illustrative of the spirit of the present invention. Persons skilled in the art may make various modifications, additions, or substitutions to the described specific embodiments without departing from the spirit of the present invention or exceeding the scope of the appended claims.
Claims
1. A method for smooth interpolation of position instructions for a servo drive, characterized in that: This method comprises the following steps: S1, the controller sends the target position command regularly with the command cycle T, and the servo driver performs internal position interpolation control with T0 as the control cycle; S2, average speed calculation within the instruction cycle; S3. Obtain the speed interpolation curve of the servo drive using the average speed; S4. Obtain the position increment value of each interpolation discrete point of the servo driver through the speed interpolation curve.
2. A method for smooth interpolation of position instructions for a servo drive according to claim 1, characterized in that: In step S1, T0 satisfies T=n i *T0 relationship, where n i It is the multiple relationship between the controller's i-th instruction cycle and the driver's interpolation control cycle T0.
3. A method for smooth interpolation of position instructions for a servo drive according to claim 1, characterized in that: The target position command issued by the controller is an absolute position command, and the controller position command obtained by the servo driver for the i-th time is s i .
4. A method for smooth interpolation of position instructions for a servo drive according to claim 3, characterized in that: In step S2, the average speed of the controller in the i-th instruction cycle is calculated by taking the difference between the two position instructions obtained before and after. The calculation formula is:
5. A method for smooth interpolation of position instructions for a servo drive according to claim 4, characterized in that: Step S3 specifically includes the following steps: S31, with the average speed V of the i-1th instruction i-1 As a starting point; S32, with the average speed V of the i-th instruction i for the goal; S33. Fitting the deformed sine curve to obtain the i-th servo driver speed interpolation curve and formula.
6. A method for smooth interpolation of position instructions for a servo drive according to claim 5, characterized in that: In step S33, the servo drive speed interpolation curve formula is: in 7. A method for smooth interpolation of position instructions for a servo drive according to claim 6, characterized in that: In step S4, the position increment value of each interpolation discrete point of the servo drive in the i-th instruction cycle is obtained by integrating the fitted servo drive speed interpolation curve. The acquisition formula is: Where n is a non-negative integer, T0 is the servo interpolation control cycle time, T=n i *T0.
8. A method for smooth interpolation of position instructions for a servo drive according to claim 7, characterized in that: In step S4, the interpolation control position command output by the servo driver is: S in =S i-1 +Δ in .
9. A method for smooth interpolation of position instructions for a servo drive according to claim 8, characterized in that: The interpolation control position command S output by the servo driver in The generation period is T0, and T0 is an integer fraction of T.
10. A method for smooth interpolation of position instructions for a servo drive according to claim 1, characterized in that: The multiple relationship between the control period T0 of the servo driver and the controller instruction period T is n i It is a dynamically adjustable parameter.