High-speed corner trajectory planning method based on jerk constraint in numerical control machining
By combining a two-stage asymmetric corner smoothing strategy and generalized jerk bounded curve (JLAP) planning, and employing a bidirectional look-ahead planning algorithm, the incompatibility problem of acceleration/deceleration modes between corner points and remaining linear segments in CNC machining was solved, enabling continuous acceleration of multiple corner segments and improving the machining efficiency and geometric accuracy of the machine tool.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF CHINESE ACAD OF SCI
- Filing Date
- 2024-10-12
- Publication Date
- 2026-06-23
AI Technical Summary
Existing CNC machining methods are incompatible with the acceleration/deceleration modes between corner points and the remaining linear segments, which limits the sustainable improvement of feed rate. In particular, under arbitrary initial and final acceleration states, the three-stage JLAP planning method cannot effectively adjust the stage duration, resulting in discontinuous motion states between corner points and the remaining linear segments.
A high-speed corner trajectory planning method based on jerk constraints is adopted, which combines a two-stage asymmetric corner smoothing strategy and generalized jerk bounded curve (JLAP) planning. Low-speed corner points are identified by a two-way look-ahead planning algorithm, and look-ahead segmentation is performed to achieve continuous acceleration of multiple corner segments. In the case of trajectory reachability problem, the error is adjusted to correct the feed rate curve.
It achieves smooth acceleration/deceleration transitions at corners, enables rapid accessibility analysis and time allocation, significantly improves machine tool processing efficiency and geometric accuracy, meets user-specified tolerances and kinematic constraints, and possesses real-time characteristics and robustness.
Smart Images

Figure CN119322488B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CNC machining technology, and in particular to a high-speed corner trajectory planning method based on jerk constraints in CNC machining. Background Technology
[0002] With the improvement of computer-aided design (CAD) modeling capabilities, industrial parts are increasingly using complex freeform surfaces, such as NURBS. Computer-aided manufacturing (CAM) software typically generates toolpaths of a series of linear motion instructions (G01) for complex freeform surfaces, rather than analytical parametric curves. However, only G01 exists at the connection between adjacent linear segments. 0 Continuity. Discontinuities in curvature and feed rate at joints can cause machine tool vibration, thereby reducing surface quality and machining efficiency.
[0003] To address this problem, various corner smoothing methods have been proposed to generate continuous motion without complete stops. Generally, existing methods can be divided into two categories. One category is global corner smoothing methods, which use a single curve to fit all discrete toolpath positions. Global corner smoothing methods typically adjust the curve iteratively to meet kinematic and error constraints. This method has the potential to improve machining efficiency, but it is difficult to guarantee the smoothness of the solution during iteration, and the computational complexity makes real-time computation challenging. The other category is local corner smoothing methods, which introduce specific local small curves to smooth adjacent linear segments, locally adjusting the error between the smoothed curve and the original path at each corner. Furthermore, some studies have considered other local transition curves, such as the Pythagorean Hodograph (PH) curve, the Akima curve, and the cycloidal curve. After smoothing sharp corners using these typical curves, the next step is to plan the feed rate along the smoothed trajectory to meet kinematic constraints. This two-step smoothing method, also known as the geometric method, is widely used in three-axis and five-axis machine tools.
[0004] In recent years, corner trajectory planning has evolved from simply removing corners to focusing on performance improvement. Planning feed rates along specific geometric trajectories limits further improvements in machining efficiency. Therefore, recent developments have focused on one-step trajectory planning methods, which directly plan the motion of each drive axis, considering kinematics and error constraints. In kinematic models, corner trajectories are typically parameterized by machining time; the challenge lies in ensuring kinematic continuity at both ends of the corner. Most local corner smoothing models first decelerate and then accelerate, limiting feed rate increases. Wang et al. proposed a two-stage asymmetric corner smoothing model, achieving acceleration / deceleration transitions at corners. These methods comprehensively consider the motion performance of each drive axis within a specified corner tolerance range. They employ three-segment or seven-segment jerk-limited profiles (JLAP) to transition the motion state of the remaining straight segments between adjacent corners.
[0005] However, current JLAP planning methods perform poorly when handling arbitrary initial and final acceleration states and arbitrary displacement increments. While the three-stage JLAP can be applied to any initial and final acceleration state, it cannot adjust the stage duration based on arbitrary displacement. This approach only provides a suboptimal solution to avoid complex iterative calculations. This bottleneck prevents the simultaneous application of asymmetric smoothing models at adjacent corners, leading to incompatibility between acceleration / deceleration patterns at corner points and the remaining linear segments, thus limiting the sustainable improvement of feed rate on consecutive corner segments. Summary of the Invention
[0006] The purpose of this invention is to provide a high-speed corner trajectory planning method based on jerk constraints in CNC machining. It combines a generalized jerk bounded curve (JLAP) planning method with a two-stage asymmetric corner smoothing strategy and proposes a bidirectional planning adjustment strategy to achieve real-time look-ahead planning, thereby enabling continuous acceleration of multiple corner segments and significantly improving machine tool efficiency.
[0007] To achieve the above objectives, the present invention provides the following solution:
[0008] A high-speed corner trajectory planning method based on jerk constraints in CNC machining, the method includes the following steps:
[0009] S1, based on the asymmetric corner smoothing model of the two-stage acceleration curve, performs smooth acceleration / deceleration transition at toolpath corners;
[0010] S2, based on a seven-stage S-shaped acceleration / deceleration algorithm, performs reachability analysis and time allocation for the motion of the remaining straight segments of the tool path, where the acceleration at both ends of the remaining straight segments is non-zero;
[0011] S3 employs a bidirectional look-ahead planning algorithm to identify low-speed corner points, perform look-ahead segmentation, plan the feed rate of the corner points and the remaining straight segments in both forward and backward directions, merge the trajectories in the two directions, and obtain the feed rate curve of the entire toolpath.
[0012] In addition, the method also includes: when trajectory reachability problems occur, adjusting the error of adjacent corners and correcting the feed rate curve accordingly.
[0013] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: The high-speed corner trajectory planning method based on jerk constraints in CNC machining provided by the present invention (1) adopts a two-stage asymmetric model at the corner to achieve smooth acceleration / deceleration transition; (2) for the straight line segment of the remaining s, a novel seven-segment JLAP planning method is proposed, which can quickly perform reachability analysis and time allocation based on arbitrary initial and final acceleration and displacement increments; (3) a bidirectional look-ahead planning algorithm is used to identify low-speed corner points, perform look-ahead segmentation on them, and bidirectionally plan jerk trajectories from each low-speed point. When trajectory reachability problems occur, the errors of adjacent corners are adjusted, and the feed rate planning is corrected accordingly.
[0014] In summary, this invention employs a generalized jerk bounded curve (JLAP) planning method that combines a two-stage asymmetric corner smoothing strategy. It proposes a bidirectional planning adjustment strategy to achieve real-time look-ahead planning, thereby enabling continuous acceleration across multiple corner segments and significantly improving machine tool efficiency. The method described in this invention can generate jerk bounded corner trajectories that meet user-specified tolerances and kinematic constraints in real time, demonstrating superior performance and robustness in terms of real-time characteristics, machining efficiency, and geometric accuracy. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of the high-speed corner trajectory planning method based on jerk constraints in CNC machining according to the present invention;
[0017] Figure 2 This is a schematic diagram of the two-stage acceleration (TPACC) corner model of the present invention;
[0018] Figure 3 This is a schematic diagram of the two-stage deceleration (TPDEC) corner model of the present invention;
[0019] Figure 4 This is a schematic diagram of the motion on the remaining line segments of the present invention;
[0020] Figure 5 This is a schematic diagram of the 7-segment S-shaped acceleration / deceleration curve of the present invention;
[0021] Figure 6 This is a schematic diagram of the clover-shaped tool path and its interpolation results in an embodiment of the present invention;
[0022] Figure 7 A schematic diagram comparing the feed rate curves of different algorithms along a clover-shaped tool path;
[0023] Figure 8 This is a schematic diagram comparing the axial kinematic curves of different algorithms along the clover-shaped tool path, where (a)-(f) represent the X-axis velocity curve, Y-axis velocity curve, X-axis acceleration curve, Y-axis acceleration curve, X-axis jerk curve, and Y-axis jerk curve, respectively.
[0024] Figure 9 This is a schematic diagram of the butterfly-shaped tool path and its interpolation results according to an embodiment of the present invention;
[0025] Figure 10 This diagram illustrates the comparison of kinematic curves of different algorithms along a butterfly-shaped tool path, where (a)-(g) represent the tangential velocity curve, X-axis velocity curve, Y-axis velocity curve, X-axis acceleration curve, Y-axis acceleration curve, X-axis jerk curve, and Y-axis jerk curve, respectively.
[0026] Figure 11 This is a schematic diagram of the three-dimensional tool path and its interpolation results according to an embodiment of the present invention, wherein (a) is a schematic diagram of the three-dimensional tool path of the present invention, and (b)-(e) are schematic diagrams of the kinematic curves of the three-dimensional tool path of different algorithms. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] In CNC machining, most toolpaths consist of a large number of linear motion commands (G01). High-speed corner trajectory planning at the junctions of adjacent line segments is of significant research value for improving machining efficiency. However, current research suffers from incompatibility issues in acceleration / deceleration modes between corner points and remaining linear segments, limiting the sustainable improvement of speed. To address this problem, this invention proposes a novel real-time trajectory planning method that achieves global acceleration along the G01 path. Specifically, we employ a Generalized Jerk Bounded Curve (JLAP) planning method that incorporates a two-stage asymmetric corner smoothing strategy. Subsequently, a bidirectional planning adjustment strategy is proposed to achieve real-time look-ahead planning, thereby enabling continuous acceleration across multiple corner segments and significantly improving machine tool efficiency. The final example and comparison with current state-of-the-art techniques demonstrate the superior performance and robustness of our method in terms of real-time characteristics, machining efficiency, and geometric accuracy.
[0029] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0030] like Figure 1 As shown, the high-speed corner trajectory planning method based on jerk constraints in CNC machining provided by this invention includes the following steps:
[0031] S1, based on the asymmetric corner smoothing model of the two-stage acceleration curve, performs smooth acceleration / deceleration transition at toolpath corners;
[0032] S2, based on a seven-stage S-shaped acceleration / deceleration algorithm, performs reachability analysis and time allocation for the motion of the remaining straight segments of the tool path, where the acceleration at both ends of the remaining straight segments is non-zero;
[0033] S3 employs a bidirectional look-ahead planning algorithm to identify low-speed corner points, perform look-ahead segmentation, plan the feed rate of the corner points and the remaining straight segments in both forward and backward directions, merge the trajectories in the two directions, and obtain the feed rate curve of the entire toolpath.
[0034] The specific technical solution of the high-speed corner trajectory planning method based on jerk constraints is described below:
[0035] 1. Regarding the two-stage asymmetric corner smoothing model
[0036] S1, based on an asymmetric corner smoothing model of a two-stage acceleration curve, performs a smooth acceleration / deceleration transition at toolpath corners, specifically including:
[0037] To achieve acceleration / deceleration transitions at corners, an asymmetric corner smoothing model with a two-stage jerk curve (DJ-ACS) was introduced, as proposed by Wang et al. (Wang W, Hu C, Zhou K, et al. Local asymmetrical corner trajectory smoothing with bidirectional planning and adjusting algorithm for CNC machining[J]. Robotics and Computer-Integrated Manufacturing, 2021, 68: 102-058.).
[0038] First, the two-stage asymmetric acceleration (TPACC) model is defined as follows: Figure 2 As shown.
[0039] At corner point P i The start and end points of the transition are S and S, respectively. i and E i .like Figure 2 As shown, the kinematic relationships are as follows:
[0040]
[0041] in, and It is the corner point P. i Processing direction of two adjacent line segments A s A e V s V e D s D e They represent points S respectively i and E i acceleration, velocity, and velocity at point P and the corner point P i The distance. Assume the corner point P. i acceleration curve at point Constant accelerometer in two stages and Composition, these two accelerometers are related to the direction of the angle bisector. They are collinear in opposite directions. Therefore, the acceleration curve at the corner can be represented as:
[0042]
[0043] in, T1 and T2 represent the duration of each stage. Assume the angle bisector of the corner is reached at time T1, and this position is denoted as M. iIt serves as the dividing point between the two stages. At point M... i At this point, the following kinematic equations are satisfied:
[0044]
[0045] Assume A s =A e And define λ:=(J2 / J1) 1 / 3 Substituting the above assumptions and formula (1) into formula (3), and comparing along... and The components are obtained
[0046]
[0047] Where λ is the asymmetry factor, reflecting the degree of asymmetry at both ends of the corner; ε represents the error at the corner; J1 and J2 are the magnitudes of the jerk in the two stages; and J represents the acceleration along J1. The magnitude of the directional component, J Xmax J Ymax J Zmax These represent the jerk constraints for each axis of the machine tool. These represent the directions of each coordinate axis in the machine tool coordinate system.
[0048] Since all terms in the above equation are non-negative, we can infer that λ∈[0.5,1], and λ reflects the acceleration capability at the corner.
[0049] Now consider the kinematic constraints that need to be satisfied at the corner. First, Where λ≤1, therefore it is only necessary to ensure Within the jerk constraint range, that is:
[0050]
[0051] Then there is:
[0052]
[0053] Pick therefore
[0054] Next, consider acceleration. and Within the constraints:
[0055]
[0056] in, M represents iThe acceleration at the point is assumed to be reached at time T1, and this position is denoted as M. i A point serves as the dividing point between two stages; where A Xmax A Ymax A Zmax These represent the acceleration constraints for each axis of the machine tool;
[0057] Considering speed and Within the constraints:
[0058]
[0059] in, M represents i The speed at that point,
[0060]
[0061] It is important to note that when When this is true, it means that λ≥λ0, where λ0∈[0.5,1] is the equation The unique root in the interval [0.5,1]. Therefore, λ should belong to [λ0,1].
[0062] To avoid overlap at adjacent corner joints, the length D of the joint is... s and D e The following conditions should also be met.
[0063]
[0064] Initially set to If equations (7) to (9) are not satisfied, reduce T1 until all constraints are satisfied. Where ε max This indicates the maximum allowable error in processing.
[0065] If T'1 = αT1, where α ∈ [0, 1], then we have
[0066]
[0067] Therefore, given λ, the two-stage asymmetric corner smooth acceleration trajectory can be completely determined. However, λ, which reflects acceleration capability, cannot be determined based on a single corner alone. Multiple adjacent segments need to be examined to assess whether acceleration is achievable and to what extent. Detailed look-ahead and backtracking strategies will be discussed below.
[0068] Similarly, such as Figure 3 As shown, the two-stage corner smooth deceleration (TPDEC) trajectory can also be determined.
[0069]
[0070] The kinematic parameters of the deceleration model are as follows:
[0071]
[0072] They satisfy the following kinematic constraints and error constraints:
[0073]
[0074] 2. Regarding the motion on the remaining straight line segment
[0075] like Figure 4 As shown, except for each line segment P i P i+1 Outside the transition sections at both ends, the remaining linear motion on the line segment is planned using a seven-stage S-shaped acceleration / deceleration algorithm. This curve has finite acceleration, ensuring the stability of the machine tool motion and high computational efficiency, and is therefore widely used in real-time interpolation in CNC systems. However, most S-shaped acceleration / deceleration algorithms are only applicable when the acceleration at both ends is zero, or only for planning long straight lines. To better achieve continuous acceleration at multiple corners, this invention proposes a novel seven-stage S-shaped acceleration / deceleration algorithm that can be applied to line segments of arbitrary length, where the acceleration at both ends is non-zero.
[0076] S2, based on a seven-stage S-shaped acceleration / deceleration algorithm, performs reachability analysis and time allocation for the motion of the remaining straight segments of the toolpath, specifically including:
[0077] like Figure 5 As shown, the S-shaped feed rate curve has seven stages: I, II, III, IV, V, VI, and VII, corresponding to time nodes t1-t7.
[0078] J m A m and V m They represent the segments along line P respectively. i P i+1 The upper bound of acceleration, jerk, and velocity is:
[0079]
[0080] The jerk at each stage is as follows:
[0081]
[0082] According to E i S i+1 The acceleration at both ends and the reachability analysis can be divided into the following four cases:
[0083] · Case A: a s ≥0, a e ≤0;
[0084] · Case B: a s ≥0, a e >0;
[0085] · Case C: a s <0, a e ≤0;
[0086] · Case D: a s <0, a e >0;
[0087] Where, a s and a e represent the accelerations at the starting point and the ending point of the straight-line segment respectively;
[0088] Let S0 be the minimum distance that satisfies motion reachability. When the distance ΔL between the starting point and the ending point of each stage is less than S0, the motion is unreachable and the corner points at both ends need to be adjusted; A0 represents the extreme value of the acceleration curve; when the velocity increment is, A0 is the minimum value; when is, A0 is the maximum value.
[0089] The time and preview adjustment strategy for each stage are determined based on the distance between the starting point and the ending point.
[0090] · Let S0 be the minimum distance that satisfies motion reachability. When ΔL ≥ S0, the motion is reachable, that is, the corner points at both ends do not need to be adjusted.
[0091] · Let S1 be the minimum distance required for the acceleration a(t) to reach the maximum value A m . When ΔL ≥ S1, T2 ≥ 0. There is a uniform acceleration stage (II).
[0092] · Let S2 be the minimum distance required for a(t) to reach the minimum value -A m . When ΔL ≥ S2, T6 ≥ 0, and there is a uniform deceleration stage (VI).
[0093] · Let S3 be the minimum distance required for the velocity v(t) to reach the maximum value V m . When ΔL ≥ S3, there is a uniform velocity stage (IV).
[0094] 2.1 Reachability Analysis and Time Allocation of Case A
[0095] The velocity increment is defined as ΔV = v e - v s. Based on the change of ΔV, the relationships among S0, S1, S2, and S3 are different, resulting in different reachabilities and time allocations in each stage.
[0096] CaseA1:
[0097] In this case, The S-curve ensuring reachability must include the constant deceleration stage (VI), so S2 is excluded as a segmentation point.
[0098] When ΔL < S0, the motion is unreachable. K s =(v s , a s ) should be reduced, and the corner of P i needs to be adjusted by a factor of . Then enter CaseA2 and re-plan the S-curve on E i-1 S' i .
[0099] When ΔL ≥ S0, the motion is reachable. The value of V m also affects the time allocation scheme. The specific situations are as follows:
[0100] (1) If then 0 < S0 < S1 < S3.
[0101] When S0 < ΔL ≤ S1, the curve includes stages (I, III, V, VI, VII), and the following equation should be solved. This equation is a quartic equation for T1.
[0102]
[0103] When S1 < ΔL ≤ S3, the curve includes stages (I, II, III, V, VI, VII), and the following equation needs to be solved.
[0104] This equation is a quadratic equation for T2.
[0105]
[0106] When S3 < ΔL < +∞, the curve includes stages (I, II, II, IV, V, VI, VII), and the time for each stage is
[0107]
[0108] (2) If then 0 < S0 < S3. When reaching the maximum acceleration Am Previously, the speed has been accelerated to V m , so there is no uniformly accelerating phase (II), and the corner point S1 does not need to be considered.
[0109] When S0 < ΔL ≤ S3, the curve has phases (I, III, V, VI, VII), and the duration of each phase can be obtained by solving formula (17).
[0110] When S3 < ΔL < +∞, the curve has phases (I, II, IV, V, VI, VII), and the duration of each phase is:
[0111]
[0112] CaseA2:
[0113] In this case, the curve that satisfies reachability must include phases (3, 5, 7),
[0114] When ΔL < S0, the movement is unreachable. K s =(v s , a s ) should be reduced, and the corner of P i should be adjusted by a factor of . Then enter Case A3 and re-plan the S-curve at E i-1 S' i .
[0115] When ΔL ≥ S0, the movement is reachable. Specifically:
[0116] (1) If then 0 ≤ S0 ≤ S3.
[0117] When S0 < ΔL ≤ S3, the curve includes phases (1, 3, 5, 7), and the duration of each phase can be obtained by solving the following equations. These equations are cubic with respect to T1 and T7.
[0118]
[0119] When S3 < ΔL < +∞, the curve includes phases (I, III, IV, V, VII), and the following equations need to be solved:
[0120]
[0121] (2) If then 0 < S0 < S1 < S3.
[0122] When S0 < ΔL ≤ S1, the S-shaped curve includes stages (I, III, V, VII), and the duration of each stage can be obtained by solving the equation formula (21). When S1 < ΔL ≤ S3, the curve includes stages (I, II, III, V, VII), and the following equation needs to be solved. This equation is a quartic equation about T7.
[0123]
[0124] When S3 < ΔL < +∞, the curve includes stages (I, II, III, IV, V, VII), and
[0125]
[0126] CaseA3:
[0127] In this case, the minimum reachability curve only includes stages (III, V), and its threshold distance is:
[0128]
[0129] When ΔL < S0, the movement is unreachable. K s =(v s , a s ) and K e =(v e , a e ) should be reduced, and the adjacent corner points of P i and P i+1 should be adjusted by a factor . Then K' s =(α 2 v s , αa s ), K' e =(α 2 v e , αa e ), and
[0130]
[0131] E' i S' i+1 is just reachable. Then re-plan the S-shaped curve on E i-1 S' i .
[0132] When ΔL ≥ S0, the movement is reachable. The time planning is similar to the discussion in CaseA2.
[0133] Theorem 1: Symmetry of the S-shaped curve with respect to the initial and final motion states. Under the same kinematic constraints J m 、A m 、V m and the same displacement ΔL, if the initial and final states of two motions are opposite, i.e., and then the durations of each stage in the S-shaped curve are symmetric, i.e.:
[0134]
[0135] Proof:
[0136] Let Substituting it into Algorithm 1 and simplifying the equation will yield:
[0137]
[0138] Case A4:
[0139] In this case, the curve satisfying reachability must include stages (I, III, V), and its threshold distances are:
[0140]
[0141] When ΔL < S0, the motion is unreachable. K e =(v e , a e ) should be reduced, and the corner points of P i+1 should be adjusted by a factor . Then And:
[0142]
[0143] Then continue with Case A3.
[0144] When ΔL ≥ S0, the motion is reachable. According to Theorem 8, Case A4 is the same as Case A2. Just exchange the initial and final states and to determine the reachability and the duration of each stage.
[0145] Case A5:
[0146] In this case, the curve satisfying reachability must include stages (I, II, III, V), and its threshold distances are:
[0147]
[0148] When ΔL < S0, the movement is unreachable. K e =(v e , a e ) should be reduced, and the corner points of P i+1 should be adjusted by a factor of Then And:
[0149]
[0150] Then continue with CaseA4.
[0151] When ΔL ≥ S0, the movement is reachable. According to Theorem8, the situation of CaseA5 is the same as that of CaseA1. Just swap the initial and final states and to determine the reachability and the duration of each stage.
[0152] 2.2 Reachability analysis and time planning of CaseB
[0153] The reachability of this case is more complex. Under specific conditions, is reachable, while is unreachable. Let the endpoints of these intervals be represented in sequence as For the feasible conditions in various cases, please refer to Table 9, (where Another similar situation of
[0154] CaseB4:
[0155] First, the fastest mode to achieve ΔV is (I, III).
[0156]
[0157] When or , the movement is unreachable. K e =(v e , a e ) should be reduced, and the corner points of P i+1 should be adjusted by a factor of or is set and go to CaseB3.
[0158] when In order to maintain the velocity increment ΔV, it is necessary to reduce the acceleration time of phase (I), decrease the acceleration capability, and re-accelerate in phase (VII). In this case, the curve that satisfies the reachability includes phases (I,II,VII).
[0159]
[0160] As the distance increment ΔL increases, the time of phase (I) decreases to 0, at which point only phase (III,VII) exists.
[0161]
[0162] If ΔL continues to increase at this point, the velocity increment ΔL cannot be maintained under the S-shaped acceleration-deceleration model, making the motion unreachable until... The current mode is (III,V,VII), and the minimum acceleration is
[0163]
[0164] when At that time, movement is attainable, and time planning can be similar to Case A. Let K... s =(v s ,a s ) to K e =(v e ,a e ) is considered K s =(v s ,a s ) to K' e =(v' e ,0), and K' e =(v' e ,0) to K e =(v e ,a e The two segments of (VII). The first segment can be considered as Case A, while the second segment is a natural extension of phase (VII), i.e. T i =T' i (i = 1, ..., 6).
[0165]
[0166] 2.3 Accessibility Analysis and Time Planning for Case C
[0167] According to the theorem: the S-curve is symmetric about the initial and final motion states, Case C can also be handled by Case B. It only requires changing the initial state... and final state Exchange to determine reachability and the duration of each stage.
[0168] 2.4 Reachability analysis and time planning for Case D
[0169] In this case, the time planning can also be simplified by Case A. The process from K s =(v s , a s ) to K e =(v e , a e ) is regarded as three segments: K s =(v s , a s ) to K' s =(v' s , 0), K' s =(v' s , 0) to K' e =(v' e , 0), and K' e =(v' e , 0) to K e =(v e , a e ). The second segment belongs to Case A, while the first segment is an extension of stage (1) and the third segment is an extension of stage (7), that is
[0170] 3. Regarding the bidirectional look-ahead planning algorithm
[0171] For the aforementioned S3, the bidirectional look-ahead planning algorithm is adopted to identify low-speed corner points, perform look-ahead segmentation, plan the feed rates of corner points and the remaining linear segments from both the forward and backward directions, merge the trajectories in both directions, and obtain the feed rate curve of the entire tool path, specifically including:
[0172] S301, Determine the segmentation points at the corners with the local minimum inscribed circle radius, given N points P1,..., P N , initialize k f =1, where the meaning of k f is the index of the current forward corner point;
[0173] S302, When k f =N, the algorithm ends; when k f <N, find the next corner with the local minimum inscribed circle radius If there is no such k R ∈(k f , N), then take k R =N, set kb =k R >k f Consider k b At the corner, set And call TPACC(k) b ); where k b Indicates the index of the current reverse corner point, k R The meaning is the subscript of the segment corner point;
[0174] S303, when k f <k b When -1, compare the speeds of forward and backward planning; if... Perform forward planning and proceed to step S304; otherwise, proceed to step S305 to perform backward planning. f =k b When -1, proceed to step S306;
[0175] S304, from k f Forward planning is performed at the corner at +1, using ForwardTPACC(k) f +1) Get the appropriate To determine the shape and acceleration capability of the corner, by calling... Get k f The corner trajectory at +1, then call LineSPlan(k) f Planning from arrive The trajectory, set k f =k f +1;
[0176] S305, from k b Backward planning is performed at the corner at -1, using BackwardTPDEC(k) b -1) Obtain a suitable λ kb-1 By calling Get k b The corner trajectory at -1, then call LineSPlan(k) b -1) Planning from arrive The trajectory, set k b =k b -1;
[0177] S306, when k f =k b When -1, merge the trajectories in both directions and call LineSPlan(k). f Planning from arrive The trajectory, and then, setting k. f =k R Proceed to step S302.
[0178] To improve the efficiency of the bidirectional programming algorithm and meet the real-time processing requirements in industrial applications, the look-ahead algorithm first needs to segment the G01 instruction. In the absence of user-defined segmentation points, the algorithm determines the segmentation points at the corners of the local minimum inscribed circle radii. Specifically, in step S301, determining the segmentation points at the corners of the local minimum inscribed circle radii includes:
[0179] The radius of the inscribed circle of the i-th corner is
[0180]
[0181] Where, θ i =∠P i-1 P i P i+1 It's corner P i The angle between R and R i ≤R i-1 And R i ≤R i+1 Then the i-th corner is considered a segmentation point, and at segmentation point P i At this location, set λ i =1 and call TPACC(i,1).
[0182] Furthermore, in S304, the appropriate λ for the k-th corner point is predetermined by ForwardTPACC(k). k The value is used to determine the motion state of the corner point, specifically including:
[0183] S3041, set λ k =1 and λ k+1 =1, to initially plan the trajectory and obtain a reference speed;
[0184] S3042, calls TryFPlan(k-1) to attempt to retrieve data from E. k-1 To S k To obtain a feasible S-shaped feed rate curve, unlike LineSPlan(k-1), only the parameters at the k-th corner point are adjusted, without changing the already planned result. Based on this, TryFPlan(k) is called to attempt to obtain a feed rate curve from E. k To S k+1 Obtain a feasible S-curve, obtain feasible parameters for the two corner points, and obtain reference accelerations on the straight segments on both sides of corner point k;
[0185] If one of them fails, i.e., reachflag = 0, then set λ. k=1 and return. In subsequent steps, a feasible solution for moving along the straight line segment is obtained by adjusting the (k-1)th corner point.
[0186] S3043, and ε=ε max Substitute into formula (4) to obtain the kinematic values of other corner points;
[0187] S3044, if This indicates that from E k To S k+1 It needs to slow down, which means V e The size is not suitable, therefore... Use V s and V e Update the kinematic parameters of the corner point, A ref :=A s =A e ;
[0188] S3045, check if... If the speed constraint is violated, reduce V e And in [V s V e Find the optimal V that satisfies the bounded condition within the interval. e ;
[0189] S3046, needs to meet the following requirements therefore The acceleration of the k-th corner point that satisfies the above conditions is
[0190] S3047, according to formula (4), substitute into And A to obtain the λ of the corner point k ;
[0191] S3048, assign the value of k in ForwardTPACC(k) to k. f +1 Repeat steps S3041-S3047 to obtain a suitable λ. kf+1 To determine the shape and acceleration capability of the corner.
[0192] Please note that ForwardTPACC(k) only outputs the expected factor λ. k The (k+1)th corner point in the planning process is only used as a reference and therefore will not be stored in the result of the planned trajectory.
[0193] Furthermore, BackwardTPDEC(k) is similar to ForwardTPACC(k).
[0194] Specifically, in S3, BackwardTPDEC(k) and ForwardTPACC(k) use the same algorithm, i.e., steps S3041-S3047. The difference is that in S3042, TryDPlan(k) only adjusts the (k-1)th corner point. If TryDPlan(k) fails, BackwardTPDEC(k) returns.
[0195] λ k =1;
[0196] In BackwardTPDEC(k), k is assigned the value k. b -1 Repeat steps S3041-S3047 to obtain the appropriate...
[0197] 4. Simulation and Experimental Verification
[0198] This invention demonstrates the effectiveness and performance of the proposed algorithm through multiple examples. Compared with previous kinematic corner smoothing methods, the proposed method shows advantages in machining efficiency and toolpath quality. Furthermore, computational efficiency is analyzed to prove the feasibility of its real-time calculation.
[0199] For clarity, the locally asymmetric corner trajectory smoothing method proposed by Wang et al. is abbreviated as LACS. Tajima et al. planned jerk trajectories with and without limited acceleration at corner points, referred to as AI-KCS and AU-KCS, respectively. Furthermore, P2P refers to a simple point-to-point motion that comes to a complete stop at each corner point.
[0200] 4.1 Simulation
[0201] First, a two-dimensional "clover" shaped toolpath is shown, such as... Figure 6 As shown, its parametric equation is:
[0202]
[0203] Where i = 0,...,54. This path contains 55 G01 codes. The user-specified tolerance is 10 μm. The maximum feed rate is 60 mm / s, and the X / Y axis speed is limited to [V]. Xmax V Ymax ] = [100, 100] mm / s. X / Y axis acceleration is limited to [A Xmax A Ymax ] = [1000, 2000] mm / s 2 The X / Y axis jerk is limited to [J]. Xmax J Ymax ] = [30000, 60000] mm / s3 Our method can effectively utilize corner tolerance for transitions. This is mainly because the proposed generalized JLAP planning method can sometimes achieve reachability without adjusting for errors in adjacent corners.
[0204] Figure 7 The feed rate curves for four different methods are shown. Figure 7 A local magnification of the feed rate curve for a segment of the toolpath (from the 20th to the 27th corner point) is provided. It can be observed that the AU-KCS and AI-KCS methods decelerate and then accelerate before each corner point, limiting the increase in feed rate at corners. The LACS method can accelerate at some corners, but cannot continuously use the acceleration / deceleration corner model. Based on the generalized JLAP planning method and bidirectional planning adjustment strategy, the method of this invention can achieve sustainable acceleration on continuous corner segments, thereby reducing machining time.
[0205] The kinematic curves of different algorithms along the X / Y axes of the clover-shaped tool path are as follows: Figure 8 As shown.
[0206] like Figure 8 As shown, all four methods can generate bounded jerk trajectories that conform to the given kinematic constraints. Finally, the results and computational performance comparisons of each method are summarized in Table 1.
[0207] Table 1
[0208]
[0209] All four methods were implemented using MATLAB R2020b software on a PC equipped with an Intel i9 2.60GHz CPU. Since AI-KCS does not require bidirectional look-ahead, its algorithm has the shortest runtime. Our algorithm has a very short computation time, meeting the real-time processing requirements in industry. In the LACS method, each corner point must be calculated using both the SJ-ACS and DJ-ACS models. The model with the higher average turning speed is ultimately selected. Therefore, this algorithm has a relatively long computation time.
[0210] Next, we will demonstrate a complex butterfly-shaped toolpath as another example, such as... Figure 9 As shown. This path contains 401 G01 codes, with segment lengths ranging from 0.103mm to 1.943mm and corner angles from 76.86° to 179.97°. The corner tolerance for all four methods is set to 0.03mm. The maximum feed rate and X / Y axis speed are limited to 4000mm / min. The X / Y axis acceleration and jerk are limited to 1500mm / s². 2 and 15000mm / s 3 .
[0211] Figure 10 The kinematic curves of different methods are shown. For example... Figure 10 As shown, the method of this invention can accelerate the feed rate to a higher level when traversing consecutive obtuse corners. The LACS method exhibits lower corner speeds at sharp corners, which limits the overall feed rate improvement. The AI-KCS method, due to segment length limitations, plans for a lower feed rate. Similarly, AU-KCS is also limited by segment length, resulting in reduced processing efficiency. Although their acceleration capabilities differ, they all satisfy the specified kinematic constraints.
[0212] Table 2
[0213]
[0214] The performance comparison of butterfly toolpaths is summarized in Table 2. The test environment was identical. Our algorithm showed a significant improvement in cycle time and shorter computation time. The processing times of the LACS and AI-KCS algorithms were comparable; however, due to the complexity of the AI-KCS algorithm, its computation time exceeded its processing time, failing to meet real-time requirements.
[0215] Finally, we present a 3D toolpath as a test case, such as... Figure 11 As shown in (a).
[0216] This case contains 3,215 G01 codes, with line segment lengths ranging from 0.015 mm to 44.81 mm. The tolerance for all four methods is set to 0.01 mm. The maximum feed rate is set to 50 mm / s. The speed, acceleration, and jerk limits for the X / Y / Z axes are 100 mm / s and 1000 mm / s, respectively. 2 and 30000mm / s 3 .like Figure 11 As shown in (b)-(e), all four methods achieve maximum feed rate on long straight segments. Notably, our method rapidly reaches and maintains maximum feed rate on a series of short, smooth segments. The LACS method compares the average starting and ending velocities of SJ-ACS and DJ-ACS at each corner. Therefore, although the starting and ending velocities of SJ-ACS are relatively high at corners, the velocities in the middle of the corners are lower, resulting in frequent accelerations and decelerations and a lower overall feed rate.
[0217] The performance comparison of 3D toolpaths is summarized in Table 3.
[0218] Table 3
[0219]
[0220] 4.2 Experiment
[0221] In this section, machining experiments were conducted using the previously described butterfly-shaped toolpath. The experiments used a JDHGT400-A10SH three-axis CNC machining tool with a sampling frequency of 1 kHz. The cutting parameters of the toolpath were the same as those in the simulation. The trajectories obtained through four corner smoothing methods were interpolated at 1 ms intervals, and then the interpolated points were transmitted to the machine tool for machining. Finally, the machined workpiece was scanned and measured using a 3D optical profilometer. Based on the scanning results, the experimental results demonstrate that our method can improve machining efficiency and machining quality.
[0222] This invention proposes a novel high-speed corner smoothing method that can generate bounded corner trajectories with acceleration that meet user-specified tolerances and kinematic constraints in real time. At the corners, a two-stage asymmetric model is employed to achieve smooth acceleration / deceleration transitions. For the remaining straight segments of the s-axis, a novel seven-segment JLAP planning method is proposed. This method can quickly perform reachability analysis and time allocation based on arbitrary initial and final acceleration and displacement increments. A bidirectional look-ahead planning algorithm identifies low-speed corner points, segments them in the look-ahead direction, and bidirectionally plans acceleration trajectories from each low-speed point. When trajectory reachability issues arise, the errors of adjacent corners are adjusted, and the feed rate planning is modified accordingly. Simulation results show that this method can achieve sustainable acceleration / deceleration at multiple corners, especially on gentle and dense short segments, thus significantly improving machining efficiency. Compared with other local kinematic corner smoothing methods, the total cycle time can be reduced by 8.55% to 64.51%. Experimental verification confirms the effectiveness of this method in achieving high-speed, high-precision real-time interpolation of G01 commands in CNC systems.
[0223] The present invention also provides an electronic device, including one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform a high-speed corner trajectory planning method based on jerk constraints in CNC machining as described above.
[0224] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The storage medium can be a memory, magnetic disk, optical disk, etc.
[0225] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A high-speed corner trajectory planning method based on jerk constraints in CNC machining, characterized in that, Includes the following steps: S1, based on an asymmetric corner smoothing model of a two-stage acceleration curve, a smooth acceleration / deceleration transition is performed at the toolpath corner. Specifically, an acceleration transition model is used for acceleration transitions, and a deceleration transition model is used for deceleration transitions. The acceleration transition model satisfies acceleration constraints, acceleration constraints, velocity constraints, adjacent corner connection length constraints, and machining error constraints. The deceleration transition model satisfies acceleration constraints, velocity constraints, adjacent corner connection length constraints, and machining error constraints. The kinematic parameters of the acceleration transition model are determined by initializing the duration of the acceleration curve and iteratively decreasing this duration to satisfy the acceleration constraints, acceleration constraints, velocity constraints, adjacent corner connection length constraints, and machining error constraints of the acceleration transition model. S2, based on a seven-stage S-shaped acceleration / deceleration algorithm, performs reachability analysis and time allocation for the motion of the remaining straight segments of the toolpath, where the accelerations at both ends of the remaining straight segments are non-zero; four cases are classified according to the positive and negative combinations of the accelerations at the start and end points of the remaining straight segments of the toolpath; the reachability analysis includes calculating the minimum displacement that satisfies the motion reachability requirement. And the minimum distance required for acceleration to reach its maximum value. The minimum distance required for acceleration to reach its minimum value The minimum distance required for the speed to reach its maximum value. Based on the actual length of the remaining straight segment and The comparison results determine the existence of each stage in the seven-stage S-curve and the duration of each stage. S3 employs a bidirectional look-ahead planning algorithm to identify low-speed corner points, perform look-ahead segmentation, plan the feed rate of the corner points and the remaining straight segments in both forward and backward directions, merge the trajectories in the two directions, and obtain the feed rate curve of the entire toolpath.
2. The high-speed corner trajectory planning method based on jerk constraints in CNC machining according to claim 1, characterized in that, S1, based on an asymmetric corner smoothing model of a two-stage acceleration curve, performs a smooth acceleration / deceleration transition at toolpath corners, specifically including: S101 defines a two-stage asymmetric acceleration TPACC model to perform smooth acceleration transitions at toolpath corners. The kinematic parameters of the two-stage asymmetric acceleration TPACC model are as follows: (4) In the formula, These represent the duration of each stage; and It is a corner point The processing direction of two adjacent line segments, and ; Representing points respectively and acceleration, velocity and the point of intersection The distance between points and These are the corner points The start and end points of the transition; Indicates the direction of the angle bisector; It is an asymmetry factor, reflecting the degree of asymmetry at both ends of the corner; Indicates the error at the corner; The magnitude of the jerk in the two stages. express along The magnitude of the directional component, These represent the jerk constraints for each axis of the machine tool. , , These represent the directions of each coordinate axis in the machine tool coordinate system; The kinematic constraints of the two-stage asymmetric acceleration TPACC model are as follows: make sure Within the jerk constraint range: (6) Among them, take ,therefore ; Considering acceleration and Within the constraints: in, express The acceleration at the point, assuming the angle bisector of the corner occurs in time... Reach, and represent that position as The point serves as a dividing point between two stages; where, , , These represent the acceleration constraints for each axis of the machine tool; Considering speed , and Within the constraints: express The speed at that point, , , , ;when At that time, this means ,in It is an equation In the interval The only root within, therefore, It should belong to ; Length of adjacent corner connections and The following conditions must be met: (9) Initially set to If equations (7) to (9) are not satisfied, reduce Until all constraints are satisfied; where, Indicates the maximum allowable error in processing; S102 defines a two-stage deceleration TPDEC corner model to perform a smooth deceleration transition at toolpath corners. The kinematic parameters of the two-stage deceleration TPDEC corner model are as follows: (13) The following kinematic and error constraints must be satisfied:
3. The high-speed corner trajectory planning method based on jerk constraints in CNC machining according to claim 2, characterized in that, S2, based on a seven-stage S-shaped acceleration / deceleration algorithm, performs reachability analysis and time allocation for the motion of the remaining straight segments of the toolpath, specifically including: The S-shaped feed rate curve is divided into seven stages: I, II, III, IV, V, VI, and VII, with corresponding time points as follows: ; and Representing the segments along the line The upper bound of acceleration, jerk, and velocity is: The jerk at each stage is as follows: (16) according to The acceleration at both ends, reachability analysis is divided into the following four cases: in, These represent the accelerations at the beginning and end points of the straight line segment, respectively. set up To satisfy the minimum distance for accessibility of the movement, the distance between the start and end points of each stage is... At this time, movement is unreachable, and the corner points at both ends need to be adjusted; This represents the extreme value of the acceleration curve; when the velocity increment... hour, It is the minimum value; when hour, This is the maximum value.
4. The high-speed corner trajectory planning method based on jerk constraints in CNC machining according to claim 3, characterized in that, The S2 further includes: The timing and forward-looking adjustment strategies for each stage are determined based on the distance between the starting point and the end point: set up To satisfy the minimum distance for mobility accessibility, when At that time, the motion is reachable, meaning that the corner points at both ends do not need to be adjusted; set up For acceleration Reaching the maximum value Minimum distance required, when hour, There is a uniform acceleration phase II; set up for Reaching the minimum value Minimum distance required, when hour, There is a uniform deceleration phase VI; set up For speed Reaching the maximum value Minimum distance required, when hour, There exists a uniform velocity phase IV.
5. The high-speed corner trajectory planning method based on jerk constraints in CNC machining according to claim 4, characterized in that, S3 employs a bidirectional look-ahead planning algorithm to identify low-speed corner points, perform look-ahead segmentation, plan the feed rate and remaining straight segments of the corner points in both forward and backward directions, merge the trajectories in the two directions, and obtain the feed rate curve of the entire toolpath, specifically including: S301, by determining the segmentation point at the corner of the local minimum inscribed circle radius, given N points. ,initialization ,in, This is the index of the current positive corner point; S302, when When, the algorithm ends; when When finding the next corner with the local minimum inscribed circle radius, find the corner with the minimum inscribed circle radius. If such does not exist Then take ,set up ,consider At the corner, set and call ;in, Indicates the index of the current reverse corner point. The subscripts of the segmented corner points; S303, when At that time, compare the speeds of forward and backward planning. If If forward planning is performed, proceed to step S304; otherwise, proceed to step S305 to perform backward planning. Then proceed to step S306; S304, from Forward planning is carried out at the corner, through Get the right To determine the shape and acceleration capability of the corner, by calling... get The corner trajectory at the location, then call Planning from arrive The trajectory, set ; S305, from Backward planning is performed at the corner, through Get the right By calling get The corner trajectory at the location, then call Planning from arrive The trajectory, set ; S306, when At that time, merge the trajectories in two directions and call... Planning from arrive The trajectory, then, set Proceed to step S302.
6. The high-speed corner trajectory planning method based on jerk constraints in CNC machining according to claim 5, characterized in that, In step S301, determining the segmentation point at the corner of the local minimum inscribed circle radius specifically includes: The radius of the inscribed circle of the i-th corner is in, It's a corner The included angle, if and Then the i-th corner is considered a segmentation point, and at the segmentation point Location, setting and call .
7. The high-speed corner trajectory planning method based on jerk constraints in CNC machining according to claim 5, characterized in that, In S304, through Predetermine the appropriate corner point The value is used to determine the motion state of the corner point, specifically including: S3041, Settings and To initially plan the trajectory and obtain a reference speed; S3042, call Try from arrive Obtain a feasible S-shaped feed rate curve, and Unlike other methods, this method only adjusts the parameters of the k-th corner point without changing the already planned result. Based on this, it calls... Try from arrive Obtain a feasible S-curve, obtain feasible parameters for the two corner points, and obtain reference accelerations on the straight segments on both sides of corner point k; If one of them fails, that is Then set Then return, and in subsequent steps, obtain a feasible solution for moving along the straight line segment by adjusting the (k-1)th corner point; S3043, and Substitute into formula (4) to obtain the kinematic values of other corner points; S3044, if Then it means from arrive It is necessary to slow down, which means The size is not suitable, therefore... ,use and Update the kinematic parameters of the corner point. ; S3045, check if... If the speed constraint is violated, reduce and in Find the optimal value within the interval that satisfies the bounded condition. ; S3046, needs to meet the following requirements ,therefore The acceleration of the k-th corner point that satisfies the above conditions is ; S3047, according to formula (4), substitute into Use A to obtain the corner point ; S3048, The value of k in the middle is assigned as Repeat steps S3041-S3047 to obtain the appropriate... To determine the shape and acceleration capability of the corner.
8. The high-speed corner trajectory planning method based on jerk constraints in CNC machining according to claim 7, characterized in that, In S3, and The same algorithm is used, namely steps S3041-S3047, the difference being in S3042, Only adjust the (k-1)th corner point, if Failure, then return ; in, The value of k in the middle is assigned as Repeat steps S3041-S3047 to obtain the appropriate... .
9. The high-speed corner trajectory planning method based on jerk constraints in CNC machining according to claim 1, characterized in that, The method further includes: when trajectory reachability problems occur, adjusting the error of adjacent corners and correcting the feed rate curve accordingly.