Numerical control machining speed planning method and system based on constraint sensitivity
By constructing the constraint sensitivity curve (CSC), dividing high-risk and low-risk segments, and screening the VLC trough points, the determination of bidirectional scanning intervals and transition intervals is improved, which solves the low efficiency problem in the existing technology and achieves more efficient and accurate speed planning.
Patent Information
- Application Number
- CN202510547965.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-09-26
AI Technical Summary
The existing VLC-based bidirectional scanning velocity planning method is inefficient and inaccurate in multi-axis coupling scenarios, especially because the boundaries of the bidirectional scanning interval are composed of the VLC trough points, which contain a large number of invalid boundaries, and the transition curve needs to be constructed through trial and error at the intersection of the bidirectional scanning curves, resulting in low efficiency.
By constructing a constraint sensitivity curve (CSC), the travel interval is divided into high-risk and low-risk segments based on the rate of change of CSC along the journey. The VLC trough points are screened, and different thresholds are used to verify the speed and acceleration accessibility. The division of bidirectional scanning intervals and the determination of transition intervals are improved, thereby improving the efficiency and accuracy of speed planning.
It effectively reduces the number of bidirectional scanning intervals, improves the efficiency and accuracy of velocity planning, shortens the planning time, and ensures the rationality and consistency of the velocity curve under kinematic constraints.
Smart Images

Figure CN120704251A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of machining speed planning, and more specifically, relates to a CNC machining speed planning method and system based on constraint sensitivity. Background Art
[0002] In CNC machining, speed planning is a key factor in determining machining quality and efficiency. However, due to the coupling relationship between the machining path and the kinematic constraints of the machine tool, speed planning in multi-axis coupling scenarios is highly complex.
[0003] Existing VLC-based bidirectional scanning speed planning methods use VLC as a foundation to plan speed curves along the machining path. These methods involve three key steps: dividing the bidirectional scanning interval, calculating the bidirectional scanning curve, and constructing a transition curve that satisfies agility constraints. Since the bidirectional scanning interval boundaries are formed by the VLC troughs, they contain a large number of invalid boundaries. Furthermore, constructing transition curves at the intersections of the bidirectional scanning curves requires a trial-and-error approach to determine the transition interval. Each trial-and-error process requires recalculating the minimum agility curve, reducing speed planning efficiency.
[0004] Therefore, there is an urgent need to improve the existing speed planning methods to improve the efficiency and accuracy of speed planning. Summary of the Invention
[0005] In response to the above defects or improvement needs of the prior art, the present invention provides a CNC machining speed planning method and system based on constraint sensitivity, the purpose of which is to improve the efficiency and accuracy of CNC machining speed planning.
[0006] To achieve the above object, according to one aspect of the present invention, a method for CNC machining speed planning based on constraint sensitivity is proposed, comprising the following steps:
[0007] S1. According to the kinematic constraints of CNC machining, the maximum feasible feed speed of each stroke position is calculated, the speed limit curve VLC is obtained, and the VLC trough point is determined;
[0008] S2. Calculate the constraint sensitivity of each stroke position according to the velocity limit curve VLC to obtain a constraint sensitivity curve, which is used to describe the sensitivity of the velocity limit curve to the kinematic constraints;
[0009] S3. Based on the rate of change of the constraint sensitivity curve along the trip, the trip interval exceeding the fluctuation threshold is divided into a high-risk segment, and the rest is divided into a low-risk segment;
[0010] For high-risk segments, the VLC trough point that satisfies both the speed threshold and the acceleration threshold is used as the demarcation point of the bidirectional scanning interval; for low-risk segments, the VLC trough point that satisfies the speed threshold is used as the demarcation point of the bidirectional scanning interval;
[0011] S4. Determine a bidirectional scanning curve according to the bidirectional scanning interval demarcation point, and then obtain a speed planning curve.
[0012] As a further preferred embodiment, step S3, dividing the high-risk segment into the low-risk segment, comprises the following steps:
[0013] The high-frequency detail coefficient is calculated according to the rate of change of the constraint sensitivity curve along the stroke. The calculation formula is as follows:
[0014]
[0015] Wherein, κ'(s) represents the rate of change of the constrained sensitivity curve along the stroke, CSC(s) represents the constrained sensitivity curve, and s represents the stroke; A0(n) represents the original signal, which is obtained by discrete sampling of κ'(s) at equal intervals, and n represents the discrete position index of the original signal, n = 1, 2, ..., N, where N is the number of discrete sampling points of the original signal; D1(k) represents the first-layer high-frequency detail coefficient, k represents the discrete position index in the first-layer high-frequency detail coefficient, k = 1, 2, ..., N1, where N1 is the number of discrete sampling points of the first-layer high-frequency detail coefficient, and h1 represents the high-pass filter coefficient;
[0016] The fluctuation threshold T is determined according to the high-frequency detail coefficient, and the calculation formula is as follows:
[0017]
[0018]
[0019] Among them, α represents the threshold coefficient;
[0020] The travel interval is divided into high-risk and low-risk segments based on the fluctuation threshold T:
[0021] If |D1(k)|>T, the travel interval corresponding to the discrete point k is determined to be a high-risk section;
[0022] If |D1(k)|≤T, the travel interval corresponding to the discrete point k is determined to be a low-risk segment.
[0023] As a further preferred embodiment, in step S3, for the trough point in the high-risk segment / low-risk segment, the method for determining the speed threshold is as follows:
[0024] For the i-th and j-th valley points P in the same segment i 、P j ,have:
[0025]
[0026] Among them, s i 、s j Respectively represent the i-th and j-th trough point travel, v i Indicates the speed corresponding to the i-th valley point in VLC;
[0027] Let acceleration A = ±A lim And respectively into the above formula, the corresponding v i,j As P i Move to P j The maximum and minimum speeds that can be achieved when A lim is the absolute value of the maximum acceleration;
[0028] Then for the j-th trough point P j , calculate the distance from other trough points in the same segment to P j The maximum speed and minimum speed that can be achieved at this time are selected, and the minimum value of the maximum speed and the maximum value of the minimum speed are selected to form the trough point P j speed threshold.
[0029] As a further preferred embodiment, in step S3, for the trough point in the high-risk segment, the acceleration threshold is determined by:
[0030] For the i-th and j-th trough points P in the high-risk segment i 、P j ,have:
[0031] a i,j =a i +Jt
[0032] Among them, a i represents the acceleration corresponding to the i-th trough point in VLC, and t represents P i to P j exercise time;
[0033] Let the agility J = ±J lim And respectively into the above formula, the corresponding a i,j As the maximum acceleration and minimum acceleration of the j-th trough point, J lim is the absolute value of the maximum agility;
[0034] Then for the j-th trough point P j , calculate the distance from each trough point in the high-risk segment to P j The maximum acceleration and minimum acceleration that can be achieved at this time, and the minimum value of the maximum acceleration and the maximum value of the minimum acceleration are selected to form the trough point P j acceleration threshold.
[0035] As a further preferred embodiment, step S4, determining the bidirectional scanning curve according to the bidirectional scanning interval demarcation point, includes:
[0036] Several bidirectional scanning intervals are obtained according to the bidirectional scanning interval demarcation points; for any bidirectional scanning interval, with the goal of maximizing agility, its forward and reverse scanning curves are planned respectively, and the forward and reverse scanning curves are merged into the bidirectional scanning curve of the bidirectional scanning interval according to their intersection points.
[0037] As a further preferred embodiment, step S4, determining the speed planning curve according to the bidirectional scanning curve, includes:
[0038] For any bidirectional scanning interval:
[0039] If the intersection point P of the forward and reverse scanning curves satisfies the agility constraint, the forward and reverse scanning curves are directly merged as the bidirectional scanning curve of the bidirectional scanning interval;
[0040] Otherwise, a transition interval is determined in the neighborhood of the intersection point P, and a transition curve that just satisfies the agility constraint is constructed in the transition interval. The transition curve is merged with the remaining bidirectional scanning curves to obtain the bidirectional scanning curve of the bidirectional scanning interval.
[0041] The bidirectional scanning curves of each bidirectional scanning interval are merged to form the speed planning curve of the entire stroke.
[0042] As a further preferred embodiment, the agility constraint is expressed as:
[0043]
[0044] Among them, P is the intersection of the forward and reverse scanning curves, and its corresponding stroke is s p , the speed is v sp , a sl 、a sr represents the acceleration of the forward and reverse scanning curves at the intersection P, Δs represents the travel difference between two adjacent positions, J max Indicates maximum agility.
[0045] As a further preferred embodiment, in step S4, the method for constructing the transition curve is:
[0046] The transition interval includes a forward transition interval and a reverse transition interval. The initial forward transition interval (s c ,s p ), reverse transition interval (s p ,s d ); where s p is the travel distance of the forward and reverse scanning curves at the intersection point P; s c 、sd is the distance corresponding to points C and D on the forward and reverse scanning curves, and the acceleration a of points C and D sc 、a sd satisfy:
[0047]
[0048] Based on the initial forward transition interval and reverse transition interval, a final transition interval is determined by a binary search method, so that the corresponding forward transition curve and reverse transition curve have an intersection point, and the intersection point satisfies the agility constraint; the forward transition curve and reverse transition curve are respectively planned with the minimum agility as the goal, starting from the two ends of the transition interval;
[0049] The forward transition curve and the reverse transition curve corresponding to the final transition interval are merged to obtain a transition curve.
[0050] As a further preferred embodiment, in step S2, the constraint sensitivity curve CSC(s) is calculated as follows:
[0051]
[0052] Among them, v(s) and a(s) are the velocity limit curve VLC and its acceleration curve respectively, and s represents the stroke.
[0053] According to another aspect of the present invention, a CNC machining speed planning system based on constraint sensitivity is provided, comprising a processor configured to execute the CNC machining speed planning method based on constraint sensitivity.
[0054] In general, the above technical solutions conceived by the present invention have the following technical advantages compared with the existing technology:
[0055] 1. In the existing bidirectional scanning speed planning method, since the bidirectional scanning interval boundary is composed of the VLC trough points, it contains a large number of invalid boundaries. To address this problem, the present invention constructs a constraint sensitivity curve CSC, and divides the bidirectional scanning interval based on the original architecture through CSC, and uses different thresholds to screen the VLC trough points in different risk intervals; specifically, based on the fluctuation of the CSC rate of change curve κ′(s) along the stroke, the stroke is divided into different risk intervals. In the high-risk segment, due to the sudden change of speed or acceleration, the κ′(s) curve fluctuates violently, and it is necessary to check the speed and acceleration accessibility; while in the low-risk segment, the VLC acceleration fluctuation is relatively gentle, and the κ′(s) curve fluctuates less, mainly checking the speed accessibility, thereby achieving rapid screening of VLC trough points, providing more reliable boundary information for subsequent speed planning, and thus improving the efficiency and accuracy of CNC machining speed planning.
[0056] 2. When constructing a transition curve at the intersection of bidirectional scanning curves, existing methods require a trial-and-error method to obtain the transition interval, and the minimum agility curve must be recalculated during each trial-and-error process. To address this issue, the present invention further improves the determination of the transition interval. Specifically, based on the divided bidirectional scanning intervals, the forward and reverse scanning curves are calculated in each single interval and the intersection is checked to see whether the agility constraint is met. For intersections that do not meet the agility constraint, the intervals where the starting points of the transition curves on both sides are located are calculated based on the acceleration change characteristics of the forward and reverse scanning curves. This narrows the interval range, and the critical transition interval is determined and the transition curve is obtained through a bisection method, greatly improving the efficiency of speed planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 Flowchart of a bidirectional scanning speed planning method based on VLC according to an embodiment of the present invention;
[0058] Figure 2 This is a flow chart of bidirectional scanning curve planning based on VLC according to an embodiment of the present invention;
[0059] Figure 3 A flow chart for constructing a transition curve that satisfies agility constraints according to an embodiment of the present invention;
[0060] Figure 4 This is a flow chart of a method for CNC machining speed planning based on constraint sensitivity according to an embodiment of the present invention;
[0061] Figure 5 This is a flow chart of bidirectional scanning interval division based on CSC according to an embodiment of the present invention;
[0062] Figure 6 This is a flow chart of critical transition interval calculation according to an embodiment of the present invention;
[0063] Figure 7 This is a schematic diagram of the first-layer detail coefficients of the wavelet transform according to an embodiment of the present invention;
[0064] Figure 8 This is a schematic diagram of the interval classification results of an embodiment of the present invention;
[0065] Figure 9 This is a flow chart of calculating a bidirectional scanning curve within a single interval according to an embodiment of the present invention;
[0066] Figure 10 This is a schematic diagram of planning within a single bidirectional scanning interval according to an embodiment of the present invention;
[0067] Figure 11 Schematic diagram of a method for determining a transition interval according to an embodiment of the present invention, wherein (a) is a schematic diagram of a critical transition interval, and (b) is a schematic diagram of the principle of determining an initial transition interval;
[0068] Figure 12This is a schematic diagram of the scroll trajectory of an embodiment of the present invention;
[0069] Figure 13 This is a schematic diagram of the interval partitioning method according to an embodiment of the present invention before application;
[0070] Figure 14 This is a schematic diagram after the interval partitioning method according to an embodiment of the present invention is applied;
[0071] Figure 15 This is a comparison diagram of the main motion speed curve of an embodiment of the present invention;
[0072] Figure 16 Schematic diagram of the speed curve of each axis of the machine tool according to the embodiment of the present invention;
[0073] Figure 17 Schematic diagram of acceleration curves of various axes of a machine tool according to an embodiment of the present invention;
[0074] Figure 18 Schematic diagram of the agility curve of each axis of the machine tool according to an embodiment of the present invention. DETAILED DESCRIPTION
[0075] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0076] The existing VLC-based bidirectional scanning speed planning method plans the speed curve along the machining path based on VLC, which includes three key steps: dividing the bidirectional scanning interval, calculating the bidirectional scanning curve, and constructing the transition curve that meets the agility constraint. Figure 1 shown.
[0077] Specifically, first, the bidirectional scanning interval boundary is determined on the travel distance according to the characteristics of VLC; then, the full travel distance is used as the initial bidirectional scanning interval, and the forward and reverse scanning curves are calculated in sequence. Their intersection points are recorded and merged into a bidirectional scanning curve until the bidirectional scanning curve of the entire travel distance is obtained. The calculation process of the bidirectional scanning curve is as follows: Figure 2 Further check whether there is agility exceeding the limit at the intersection point during the bidirectional scanning process, and construct a transition curve that meets the agility constraint at the intersection point by iteration. The calculation process is as follows: Figure 3 Finally, the bidirectional scanning curve is merged with the transition curve that satisfies the agility constraint to obtain the speed planning curve.
[0078] However, since the boundaries of the bidirectional scanning interval are composed of the trough points of the VLC, which contains a large number of invalid boundaries; at the same time, when constructing the transition curve at the intersection of the bidirectional scanning curve, the transition interval needs to be obtained through trial and error. Each trial and error process requires recalculating the minimum agility curve, which reduces the planning efficiency.
[0079] In response to the above problems, an embodiment of the present invention provides a CNC machining speed planning method based on constraint sensitivity, which improves the two core links of bidirectional scanning interval division and transition interval determination based on the original architecture through CSC; Figure 4 As shown, the specific steps include:
[0080] S1. Based on the geometric characteristics and kinematic constraints of the machining path, the maximum feasible feed speed of each stroke position is calculated, the velocity limit curve (VLC) is obtained, and the VLC trough point is determined.
[0081] The specific steps include:
[0082] S11. Analyze kinematic constraints, which include process constraints and physical constraints.
[0083] Process constraints include process speed, acceleration, and agility constraints, as follows:
[0084]
[0085] Among them, v s 、a s 、j s is the speed, acceleration and agility along the stroke, F min 、F max 、A min 、A max 、J min 、J max These are the minimum speed constraint, maximum speed constraint, minimum acceleration constraint, maximum acceleration constraint, minimum agility constraint, and maximum agility constraint along the travel path.
[0086] Physical constraints include the speed, acceleration, and agility constraints of each axis of the machine tool, as follows:
[0087]
[0088] Among them, v i 、a i 、j i Axis Q i Speed, acceleration and agility, V imin 、V imax 、A imin 、A imax 、Jimin 、J imax Axis Q i The minimum speed constraint, maximum speed constraint, minimum acceleration constraint, maximum acceleration constraint, minimum agility constraint and maximum agility constraint.
[0089] S12, taking time optimization as the planning goal, establish a speed planning model that meets the kinematic constraints; then derive a VLC planning model that meets the kinematic constraints, which is a nonlinear planning model. is the planning goal, and the variables are where u s As shown below, v s ,a s ,j s They are the speed, acceleration and agility of the trajectory of the machine tool end controller respectively.
[0090]
[0091] S13. Solve the VLC planning model using a sequential quadratic programming method to obtain the maximum feasible feed speed for each stroke position, obtain the speed limit curve VLC, and determine the VLC trough point.
[0092] S2. Calculate the constraint sensitivity index (CSI) at each stroke position based on the velocity limit curve VLC, and construct a constraint sensitivity curve (CSC) based on its distribution along the stroke. The constraint sensitivity curve can describe the sensitivity of the velocity limit curve to the kinematic constraints.
[0093] Specifically, the constraint sensitivity curve CSC is a curve formed by considering the change rate of the constraint sensitivity CSI along the travel, and its mathematical expression is:
[0094]
[0095] Among them, v(s) and a(s) are the velocity limit curve VLC and its acceleration curve respectively, and s represents the stroke.
[0096] S3. Classify the travel intervals according to the change rate of the constraint sensitivity curve along the travel, and then screen the VLC valley points to obtain the bidirectional scanning interval demarcation points.
[0097] The division method of bidirectional scanning interval is as follows: Figure 5As shown in the figure, this method is mainly based on the constraint sensitivity curve (CSC). First, the travel range is divided into high-risk and low-risk segments based on the fluctuation characteristics of the CSC change rate. The acceleration accessibility and speed accessibility requirements of the VLC trough points within each segment are verified separately. Then, the bidirectional scanning interval boundaries are screened from the VLC trough points.
[0098] The specific steps include:
[0099] S31. Calculate the rate of change of CSC along the travel. The rate of change of CSC along the travel s is denoted as κ'(s), and its mathematical expression is as follows:
[0100]
[0101] S32, using 3-layer discrete wavelet and Mallat algorithm for decomposition, the high-frequency detail coefficients are as follows:
[0102]
[0103] Among them, A0(n) represents the original signal, which is obtained by discrete sampling with equal intervals of κ'(s), n represents the discrete position index of the original signal, n = 1, 2, ..., N, N is the number of discrete sampling points of the original signal; D1(k) represents the first-layer high-frequency detail coefficient, k represents the discrete position index in the first-layer high-frequency detail coefficient, k = 1, 2, ..., N1, where N1 is the number of discrete sampling points of the first-layer high-frequency detail coefficient, and h1 represents the high-pass filter coefficient.
[0104] S33. Calculate threshold is the mean of the absolute values of D1, as follows:
[0105]
[0106] Here, α represents a threshold coefficient. In this embodiment, the threshold coefficient α=2.33, which can better and more accurately reflect the local fluctuation characteristics of κ'(s).
[0107] S34, judging the fluctuation type of the travel segment κ′(s) according to the threshold value; in this embodiment, the first layer detail coefficient of the wavelet transform is as follows: Figure 7 As shown, the interval classification results are as follows Figure 8 As shown:
[0108] (1) When |D1(k)|>T, the trip segment corresponding to this position is determined to be a high-risk segment;
[0109] (2) When |D1(k)|≤T, the travel segment corresponding to this position is determined to be a low-risk segment.
[0110] S35. For high-risk segments, the VLC trough points that satisfy both speed accessibility and acceleration accessibility are used as the demarcation points for the bidirectional scanning intervals; for low-risk segments, the VLC trough points that satisfy speed accessibility are used as the demarcation points for the bidirectional scanning intervals. The details are as follows:
[0111] (1) Division of bidirectional scanning intervals in high-risk segments. Let P i 、P j are the i-th and j-th candidate points (VLC valley points) in the high-risk segment, where i, j∈{1,2,…,n} and i≠j, n is the total number of candidate points in the high-risk segment, and its velocity is v i 、v j , the acceleration is a i 、a j , the travel distance is s i 、s j Without considering the acceleration and agility continuity of the candidate point itself, based on the acceleration constraint A lim , agility constraint J lim For the i-th candidate point P i , assuming that it moves in a straight line, further solve the problem at P j The speed threshold and acceleration threshold that can be reached at the time are calculated as follows:
[0112] (11) Speed threshold calculation method. When the maximum acceleration A is used for uniform acceleration or uniform deceleration linear motion, P j The speed value reaches an extreme value, where |A|=A lim At this time, the relationship between velocity and displacement satisfies the uniform acceleration linear motion formula. When P i Move to P j At this time, the speed v i,j as follows:
[0113]
[0114] Because v i 、v j The size relationship of is unknown, there are two cases:
[0115] i.when v i ≤v j When, A=A lim , substitute it into the above formula and calculate P i Move to P j When P j The minimum speed v i,j- ;
[0116] ii. When v i >v j When, A=-A lim, substitute it into the above formula and calculate P i Move to P j When P j Maximum speed v i,j+ .
[0117] (12) Acceleration threshold calculation method. When the acceleration is constant at the maximum agility J, P j The acceleration value reaches its extreme value, where |J|=J lim According to the Cardan formula method, the following equation is solved to obtain the motion time t:
[0118]
[0119] Substitute t into the following formula to get P j The acceleration a at i,j .
[0120] a i,j =a i +Jt
[0121] Due to a i 、a j The size relationship of is unknown, there are two cases:
[0122] i. When a i ≤a j When J=J lim , substitute it into the above formula and calculate P i Move to P j When P j The minimum acceleration a i,j- ;
[0123] ii. When a i >a j When J=-J lim , substitute it into the above formula and calculate P i Move to P j When P j The maximum acceleration a i,j+ .
[0124] (13) Screening the effective bidirectional scanning interval boundary points in the VLC valley points according to the speed and acceleration thresholds, including the following steps:
[0125] For the candidate point P j , calculate the other candidate points P respectively according to the above methods (11) and (12) i Move to P j The maximum speed and acceleration values that can be reached at this time are used to obtain the minimum speed threshold set Maximum speed threshold set Minimum acceleration threshold set Maximum acceleration threshold set Then we get P j Minimum speed threshold at Maximum speed threshold Minimum acceleration threshold Maximum acceleration threshold
[0126] According to the speed threshold and acceleration threshold, judge P j Whether it satisfies the velocity accessibility and acceleration accessibility, that is, whether it is a valid candidate point. j To be a valid candidate point, the velocity and acceleration conditions in the following formula must be satisfied at the same time; otherwise, the candidate point P j It is definitely not a valid bidirectional scanning interval demarcation point.
[0127]
[0128] According to the above method, other candidate points in the interval are judged in turn to see whether they are valid points, and the valid interval boundary points are formed into a set.
[0129] (2) Division of bidirectional scanning intervals in low-risk segments. Let P i 、P j are the i-th and j-th candidate points in the low-risk segment, where i≠j and i,j∈{1,2,…,n}, n is the total number of candidate points in the low-risk segment, and its VLC speed is v i 、v j , the travel distance is s i 、s j Without considering the continuity of the acceleration of the candidate point itself, based on the acceleration constraint A lim , about P j The speed threshold is calculated as follows:
[0130] (21) Speed threshold calculation method. Calculate the i-th candidate point P i Move to P j The maximum speed v that can be achieved i,j+ or minimum speed v i,j- , and add it to the corresponding speed threshold set:
[0131]
[0132] i.when v i ≤v j When, A=A lim Calculate P according to the above formula i Move to P jWhen P j The minimum speed v i,j- , add it to P j The minimum speed threshold set
[0133] ii. When v i >v j When, A=-A lim Calculate P according to the above formula i Move to P j When P j Maximum speed v i,j+ , add it to P j Maximum speed threshold set
[0134] (22) Screening effective bidirectional scanning interval boundary points in the VLC valley points according to the speed threshold includes the following steps:
[0135] For the candidate point P j , calculate the other candidate points P respectively according to the method in (21) above i Move to P j The speed limit that can be reached when the minimum speed threshold set is obtained Maximum speed threshold set Take the maximum and minimum values of the set respectively and get P j Minimum speed threshold at Maximum speed threshold
[0136] According to the speed threshold, judge P j Whether it satisfies the speed accessibility, that is, whether it is a valid candidate point. j If the condition is not met, then P j It is definitely not a valid bidirectional scanning interval demarcation point.
[0137]
[0138] According to the above method, it is determined in turn whether other candidate points in the interval are invalid points, the invalid points are eliminated from the candidate point set, and the candidate points that meet the conditions are formed into a set.
[0139] S4. Determine a bidirectional scanning curve according to the bidirectional scanning interval demarcation point, and then obtain a speed planning curve.
[0140] The specific steps include:
[0141] S41. Obtain several bidirectional scanning intervals according to the bidirectional scanning interval demarcation points; for any bidirectional scanning interval, calculate its forward and reverse scanning curves respectively, and merge the forward and reverse scanning curves into a bidirectional scanning curve of the bidirectional scanning interval according to their intersection points.
[0142] Specifically, the calculation process of the forward and reverse scanning curves in a single interval is as follows: Figure 9 As shown. Taking the i-th bidirectional scanning interval as an example, its travel interval is See also Figure 10 , the calculation method of the bidirectional scanning curve is as follows:
[0143] (1) When scanning forward, the left boundary of the planning interval For the scanning starting point, calculate the main motion speed of the adjacent points from left to right. During the calculation process, it is necessary to check whether the interval boundary is reached. Or intersect with the VLC curve in the interval (assuming the travel distance at the intersection is ), if any of the above conditions are met, the calculation stops. Take the minimum value of VLC and the calculated result at each stroke.
[0144] (2) When scanning in reverse, the right boundary of the planned interval As the starting point of the scan, calculate the main motion speed of the adjacent points from right to left. Similar to the forward scan, check whether it reaches the interval boundary. Or intersect with the VLC curve in the interval (assuming the travel distance at the intersection is ), if any of the above conditions are met, the calculation stops. Take the minimum value of VLC and the calculated result at each stroke.
[0145] (3) The distance of the intersection of the forward and reverse scanning curves is recorded as Take the forward scanning curve on its left side and the reverse scanning curve on its right side, and the mathematical expression is as follows. The combined bidirectional scanning curve
[0146]
[0147] S42, determining a speed planning curve according to the bidirectional scanning curve, comprising the following steps:
[0148] (1) Determination of acceleration continuity at the intersection of bidirectional scanning curves.
[0149] Assume that the intersection of the forward and reverse scanning curves is P, and its speed is v sp The accelerations of the scanning curves on both sides at this point are a sl 、a sr, point P is on the travel interval (s,s+Δs). If point P satisfies the agility constraint, it is as follows:
[0150]
[0151] After finishing, we can get:
[0152]
[0153] If the intersection of the forward and reverse scanning curves satisfies the above formula, it means that their acceleration is continuous. At this time, the forward and reverse scanning curves can be directly merged as the final bidirectional scanning curve of the current interval; otherwise, a transition curve needs to be constructed.
[0154] (2) Calculation of critical transition curve. To achieve a smooth transition of acceleration at the intersection point within the shortest possible travel distance, a transition interval is determined within its neighborhood. Taking the interval boundary as the starting point and the minimum agility as the goal, the forward and reverse transition curves are planned and merged to form the transition curve at the intersection point.
[0155] Specifically, for the sake of convenience, the transition curve that just satisfies the agility constraint is called the critical transition curve, and the corresponding interval is called the critical transition interval. Figure 11 As shown in (a), the forward and reverse transition curves above are planned using a point on the original forward and reverse scan curves as their starting point. The original forward scan curve is the maximum agility scan curve, with positive acceleration and increasing continuously. The original reverse scan curve is the maximum agility scan curve in the opposite direction, with negative acceleration and decreasing continuously from right to left.
[0156] The critical transition interval calculation method process is as follows Figure 6 As shown in the figure, the maximum transition interval at the intersection is first calculated according to the agility constraint, thereby obtaining the range of the left and right boundaries of the transition curve; the midpoint of the range is used as the initial left and right boundaries, and the forward and reverse transition curves are planned with the minimum agility. The critical transition interval is determined by the binary search method based on the intersection and the agility constraint.
[0157] (21) Determine the position range at both ends of the transition interval.
[0158] like Figure 11 As shown in (b), let the interval of the critical transition curve (transition interval) be [s lm ,s rm ], the two endpoints are L and R, the intersection of the forward and reverse transition curves in the curve is M, and its speed is v sm The acceleration of the point on the forward and reverse scanning curves is a slm 、a srm . Then the transition interval [s lm ,s rm The endpoint ranges on both sides of ] are:
[0159]
[0160] Among them, s c 、s d is the distance corresponding to points C and D on the original forward and reverse scanning curves, and its acceleration a sc 、a sd satisfy:
[0161]
[0162] Then determine the initial positive transition interval (s l1 ,s l2 ), reverse transition interval (s r1 ,s r2 ), where s l1 =s c , s l2 =s r1 =s p , s r2 =s d .
[0163] (22) Based on the initial forward transition interval and reverse transition interval, the transition interval is determined by a binary search method, and the corresponding transition curve is obtained, including:
[0164] (221) The midpoints s of the forward and reverse transition intervals are respectively l =(s l1 +s l2 ) / 2, s r =(s r1 +s r2 ) / 2 as the starting point, and plan the forward and reverse transition curves v with the minimum speed. l 、v r ;
[0165] (222) Determine whether the forward and reverse transition curves have an intersection:
[0166] i. If there is no intersection and the positive transition curve is above, that is, v l (s) <v r (s): This indicates that the left and right endpoints of the transition interval do not match, and the speed of the right endpoint is too small. The reverse transition interval needs to be adjusted. Let s r2 =s r , go to (221);
[0167] ii. If there is no intersection and the positive transition curve is below, that is, v l (s)>v r (s): This indicates that the left and right endpoints of the transition interval do not match, and the speed of the left endpoint is too small. The forward transition interval needs to be adjusted. Let sl1 =s l , go to (221);
[0168] iii. If there is an intersection and the agility judgment condition is not met: it means that the speed values of the left and right endpoints of the transition interval are basically matched, but the interval length is not enough to complete the acceleration speed change. The transition interval needs to be expanded to both sides. Let s l1 =s l1 -2Δs,s r2 =s r2 +2Δs, go to (221);
[0169] iv. If there is an intersection and the agility constraint is met: the current transition interval satisfies the agility constraint, the transition interval is obtained, and the current forward and reverse transition curves are merged into a transition curve.
[0170] The method of planning the forward and reverse transition curves with minimum agility is similar to the solution of the forward and reverse scanning curves. The speed planning model that meets the kinematic constraints takes the optimal time as the planning goal. The optimization goal can be converted into the following formula, where u s is the ratio of agility to speed. In the previous solution of the forward and reverse scanning curves, in order to make v s As large as possible, with maximum agility j s Planning, that is, u in the formula s Take the maximum value; when solving the forward and reverse transition curves, in order to satisfy the agility constraint at the intersection, the agility j s As small as possible, that is, u in the formula s Take the minimum value to determine the speed v at the current travel position s .
[0171]
[0172]
[0173] (3) Merging the forward and reverse scanning curves with the transition curve to obtain the bidirectional scanning curve of the bidirectional scanning interval; merging the bidirectional scanning curves of each bidirectional scanning interval to obtain the speed planning curve of the entire stroke.
[0174] The following are specific embodiments:
[0175] Choose Figure 12 The scroll trajectory shown is used as an example, and the kinematic constraints are set as shown in Table 1. First, the VLC for this case is calculated. Then, velocity planning curves are generated using a VLC-based bidirectional sweep velocity planning algorithm and a CSC-assisted bidirectional sweep velocity planning algorithm. To distinguish them, the following terms Method 1 and Method 2 refer to these two methods, respectively.
[0176] Table 1 Kinematic parameters
[0177]
[0178] Comparison before and after the application of the bidirectional scanning interval division method Figure 13 、 Figure 14 As shown, it can be seen that the number of bidirectional scanning intervals in method 2 is significantly reduced compared with the bidirectional scanning intervals in method 1.
[0179] A quantitative analysis was further conducted based on the evaluation indicators of the bidirectional scanning interval. The evaluation indicators include precision P, recall R, and comprehensive index F. Among them, the precision P is the proportion of valid points in the bidirectional scanning interval demarcation points, which is used to measure the accuracy of the bidirectional scanning interval division method. A higher accuracy can provide more reliable boundary information for subsequent speed planning. The recall R is the proportion of valid points that are successfully predicted. A higher recall rate can enable the subsequent speed planning process to consider as many key demarcation points as possible, avoiding unreasonable speed planning problems caused by missing demarcation points. The comprehensive index F is the harmonic mean of the precision P and recall R, which is used to comprehensively evaluate the effectiveness of the algorithm. The harmonic mean can effectively balance the impact of the two indicators on the algorithm effectiveness and is particularly suitable for evaluation scenarios that need to consider multiple dimensions simultaneously.
[0180] The evaluation index results of the two methods are shown in Table 2. It can be seen that all indicators are improved in the bidirectional scanning interval divided by Method 2.
[0181] Table 2 Evaluation indicators of bidirectional scanning interval
[0182]
[0183] Based on the existing VLC data, the planning time of Method 1 and Method 2 are 120452ms and 41293ms respectively. Among them, the bidirectional scanning interval division method proposed in this chapter takes 14ms. The main motion speed curve obtained by planning is shown in the figure below. Figure 15 As shown in the figure, we can see that the main motion speed curves of the two methods are basically the same. At the same time, the processing time of the two speed curves is 7100ms and 7086ms respectively, which is also basically the same.
[0184] The comparison of the speed, acceleration and agility curves of each axis of the machine tool are as follows: Figure 16 、 Figure 17 、 Figure 18 As shown, it can be seen that the velocity curves, accelerations, and agility of each axis of Method 1 and Method 2 all meet the constraints.
[0185] Compared with the VLC-based bidirectional scanning speed planning method, the proposed method effectively reduces the number of bidirectional scanning intervals by 91.7% and improves the indicators from 6.6% and 12.5% to 78.3% and 86.8% respectively. In terms of planning efficiency, while ensuring that the speed curve processing efficiency is basically consistent with the kinematic constraints, the proposed method shortens the planning time from 120451ms to 41293ms, improving planning efficiency by 65.7%. This verifies the effectiveness of the bidirectional scanning interval division method proposed in this chapter.
[0186] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A CNC machining speed planning method based on constraint sensitivity, characterized in that: The steps include: S1. According to the kinematic constraints of CNC machining, the maximum feasible feed speed of each stroke position is calculated, the speed limit curve VLC is obtained, and the VLC trough point is determined; S2. Calculate the constraint sensitivity of each stroke position according to the velocity limit curve VLC to obtain a constraint sensitivity curve, which is used to describe the sensitivity of the velocity limit curve to the kinematic constraints; S3. Based on the rate of change of the constraint sensitivity curve along the trip, the trip interval exceeding the fluctuation threshold is divided into a high-risk segment, and the rest is divided into a low-risk segment; For high-risk segments, the VLC trough point that satisfies both the speed threshold and the acceleration threshold is used as the demarcation point of the bidirectional scanning interval; for low-risk segments, the VLC trough point that satisfies the speed threshold is used as the demarcation point of the bidirectional scanning interval; S4. Determine a bidirectional scanning curve according to the bidirectional scanning interval demarcation point, and then obtain a speed planning curve.
2. The NC machining speed planning method based on constraint sensitivity according to claim 1, characterized in that: Step S3, dividing the high-risk segment into the low-risk segment, includes the following steps: The high-frequency detail coefficient is calculated according to the rate of change of the constraint sensitivity curve along the stroke. The calculation formula is as follows: Wherein, κ'(s) represents the rate of change of the constrained sensitivity curve along the stroke, CSC(s) represents the constrained sensitivity curve, and s represents the stroke; A0(n) represents the original signal, which is obtained by discrete sampling of κ'(s) at equal intervals, and n represents the discrete position index of the original signal, n = 1, 2, ..., N, where N is the number of discrete sampling points of the original signal; D1(k) represents the first-layer high-frequency detail coefficient, k represents the discrete position index in the first-layer high-frequency detail coefficient, k = 1, 2, ..., N1, where N1 is the number of discrete sampling points of the first-layer high-frequency detail coefficient, and h1 represents the high-pass filter coefficient; The fluctuation threshold T is determined according to the high-frequency detail coefficient, and the calculation formula is as follows: Among them, α represents the threshold coefficient; The travel interval is divided into high-risk and low-risk segments based on the fluctuation threshold T: If |D1(k)|>T, the travel interval corresponding to the discrete point k is determined to be a high-risk section; If |D1(k)|≤T, the travel interval corresponding to the discrete point k is determined to be a low-risk segment.
3. The NC machining speed planning method based on constraint sensitivity according to claim 1, characterized in that: Step S3: For the trough point in the high-risk segment / low-risk segment, the speed threshold is determined as follows: For the i-th and j-th valley points P in the same segment i 、P j ,have: Among them, s i 、s j Respectively represent the i-th and j-th trough point travel, v i Indicates the speed corresponding to the i-th valley point in VLC; Let acceleration A = ±A lim And respectively into the above formula, the corresponding v i,j As P i Move to P j The maximum and minimum speeds that can be achieved when A lim is the absolute value of the maximum acceleration; Then for the j-th trough point P j , calculate the distance from other trough points in the same segment to P j The maximum speed and minimum speed that can be achieved at this time are selected, and the minimum value of the maximum speed and the maximum value of the minimum speed are selected to form the trough point P j speed threshold.
4. The method for CNC machining speed planning based on constraint sensitivity according to claim 1, wherein: Step S3: For the trough point in the high-risk segment, the acceleration threshold is determined as follows: For the i-th and j-th trough points P in the high-risk segment i 、P j ,have: the i,j =the i +Jt Among them, a i represents the acceleration corresponding to the i-th trough point in VLC, and t represents P i to P j exercise time; Let the agility J = ±J lim And respectively into the above formula, the corresponding a i,j As the maximum acceleration and minimum acceleration of the j-th trough point, J lim is the absolute value of the maximum agility; Then for the j-th trough point P j , calculate the distance from each trough point in the high-risk segment to P j The maximum acceleration and minimum acceleration that can be achieved at this time, and the minimum value of the maximum acceleration and the maximum value of the minimum acceleration are selected to form the trough point P j acceleration threshold.
5. The method for CNC machining speed planning based on constraint sensitivity according to claim 1, wherein: Step S4, determining a bidirectional scanning curve according to the bidirectional scanning interval demarcation point, includes: Several bidirectional scanning intervals are obtained according to the bidirectional scanning interval demarcation points; for any bidirectional scanning interval, with the goal of maximizing agility, its forward and reverse scanning curves are planned respectively, and the forward and reverse scanning curves are merged into the bidirectional scanning curve of the bidirectional scanning interval according to their intersection points.
6. The method for CNC machining speed planning based on constraint sensitivity according to claim 5, wherein: Step S4, determining a speed planning curve according to the bidirectional scanning curve, includes: For any bidirectional scanning interval: If the intersection point P of the forward and reverse scanning curves satisfies the agility constraint, the forward and reverse scanning curves are directly merged as the bidirectional scanning curve of the bidirectional scanning interval; Otherwise, a transition interval is determined in the neighborhood of the intersection point P, and a transition curve that just satisfies the agility constraint is constructed in the transition interval. The transition curve is merged with the remaining bidirectional scanning curves to obtain the bidirectional scanning curve of the bidirectional scanning interval. The bidirectional scanning curves of each bidirectional scanning interval are merged to form the speed planning curve of the entire stroke.
7. The method for CNC machining speed planning based on constraint sensitivity according to claim 6, wherein: The agility constraint is expressed as: Among them, P is the intersection of the forward and reverse scanning curves, and its corresponding stroke is s p , the speed is v sp , a sl 、a sr represents the acceleration of the forward and reverse scanning curves at the intersection P, Δs represents the travel difference between two adjacent positions, J max Indicates maximum agility.
8. The method for CNC machining speed planning based on constraint sensitivity according to claim 7, wherein: Step S4: The method for constructing the transition curve is: The transition interval includes a forward transition interval and a reverse transition interval. The initial forward transition interval (s c , s p ), reverse transition interval (s p , s d ); where s p is the travel distance of the forward and reverse scanning curves at the intersection point P; s c 、s d is the distance corresponding to points C and D on the forward and reverse scanning curves, and the acceleration a of points C and D sc 、a sd satisfy: Based on the initial forward transition interval and reverse transition interval, a final transition interval is determined by a binary search method, so that the corresponding forward transition curve and reverse transition curve have an intersection point, and the intersection point satisfies the agility constraint; the forward transition curve and reverse transition curve are respectively planned with the minimum agility as the goal, starting from the two ends of the transition interval; The forward transition curve and the reverse transition curve corresponding to the final transition interval are merged to obtain a transition curve.
9. The method for CNC machining speed planning based on constraint sensitivity according to any one of claims 1 to 8, wherein: In step S2, the constraint sensitivity curve CSC(s) is calculated as follows: Among them, v(s) and a(s) are the velocity limit curve VLC and its acceleration curve respectively, and s represents the stroke.
10. A CNC machining speed planning system based on constraint sensitivity, characterized in that: The method comprises a processor configured to execute the CNC machining speed planning method based on constraint sensitivity according to any one of claims 1 to 9.