A method for fast interpolation calculation of s-shaped velocity profile

By iteratively correcting motion parameters, the interpolation calculation of S-shaped speed curves for CNC machine tools is simplified, solving the problems of computational complexity and poor real-time performance in existing technologies, and achieving efficient interpolation calculation and real-time performance assurance.

CN116795043BActive Publication Date: 2026-02-06SUZHOU MOU XUN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211416801.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-14
Publication Date
2026-02-06
Estimated Expiration
2042-11-14

AI Technical Summary

Technical Problem

Existing CNC machine tools suffer from complex calculations and poor real-time performance when calculating S-shaped speed curve interpolation, resulting in low processing efficiency.

Method used

An iterative method for correcting motion parameters is adopted, using the interpolation period as the time unit to avoid multiplication operations and directly calculate the position increment, thus simplifying the calculation process.

Benefits of technology

It improves the real-time performance and processing efficiency of CNC machine tools, reduces CPU resource consumption, lowers hardware configuration requirements, and shortens simulation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_2
    Figure QLYQS_2
  • Figure QLYQS_3
    Figure QLYQS_3
Patent Text Reader

Abstract

The present application relates to the technical field of numerical control machine tool control, in particular to a kind of S-shaped speed curve fast interpolation calculation method.The method comprises the following steps: S101 reads instant motion parameter;S102 instant motion parameter is initialized correction in order;S103 output current position increment;S104 correction motion parameter is obtained required actual parameter in order;S105 repeat step S103, enter next cycle.The present application has the advantages of simple, efficient.Optimization effect is good.Real-time is high, and directivity is high.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of numerical control machine tool control, in particular to a method for rapid interpolation calculation of S-shaped speed curve. BACKGROUND

[0002] The feed speed of a numerical control machine tool is closely related to machining precision, productivity and workpiece surface roughness. There are a large number of small line segments or circular arcs in the tool path, and appropriate deceleration is required at the corner. By looking ahead at the tool path for speed planning, the acceleration and deceleration information can be obtained in advance to improve machining efficiency. In speed planning, the more advanced algorithm is S-shaped acceleration and deceleration control. Compared with trapezoidal acceleration and deceleration control and exponential acceleration and deceleration control, S-shaped acceleration and deceleration control has a smooth, uniform, smooth and shock-free speed curve, can effectively suppress vibration, and improves efficiency.

[0003] After the speed curve is planned, the distance to be moved by each axis within the specified interpolation period needs to be calculated, which is "interpolation". It can make the machine tool reach the specified position at the specified time according to the planned speed curve.

[0004] Generally, in order to calculate the motion amount of the current period, the end position of the period needs to be calculated, and then the end position stored in the previous period is subtracted. Position calculation is a high-order polynomial and requires multiple multiplication and addition calculations. SUMMARY

[0005] The purpose of the present application is to overcome the above technical problems, and to provide a method for rapid interpolation calculation of S-shaped speed curve, which is simple, efficient, real-time and high in directivity.

[0006] To achieve the above purpose, the technical solution adopted by the present application is as follows.

[0007] In a first aspect, the present application provides a method for rapid interpolation calculation of S-shaped speed curve.

[0008] A method for rapid interpolation calculation of S-shaped speed curve, the method comprising the following steps:

[0009] S101 reads the instantaneous motion parameters;

[0010] S102 initializes the correction of the instantaneous motion parameters in order;

[0011] S103 outputs the current position increment;

[0012] S104 corrects the motion parameters in order to obtain the required actual parameters;

[0013] S105 repeats step S103 to enter the next cycle.

[0014] Further, the instant motion parameters in step S101 include velocity V, acceleration A, jerk J and snap S; wherein, the planned S-shaped velocity curve, at an instant of a certain time in a certain stage, the instant motion state is (V, A, J, S), and there are n complete interpolation periods T after the instant of the certain time in the certain stage.

[0015] Further, the instant motion parameters in step S102 are initialized in sequence to the correction formula as follows:

[0016]

[0017]

[0018]

[0019] In the formula, the left arrow symbol <- represents assigning the calculation result of the right expression to the left variable, and T is the interpolation period.

[0020] Further, the current position increment outputted in step S103 is V*T.

[0021] Further, after the current position increment outputted in step S103, n is set as n-1, and if n=0, it indicates that the output is completed and the process is exited.

[0022] If n≠0, the step S104 is performed.

[0023] Further, the formula for obtaining the required actual parameters by correcting the motion parameters in sequence in step S104 is as follows:

[0024] J←J+S*T,

[0025] A←A+J*T,

[0026] V←V+A*T,

[0027] In the formula, the left arrow symbol <- represents assigning the calculation result of the right expression to the left variable, and T is the interpolation period.

[0028] Further, the S-shaped velocity curve is a 15-segment S-shaped velocity curve.

[0029] Further, the S-shaped velocity curve is a 7-segment S-shaped velocity curve.

[0030] In the second aspect, the application provides another method for S-shaped velocity curve fast interpolation calculation.

[0031] A method for S-shaped velocity curve fast interpolation calculation, when the snap S=0, the method is as follows:

[0032] S201 initialize and correct the instant motion parameters:

[0033] S202 output the current position increment: V*T;

[0034] S203 let n <- n-1, when n=0, it means the output is completed, exit; when n≠0, then go to S204 step;

[0035] S204 correct the motion parameters in the following order:

[0036] A <- A+J*T;

[0037] V <- V+A*T;

[0038] S205 go to step S202, enter the next loop.

[0039] Further, the interpolation period T is a time constant;

[0040] Convert the time unit of the motion parameters (V, A, J, S) to T units, then *T and / or *T 2 and / or *T 3 in the above formula are equivalent to "*1", without actual multiplication operation, saving the multiplication operation of *T and / or *T 2 and / or *T 3 in the above formula;

[0041] Convert the length unit in the motion parameters to the pulse equivalent of the device, and the position increment obtained by interpolation does not need unit conversion, which is the required pulse value.

[0042] The S-shaped velocity curve commonly referred to in the industry refers to a velocity (Velocity) and acceleration (Acceleration) that can be continuous, a jerk (Jerk) that is discontinuous in steps, and at most can be divided into 7 stages. If the jerk (Jerk) is also continuous and the snap (Snap) is discontinuous in steps, then at most it can be divided into 15 stages. The 7 stages of the former are completely contained in the 15 stages of the latter, so the present invention directly describes the latter of higher order.

[0043] It is known that a planned 15-segment S-shaped velocity curve, for any arbitrary stage at a certain time, the instant motion state is (V, A, J, S), and there are n complete interpolation periods T after this time in this stage. Then, for the next n periods, the calculation method of the sequential position increment at the end of each period is:

[0044] (1) read the instant motion parameters;

[0045] (2) initialize and correct the instant motion parameters in order:

[0046]

[0047]

[0048]

[0049] In the formula, the left arrow symbol <- indicates that the result of the expression on the right is assigned to the variable on the left.

[0050] (3) Output the current position increment V*T;

[0051] Let n <- n - 1, when n = 0, it indicates that the output is completed, and exit; when n ≠ 0, then correct the motion parameters in order to obtain the required actual parameters:

[0052] J <- J + S*T,

[0053] A <- A + J*T,

[0054] V <- V + A*T.

[0055] (4) Output the current position increment V*T, and enter the next loop.

[0056] The above gives a general case, which is also applicable to other special cases. For example, for a 7-segment S-shaped velocity curve, it can be regarded as a case of jerk S = 0 in a 15-segment S-shaped velocity curve, and the calculation can be further simplified:

[0057] (1) Initialize the correction of the motion parameters:

[0058]

[0059] (2) Output the current position increment: V*T;

[0060] (3) Let n <- n - 1, if n is equal to 0, it indicates that the output is completed, and exit;

[0061] (4) Correct the motion parameters in the following order:

[0062] A <- A + J*T,

[0063] V <- V + A*T;

[0064] (5) Output the current position increment V*T, and enter the next loop.

[0065] The interpolation period T is a fixed time constant set in advance for a numerical control system, such as T = 0.5 ms. By converting the time units of the motion parameters (V, A, J, S) into T units, the "*T" and "*T" in the above process are replaced by "T" and "T 2" etc. are actually equivalent to "*1", without actual multiplication operation.

[0066] When V = 12000 mm / min = 200 mm / s, then V*T = 200 mm / s*0.5 ms = 0.1 mm, or first convert the time unit: V = 200 mm / s = 200 mm / (2000*T) = 0.1 mm / T, then V*T = 0.1 mm / T*1T = 0.1 mm, multiplication only leads to dimensional change, while the numerical value can remain unchanged, i.e. "*T", "*T 2 " etc. multiplication operation can be omitted.

[0067] Correspondingly, the length unit in the motion parameter is converted into the pulse equivalent of the device in advance, and the obtained position increment is interpolated, without unit conversion, which is the required pulse value.

[0068] After the above principle conversion, for any stage of the 15-segment high-order S-shaped velocity curve, at most only three addition operations are required in each period to obtain the position increment in the period. If the traditional calculation method is used, the position at the end of the period is calculated first, which requires a large number of multiplication and addition operations, and the position also needs to be buffered to subtract the next period to obtain the output value.

[0069] The above is the interpolation of one-dimensional case, if it is spatial three-dimensional interpolation, only a simple mapping transformation is needed, which is not described here. For spatial line segments, some projection vectors can be initialized in advance, and only similar self-increment operations are performed on the vectors in each interpolation period, which can also avoid multiplication operations.

[0070] Formula derivation: at any stage, the motion state corresponding to t time inside is: (V t , A t , J t , S t ), where the instantaneous state (V0, A0, J0, S0) corresponding to t = 0 time is known. S t = S0 remains unchanged, and other motion parameters need to be integrated as follows:

[0071]

[0072]

[0073]

[0074]

[0075] Where s[t] is the position at t time, if the distance of the current interpolation period motion needs to be calculated, s[t]-s[t-T] needs to be calculated, where T is the interpolation period.

[0076] If there are n complete interpolation periods T after the stage t=0, the position increments of the n continuous periods need to be calculated: s[T]-s[0], s[2T]-s[T], s[nT]-s[(n-1)T].

[0077] The position increment of a certain period obtained by the above process is expressed by the fixed (V0, A0, J0, S0) in the formula, which is relatively complex. The present application adopts the method of iterative correction of motion parameters, which can be proved to be equivalent, but simplifies the formula and greatly reduces the calculation amount required for interpolation.

[0078] The method for fast interpolation calculation of S-shaped speed curve provided by the present application uses the interpolation period as the time unit of the motion parameter and the pulse equivalent as the length unit of the motion parameter. The multiplication and division operations required for subsequent unit conversion can be avoided. For a numerical control system using a non-S-shaped speed curve, this is also applicable and is one of the optimization approaches.

[0079] The method for fast interpolation calculation of S-shaped speed curve provided by the present application uses the method of iterative correction of motion parameters to simplify the calculation formula.

[0080] The method for fast interpolation calculation of S-shaped speed curve provided by the present application can quickly calculate the position increment of each period: for a stage containing snap acceleration (Snap) and being constant, only three addition operations are required; for a stage containing jerk acceleration (Jerk) and being constant, only two addition operations are required; for a stage containing acceleration (Acceleration) and being constant, only one addition operation is required; and for a constant speed stage, the value can be directly output.

[0081] In a numerical control system, the device must obtain the corresponding pulse increment in each interpolation period to enable the machine tool to move according to the pre-planned speed curve. The CPU not only needs to perform interpolation operations, but also needs to process various I / O requests in a timely manner. If the calculation is not completed in time in a certain period, the real-time performance is disrupted, which will cause serious consequences.

[0082] Since interpolation operation needs to be performed once in each interpolation period, the calculation frequency is very high, and it is a necessary process. The method described in the present application avoids a large number of multiplication and addition operations and only requires a small number of addition operations, thereby saving and releasing a large amount of valuable CPU resources and providing a guarantee for the real-time performance of the numerical control system. Alternatively, by applying the present application, a shorter interpolation period can be tried under the same hardware, thereby obtaining better machining results.

[0083] The method for S-shaped velocity curve rapid interpolation calculation provided by the application can greatly reduce the interpolation load in actual machining process, and ensure real-time performance even when running on low configuration hardware. On the other hand, the simulation time can be greatly shortened. For example, for the same tool path, the actual machining needs about 60 hours, and the simulation on the same hardware device needs 1 hour 2 minutes 33 seconds provided by a well-known numerical control system provider, and the method provided by the application only needs 1 minute 41 seconds, the efficiency is 37.16 times that of the other party.

[0084] Compared with the prior art, the method for S-shaped velocity curve rapid interpolation calculation provided by the application has the advantages that:

[0085] (1) The method is simple and efficient.

[0086] (2) The interpolation load is low, and the hardware configuration requirement is low.

[0087] (3) The simulation time is short, and the efficiency is high. DETAILED DESCRIPTION

[0088] In order to enable those skilled in the art to better understand the technical solutions of the application, the following embodiments are further described in detail, and the following embodiments are only used to illustrate the application, but not to limit the scope of the application.

[0089] In a first aspect, the application provides a method for S-shaped velocity curve rapid interpolation calculation.

[0090] The method for S-shaped velocity curve rapid interpolation calculation comprises the following steps:

[0091] S101 reads the instantaneous motion parameters;

[0092] S102 initializes the correction of the instantaneous motion parameters in sequence;

[0093] S103 outputs the current position increment;

[0094] S104 corrects the motion parameters in sequence to obtain the required actual parameters;

[0095] S105 repeats step S103 to enter the next cycle.

[0096] Further, the instantaneous motion parameters in step S101 include velocity V, acceleration A, jerk J and jounce S; wherein the instantaneous motion state is (V, A, J, S) at a certain time in a certain stage of the planned S-shaped velocity curve, and there are n complete interpolation periods T after this stage and this time.

[0097] Further, the initialization correction formula of the instantaneous motion parameters in sequence in step S102 is:

[0098]

[0099]

[0100]

[0101] wherein the left arrow symbol <- means assigning the result of the expression on the right to the variable on the left, and T is the interpolation period.

[0102] Further, the step S103 outputs the current position increment V*T.

[0103] Further, after the step S103 outputs the current position increment, n is set to n-1, and if n=0, it indicates that the output has been completed, and the process is exited.

[0104] If n≠0, the step S104 is performed.

[0105] Further, the formula for obtaining the required actual parameter by sequentially modifying the motion parameter in the step S104 is:

[0106] J←J+S*T,

[0107] A←A+J*T,

[0108] V←V+A*T,

[0109] wherein the left arrow symbol <- means assigning the result of the expression on the right to the variable on the left, and T is the interpolation period.

[0110] Further, the S-shaped velocity curve is a 15-segment S-shaped velocity curve.

[0111] Further, the S-shaped velocity curve is a 7-segment S-shaped velocity curve.

[0112] In the second aspect, the application provides another method for fast interpolation calculation of an S-shaped velocity curve.

[0113] A method for fast interpolation calculation of an S-shaped velocity curve, when the jerk S=0, the method is:

[0114] S201 initializes and modifies the instant motion parameter:

[0115] S202 outputs the current position increment V*T.

[0116] S203 sets n to n-1, and when n=0, it indicates that the output has been completed, and the process is exited; when n≠0, the step S204 is performed.

[0117] S204 modifies the motion parameter in the following order:

[0118] A←A+J*T;

[0119] V←V+A*T;

[0120] S205 proceeds to step S202, entering the next loop.

[0121] Furthermore, the interpolation period T is a time constant;

[0122] Convert the time unit of the motion parameters (V, A, J, S) to T, then the *T and / or *T in the above formulas... 2 and / or *T 3 Equivalent to "*1", it eliminates the need for actual multiplication, thus omitting "*T" and / or "*T" in the above formula. 2 and / or *T 3 Multiplication operation;

[0123] Convert the length unit in the motion parameters into the pulse equivalent of the device. The position increment obtained by interpolation does not need to be converted into a unit, and is the required pulse value.

[0124] Example 1

[0125] A method for rapid interpolation calculation of S-shaped velocity curves, comprising the following steps:

[0126] S101 reads real-time motion parameters;

[0127] S102 instantaneous motion parameters are initialized and corrected sequentially;

[0128] S103 outputs the current position increment;

[0129] S104 sequentially corrects motion parameters to obtain the required actual parameters;

[0130] S105 repeats step S103 to enter the next loop.

[0131] Furthermore, the instantaneous motion parameters mentioned in step S101 include velocity V, acceleration A, jerk J, and jerk S; wherein, for a planned S-shaped velocity curve, at a certain moment in any stage, the instantaneous motion state is (V, A, J, S), and there are n complete interpolation periods T after that moment in that stage.

[0132] Furthermore, the instantaneous motion parameters initialized and corrected sequentially in step S102 are as follows:

[0133]

[0134]

[0135]

[0136] Wherein, the left arrow symbol <- means to assign the result of the right expression to the left variable, and T is an interpolation period.

[0137] Further, the current position increment is outputted in step S103.

[0138] Further, after the current position increment is outputted in step S103, n <- n-1 is executed, if n = 0, it indicates that the output has been completed, and the process is exited; if n ≠ 0, step S104 is executed.

[0139] Further, the formula for obtaining the required actual parameter by sequentially modifying the motion parameters in step S104 is as follows:

[0140] J <- J + S*T,

[0141] A <- A + J*T,

[0142] V <- V + A*T,

[0143] Wherein, the left arrow symbol <- means to assign the result of the right expression to the left variable, and T is an interpolation period.

[0144] Further, the S-shaped velocity curve is a 15-segment S-shaped velocity curve.

[0145] The interpolation period T is a time constant; the time unit of the motion parameters (V, A, J, S) is converted into T unit, then *T and / or *T 2 and / or *T 3 in the above formula are equivalent to "*1", and no actual multiplication operation is needed, and the multiplication operation of *T and / or *T 2 and / or *T 3 in the above formula is omitted; the length unit in the motion parameters is converted into the pulse equivalent of the device, and the position increment obtained by interpolation does not need unit conversion, and is the required pulse value.

[0146] Embodiment 2

[0147] A method for rapid interpolation calculation of S-shaped velocity curve, when the jerk S = 0, the method is:

[0148] S201 initializes and modifies the instant motion parameters:

[0149] S202 outputs the current position increment: V*T;

[0150] S203 executes n <- n-1, when n = 0, it indicates that the output has been completed, and the process is exited; when n ≠ 0, step S204 is executed.

[0151] S204 corrects the motion parameters in the following order:

[0152] A <- A + J*T;

[0153] V <- V + A*T;

[0154] S205 goes to step S202 to enter the next cycle.

[0155] Further, the interpolation period T is a time constant;

[0156] The time unit of the motion parameters (V, A, J, S) is converted into T units, and then *T and / or *T 2 and / or *T 3 are equivalent to "*1", and no actual multiplication operation is needed, and the multiplication operation *T and / or *T 2 and / or *T 3 in the above formula is omitted; the length unit in the motion parameters is converted into the pulse equivalent of the device, and the position increment obtained by interpolation does not need unit conversion, and is the required pulse value.

[0157] The preferred embodiments of the application are described in detail above, but the application is not limited to the specific details in the above embodiments, and various modifications can be made to the technical solutions of the application within the technical concept of the application, and these simple modifications all belong to the protection scope of the application.

[0158] In addition, it should be noted that each specific technical feature and step described in the above specific embodiments can be combined in any suitable manner without contradiction, and in order to avoid unnecessary repetition, the application will not further describe various possible combinations.

[0159] In addition, various different embodiments of the application can also be combined in any manner, as long as they do not deviate from the technical concept of the application, and they should also be considered as disclosed by the application.

Claims

1. A method for S-shaped velocity profile fast interpolation calculation, characterized in that, The method comprises the following steps: S101 reading instant motion parameters, wherein the instant motion parameters comprise speed V, acceleration A, jerk J and jounce S, a planned S-shaped speed curve, an instant motion state at a certain moment in a certain stage is (V, A, J, S), and there are n complete interpolation periods T after the moment in the stage; S102 sequentially initializing and correcting the instant motion parameters, wherein the sequentially initializing and correcting formula of the instant motion parameters is: S103 outputting a current position increment; S104 obtaining required actual parameters by sequentially correcting motion parameters, wherein the formula for obtaining the required actual parameters by sequentially correcting motion parameters is: J←J+S*T, A←A+J*T, V←V+A*T, In the formula, the left arrow symbol <- represents assigning the calculation result of the right expression to the left variable, T is an interpolation period, and the interpolation period T is a time constant; a length unit in the motion parameters is converted into a pulse equivalent of equipment, and the position increment obtained through interpolation is a required pulse value without unit conversion; Converting the time unit of the motion parameters (V, A, J, S) into T units, *T and / or *T in the above formula 2 and / or *T 3 are equivalent to *1, without actually multiplying, and the multiplication of *T and / or *T in the above formula 2 and / or *T 3 is omitted; S105 repeating step S103 to enter a next cycle. The output current position increment in step S103 is V*T.

2. The method for calculating S-shaped velocity profile rapid interpolation according to claim 1, wherein, After the output current position increment in step S103, n is set to n-1, and if n=0, it is indicated that the output has been completed, and the process is exited; 3. The method for calculating S-shaped velocity profile rapid interpolation according to claim 1, wherein, if n≠0, step S104 is performed. The S-shaped speed curve is a 15-segment S-shaped speed curve.

4. The method for calculating S-shaped velocity profile rapid interpolation according to claim 1, wherein, The S-shaped speed curve is a 7-segment S-shaped speed curve.

5. The method for calculating S-shaped velocity profile rapid interpolation according to claim 1, wherein, When the jounce S=0, the method is:

6. The method for fast S-shaped velocity profile interpolation calculation of claim 1, wherein, S202 outputting a current position increment: V*T; S201 initialization correction of instant motion parameters: S203 setting n to n-1, and when n=0, it is indicated that the output has been completed, and the process is exited; and when n≠0, step S204 is performed; S204 correcting motion parameters in the following sequence: A←A+J*T; V←V+A*T; S205 turning to step S202 to enter a next cycle. ​

Citation Information

Patent Citations

  • Continuous multi-type curved segment mixed interpolation cubic polynomial feeding speed proactive planning method

    CN104076742A

  • S-type acceleration and deceleration control method of numerical control machine tool

    CN104181860A