A time-optimal feed rate planning method for multi-axis CNC machine tools
Through the simulated annealing and mode search alternating optimization algorithm, the feed speed of multi-axis CNC machine tools is planned, which solves the problems of low computing efficiency and insufficient time optimization in the prior art, and achieves more efficient time optimal feed speed planning, which significantly shortens processing time.
Patent Information
- Application Number
- CN202510663794.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-22
AI Technical Summary
The feed speed planning method of existing multi-axis CNC machine tools has shortcomings in computing efficiency and time optimization, especially the calculation efficiency based on group intelligence algorithms is low and it is difficult to achieve global optimization.
The optimization algorithm that simulates the alternation of annealing and mode search is used to uniformly segment the NURBS tool trajectory curve, and the speed is described using the B-spline curve. The tool speed curve is alternately optimized through simulated annealing optimization and mode search, and combined with the optimization of the connection area of adjacent segments, a time optimal feed speed curve is generated.
The calculation efficiency is improved, and the generated feed speed curve reaches global optimization in time, shortens processing time, and improves smoothness and saturation, which reduces the calculation time by 60% compared to the method based on group intelligence algorithm.
Smart Images

Figure CN120196054B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a time-optimal feed speed planning method for a multi-axis CNC machine tool, belonging to the technical field of CNC machining. Background Art
[0002] In high-speed, high-precision CNC machining, feedrate planning methods that consider geometric constraints and high-order drive constraints are crucial for improving machining efficiency and reducing machining time. Optimizing the feedrate control method for machine tool tools within existing machining methods and implementing a time-optimal feedrate planning approach can significantly improve production efficiency without increasing costs, and is often considered a more competitive option than developing new machining methods and technologies.
[0003] Currently, popular feed rate planning methods include forward-looking algorithms and optimization-based algorithms. The former pre-processes a small section of the tool trajectory to detect sudden changes in the feed motion, thereby ensuring that the feed rate has sufficient distance to decelerate without violating constraints. However, it requires frequent backtracking, which reduces computational efficiency, and the planned feed rate is not time-optimal. The latter optimizes the speed curve through optimization methods such as heuristic algorithms and non-heuristic algorithms. However, the algorithm's optimization ability is often a challenge, and convergence is even an issue when solving feed rate planning problems with high-order constraints. In addition, the algorithm's computational efficiency is also a key issue worthy of attention. Swarm intelligence-based algorithms, such as particle swarm optimization, genetic algorithms, and their variants, rely on the characteristics of population evolution, which leads to widespread redundant calculations and greatly reduces computational efficiency.
[0004] Therefore, a time-optimal feed rate planning method for multi-axis CNC machine tools is urgently needed. Summary of the Invention
[0005] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a time-optimal feed rate planning method for multi-axis CNC machine tools. The method adopts an optimization algorithm that alternates simulated annealing and pattern search to achieve time-optimal feed rate planning, thereby improving computational efficiency while ensuring the efficiency and accuracy of CNC machining.
[0006] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0007] In one aspect, the present invention provides a time-optimal feed rate planning method for a multi-axis CNC machine tool, comprising:
[0008] Obtain NURBS tool path curves for multi-axis CNC machine tools;
[0009] Evenly segment the NURBS tool path curve to obtain multiple NURBS tool path segments;
[0010] The feed rate of each NURBS tool path segment is described using B-spline curves to obtain multiple tool speed curves;
[0011] The control point arrangement of the tool speed curve is used as the optimization variable, and the feed speed of multiple tool speed curves is optimized to obtain multiple optimized tool speed curves;
[0012] Connect multiple optimized tool speed curves in sequence, optimize the feed speed in the connection area of two adjacent optimized tool speed curves, and obtain the time-optimal feed speed curve of the multi-axis CNC machine tool;
[0013] The feed speed optimization is achieved by alternating multiple rounds of simulated annealing optimization algorithm and pattern search optimization algorithm.
[0014] Furthermore, the NURBS tool path segments are obtained by evenly dividing the segments based on the number of nodes of the NURBS tool path curve.
[0015] Furthermore, the expression of the tool speed curve is:
[0016] ;
[0017] in, Represents the tool speed curve, m represents the number of control points of the tool speed curve, V i represents the i-th control point, Indicates that the node vector is defined k-order B-spline basis function on the NURBS tool path segment, k represents the degree of the NURBS tool path segment, A parameterized variable representing the tool velocity profile.
[0018] Furthermore, the feed speed optimization method specifically includes:
[0019] S1, initialize tool speed curve;
[0020] S2, using the control point arrangement of the tool speed curve as the optimization variable, using the simulated annealing optimization algorithm to optimize the feed speed of the tool speed curve to obtain an optimized tool speed curve;
[0021] S3, using the control point arrangement of the primary optimized tool speed curve as the optimization variable, and using the pattern search optimization algorithm to optimize the feed speed to obtain the secondary optimized tool speed curve;
[0022] S4, using the control point arrangement of the quadratic optimized tool speed curve as an optimization variable, repeating S2 to S4 alternately for multiple rounds of simulated annealing optimization algorithm and pattern search optimization algorithm until the difference between the objective function value of the control point arrangement of the quadratic optimized tool speed curve obtained in the current round and the objective function value of the control point arrangement of the quadratic optimized tool speed curve obtained in the previous round is less than a preset threshold, thereby obtaining a preliminary optimized speed curve;
[0023] S5. Refine the node vector of the preliminary optimized speed curve, and repeat S2 to S5 to optimize the control point arrangement until the difference between the objective function value of the control point arrangement of the preliminary optimized speed curve after the current node vector is refined and the objective function value of the control point arrangement of the preliminary optimized speed curve before the current node vector is refined is less than a preset threshold, thereby obtaining an optimized speed curve.
[0024] Furthermore, the control point arrangement of the tool speed curve is used as an optimization variable, and the feed speed of the tool speed curve is optimized using a simulated annealing optimization algorithm to obtain an optimized tool speed curve, including:
[0025] A. Randomly perturb the control point arrangement of the tool velocity curve to obtain a new control point arrangement;
[0026] B. Calculate the probability of using the new control point arrangement as the current control point arrangement. The expression is as follows:
[0027] ;
[0028] ;
[0029] in, Indicates arranging the j+1th control point As the probability of the current control point arrangement, represents the objective function value of the j-th control point arrangement, represents the objective function value of the j+1th control point arrangement, Indicates the temperature at the current iteration number, represents the initial temperature, represents the control decay rate constant, Indicates the current iteration number;
[0030] The initial temperature in each iteration process decreases gradually according to the decay rate;
[0031] C. Get the current control point arrangement based on probability, repeat A to C until the maximum number of iterations is reached, and obtain an optimized tool speed curve.
[0032] Furthermore, the control point arrangement of the primary optimized tool speed curve is used as an optimization variable, and the feed speed is optimized using a pattern search optimization algorithm to obtain a secondary optimized tool speed curve, including:
[0033] a. Obtain a preset initial search grid size and a positive definite expansion set, where the expression of the positive definite expansion set is , where d represents the direction vector of the control point arrangement, and n represents the direction dimension;
[0034] b. Taking the control point arrangement of the optimized tool speed curve as the current control point arrangement, and calculating the objective function value of the current control point arrangement;
[0035] c. Search the current control point arrangement in the direction of a random part of the positive definite expansion set, and calculate the objective function value of the control point arrangement after the search;
[0036] If the objective function value of the searched control point arrangement is greater than the objective function value of the current control point arrangement, then traverse all remaining directions in the positive definite expansion set. If a control point arrangement with a smaller objective function value is still not found, then shrink the step size and repeat c until the grid threshold or the maximum number of iterations is reached. The current control point arrangement is used as the secondary optimization tool speed curve.
[0037] If the objective function value of the changed control point arrangement is less than the objective function value of the current control point arrangement, the searched control point arrangement is used as the current control point arrangement, and c is repeated until the grid threshold or the maximum number of iterations is reached to obtain the secondary optimized tool speed curve.
[0038] Furthermore, the maximum number of iterations of the simulated annealing optimization algorithm and the pattern search optimization algorithm in each round is determined by a progressive iteration number reduction strategy, and the expression of the progressive iteration number reduction strategy is:
[0039] ;
[0040] in, represents the maximum number of iterations of the simulated annealing optimization algorithm or pattern search optimization algorithm in the i-th round, represents the attenuation factor, Indicates the maximum number of iterations of the simulated annealing optimization algorithm or the pattern search optimization algorithm in the i+1th round.
[0041] Furthermore, the objective function is expressed as:
[0042] ;
[0043] ;
[0044] ;
[0045] in, represents the objective function, Indicates the total tool running time, represents the weight of the total tool running time, Represents the sum of the excess tolerance of the tool speed curve, Indicates the current running time of the tool. represents the arc length of the tool velocity curve, A parameterized variable representing the tool velocity profile, The arc length of the tool velocity curve is represented by the parameterized variable The differential of represents the tool speed curve, represents the number of constraints of the objective function, Indicates the number of monitoring points of the tool speed curve, represents the excess amount of the NURBS tool path segment at the jth monitoring point under the i-th constraint condition, It represents the maximum allowable excess under the i-th constraint condition. The excess is the amount that exceeds the allowable value. Its calculation method is the existing technology and will not be described in detail here.
[0046] Furthermore, the objective function is provided with constraints, which are divided into linear constraints and nonlinear constraints. The linear constraints include chord error constraints, speed constraints, and speed constraints of each axis in a multi-axis CNC machine tool. The linear constraints are expressed as follows:
[0047] ;
[0048] in, Indicates speed, Indicates the maximum speed, represents the interpolation period, Indicates the interpolation period The maximum value of the lower chord error, Indicates the center axis of a multi-axis CNC machine tool speed, Indicates the center axis of a multi-axis CNC machine tool Maximum speed;
[0049] The nonlinear constraint conditions include acceleration constraint, jerk constraint, acceleration constraint of each axis in a multi-axis CNC machine tool, and jerk constraint of each axis in a multi-axis CNC machine tool. The expression of the nonlinear constraint conditions is:
[0050] ;
[0051] ;
[0052] ;
[0053] ;
[0054] ;
[0055] ;
[0056] ;
[0057] ;
[0058] in, represents acceleration, Indicates speed, represents the first-order differential of velocity, Represents the first-order differential of the arc length of the tool velocity curve, The second-order differential of the arc length representing the tool velocity curve, Indicates the maximum acceleration, represents the acceleration, represents the second-order differential of velocity, Indicates the maximum acceleration value, Indicates the center axis of a multi-axis CNC machine tool The acceleration of Indicates the center axis of a multi-axis CNC machine tool The maximum acceleration, Indicates the center axis of a multi-axis CNC machine tool The acceleration of Indicates the center axis of a multi-axis CNC machine tool The maximum value of the acceleration, ~ Represents a constant parameter, Indicates the center axis of a multi-axis CNC machine tool The first derivative of the arc length of the tool velocity curve, Indicates the center axis of a multi-axis CNC machine tool The second derivative of the arc length of the tool velocity curve, Indicates the center axis of a multi-axis CNC machine tool The third derivative of the arc length of the tool velocity curve.
[0059] Furthermore, the left and right endpoints of the connection area of the two adjacent optimized tool speed curves are obtained by calculation, and the calculation expression is as follows:
[0060] ;
[0061] in, represents the left endpoint of the connected region, represents the right endpoint of the connected region, Indicates the connection point of the two adjacent optimized tool speed curves. Indicates the connection point of the previous two adjacent optimized tool speed curves, Indicates the connection point of the next two adjacent optimized tool speed curves.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] The present invention first performs node uniform segmentation on the NURBS tool trajectory and then uses B-spline curves to represent the speed curve of each segment. The optimization method is to first perform parallel optimization on each segment and then perform parallel optimization on the connection area of adjacent segments, thereby improving the computational efficiency. The simulated annealing optimization algorithm and the pattern search optimization algorithm are alternately used in multiple rounds to achieve feed speed optimization. The pattern search optimization algorithm stably converges to the regional optimal value. Moreover, due to this staggered structure, the algorithm is given better global search capabilities, thereby being able to jump out of the local optimal trap and prevent the algorithm from converging to the local optimal value too early, ultimately achieving the global optimal processing time. Compared with the swarm intelligence algorithm based on population, the optimization time is greatly shortened while improving the processing efficiency. The smoothness and saturation of the generated time-optimal feed speed curve are also improved.
[0064] When optimizing the connection areas of adjacent segments, the present invention sets overlapping parts between adjacent optimized connection areas, so that the algorithm has the ability to take into account the neighborhood, so that the final feed speed curve has better time optimality.
[0065] The present invention extracts common factors from the expressions of constraint conditions, greatly reducing the number of multiplications in evaluating each constraint and further improving computational efficiency.
[0066] The proposed interleaved simulated annealing-pattern search algorithm offers significant computational time advantages over population-based swarm intelligence algorithms, such as particle swarm optimization (PSO), genetic algorithms, and their variants. In the following examples, the computation time is less than 60% of that of population-based algorithms. This algorithm optimizes individual components, requiring fewer objective function evaluations to obtain a time-optimal feedrate profile. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 1 is a flow chart of a method for planning the time-optimal feed rate of a multi-axis CNC machine tool according to an embodiment of the present invention;
[0068] Figure 2 A flow chart of a speed optimization method for a time-optimal feed rate planning method for a multi-axis CNC machine tool according to an embodiment of the present invention;
[0069] Figure 3 Schematic diagram of a three-dimensional tool trajectory curve in the shape of a leaf in Example 1 of the present invention;
[0070] Figure 4 This is a schematic diagram of a time-optimal feed rate curve generated in Example 1 of the present invention;
[0071] Figure 5 Schematic diagram of the comparison of chord error constraints of the time-optimal feed rate curve generated in Example 1 of the present invention;
[0072] Figure 6 Schematic diagram of acceleration constraint comparison of the time-optimal feed rate curve generated in Example 1 of the present invention;
[0073] Figure 7 Schematic diagram of jerk constraint comparison of the time-optimal feed rate curve generated in Example 1 of the present invention;
[0074] Figure 8 This is a schematic diagram comparing the time-optimal feed rate curve generated in Example 1 of the present invention with respect to the speed constraints of each axis of the machine tool;
[0075] Figure 9 This is a schematic diagram comparing the acceleration constraints of each axis of the machine tool corresponding to the time-optimal feed rate curve generated in Example 1 of the present invention;
[0076] Figure 10 This is a schematic diagram comparing the jerk constraints of each axis of the machine tool corresponding to the time-optimal feedrate curve generated in Example 1 of the present invention;
[0077] Figure 11 Schematic diagram of a three-dimensional tool trajectory curve in the shape of a thousand paper cranes in Example 2 of the present invention;
[0078] Figure 12 This is a schematic diagram of a time-optimal feed rate curve generated in Example 2 of the present invention;
[0079] Figure 13 Schematic diagram of comparison of chord error constraints of the time-optimal feed rate curve generated in Example 2 of the present invention;
[0080] Figure 14 Schematic diagram of acceleration constraint comparison of the time-optimal feed rate curve generated in Example 2 of the present invention;
[0081] Figure 15 Schematic diagram of the comparison of jerk constraints of the time-optimal feed rate curve generated in Example 2 of the present invention. DETAILED DESCRIPTION
[0082] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.
[0083] Example 1:
[0084] like Figure 1 As shown, an embodiment of the present invention provides a time-optimal feed rate planning method for a multi-axis CNC machine, which specifically includes the following steps:
[0085] Obtain the NURBS (non-uniform rational spline) tool path curve of the multi-axis CNC machine tool. In this embodiment, the NURBS tool path curve of the multi-axis CNC machine tool is as follows: Figure 3 The three-dimensional tool path curve of the leaf shape is shown.
[0086] The control point vectors for this curve include:
[0087] [(73.1210, -4.0764, 7.0783), (61.5924, 15.7962, -7.2203), (52.4841,44.3312, -14.0482), (52.4841, 52.9936, -10.5441), (49.3631, 37.1975, -15.0000), (40.1911, 23.9490, -11.8411), (31.5287, 13.5032, -5.6688),(28.7261, 9.4268, -2.7404), (29.4904, 19.8726, -9.7321), (22.1019, 32.1019, -14.5213), (11.1465, 31.5924, -14.4208), (7.5796, 29.0446, -13.7796),(11.9108, 38.4713, -14.9682), (-3.1210, 41.7834, -14.6024), (-10.2548,42.5478, -14.4606), (-6.1783, 47.3885, -13.0837), (-21.7197, 48.4076, -12.6931), (-30.1274, 47.6433, -12.9892), (-17.3885, 52.4841, -10.8125),(6.3057, 60.8917, -5.6281), (0.1911, 62.6752, -4.3675), (-12.9936, 74.9045,4.6618), (-36.2420, 75.9236, 5.3819), (-23.1847, 77.1975, 6.2622), (-15.3503,88.9172, 12.7553), (-23.5032, 99.6178, 14.9973), (-20.7006, 111.3376,12.6537), (-30.8280, 123.3121, 5.9129), (-19.3631, 119.2357, 8.5809),(1.0191, 112.8662, 12.0017), (10.9554, 117.1975, 9.7880), (23.1210, 104.4586,14.6288), (17.3248, 117.1975, 9.7880), (33.1210, 153.8854, -13.5241),(39.7452, 168.6624, -14.3671), (40.5096, 163.0573, -14.9990), (57.5159,143.4395, -8.4842), (60.3822, 149.5541, -11.8141), (67.7707, 122.5478,6.4353), (68.2166, 108.5350, 13.6547), (75.4140, 125.6051, 4.2971), (86.8790,134.7771, -2.5090), (88.0892, 129.4268, 1.4894), (94.7134, 135.5414, -3.0722), (101.9108, 148.0255, -11.0738), (107.5159, 153.3758, -13.3544),(109.2357, 135.0318, -2.6972), (112.0382, 124.5860, 5.0235), (108.5350,97.8344, 14.9122), (129.6178, 103.6943, 14.7448), (135.7325, 105.4777,14.4409), (125.5414, 98.0892, 14.9316), (129.9363, 93.7580, 14.2754),(104.4586, 78.9809, 7.4511), (94.7771, 74.1401, 4.1136), (117.4522, 74.6497,4.4798), (116.1783, 67.0064, -1.1821), (126.8790, 67.7707, -0.6099),(133.5032, 61.1465, -5.4505), (142.4204, 59.1083, -6.8439), (127.8981,57.3248, -8.0054), (104.2038, 45.8599, -13.6057), (111.3376, 38.2166, -14.9794), (98.5987, 42.8025, -14.4087), (84.3312, 46.1146, -13.5241),(84.5860, 30.3185, -14.1289), (93.5032, 22.6752, -11.2310), (56.8153,43.0573, -14.3544), (50.7006, 56.0510, -8.7966), (59.6178, 28.7898, -13.7030), (75.6688, 5.3503, 0.3014), (78.7261, 4.3312, 1.0649), (73.1210, -4.0764, 7.0783)].
[0088] The weight vector includes:
[0089] [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
[0090] The node vector includes:
[0091] [0,0,0,0,0.0143,0.0286,0.0429,0.0571,0.0714,0.0857,0.1000,0.1143,0.1286,0.1429,0.1571,0.1714,0.1857,0.2000,0.2143,0.2286,0.2429,0. 2571, 0.2714, 0.2857, 0.3000, 0.3143, 0.3286, 0.3429, 0.3571, 0.3714, 0.3857, 0.4000, 0.4143, 0.4286, 0.4429, 0.4571, 0.4714, 0.4857, 0.5000, 0.5143 , 0.5286, 0.5429, 0.5571, 0.5714, 0.5857, 0.6000, 0.6143, 0.6286, 0.6429, 0.6571, 0.6714, 0.6857, 0.7000, 0.7143, 0.7286, 0.7429, 0.7571, 0.7714, 0.7 857, 0.8000, 0.8143, 0.8286, 0.8429, 0.8571, 0.8714, 0.8857, 0.9000, 0.9143, 0.9286, 0.9429, 0.9571, 0.9714, 0.9857, 1.0000, 1.0000, 1.0000, 1.0000]
[0092] The NURBS tool path curve is evenly segmented based on the number of nodes of the NURBS tool path curve to obtain multiple NURBS tool path segments.
[0093] The feed rate of each NURBS tool path segment is described by using B-spline curve to obtain multiple tool speed curves. The expression of the B-spline curve of the tool speed curve is:
[0094] ;
[0095] in, Represents the tool speed curve, m represents the number of control points of the tool speed curve, V i represents the i-th control point, Indicates that the node vector is defined k-order B-spline basis function on the NURBS tool path segment, k represents the degree of the NURBS tool path segment, A parameterized variable representing the tool velocity profile.
[0096] The control point arrangement of the tool speed curve is used as the optimization variable, and multiple tool speed curves are optimized for feed speed respectively to obtain multiple optimized tool speed curves. The feed speed optimization adopts simulated annealing optimization algorithm and pattern search optimization algorithm in multiple rounds, such as Figure 2 As shown, the specific process is as follows:
[0097] S1, initialize the tool velocity curve with sparse node vectors and control point vectors;
[0098] S2. Using the control point arrangement of the tool speed curve as the optimization variable, the simulated annealing optimization algorithm is used to optimize the feed speed of the tool speed curve to obtain an optimized tool speed curve. Specifically:
[0099] A. Randomly perturb the control point arrangement of the tool velocity curve to obtain a new control point arrangement;
[0100] B. Calculate the probability of using the new control point arrangement as the current control point arrangement. The expression is as follows:
[0101] ;
[0102] ;
[0103] in, Indicates the probability of taking the j+1th control point arrangement as the current control point arrangement, represents the objective function value of the j-th control point arrangement, represents the objective function value of the j+1th control point arrangement, Indicates the temperature at the current iteration number, represents the initial temperature, represents the control decay rate constant, Indicates the current iteration number;
[0104] It should be noted that the initial temperature in each iteration process gradually decreases according to the decay rate, and in this embodiment, the decay rate is 0.9.
[0105] C. Get the current control point arrangement based on probability, repeat A to C until the maximum number of iterations is reached, and obtain an optimized tool speed curve.
[0106] S3. Using the control point arrangement of the primary optimized tool speed curve as the optimization variable, the feed speed is optimized using the pattern search optimization algorithm to obtain the secondary optimized tool speed curve. Specifically:
[0107] a. Preset the initial grid size and positive definite expansion set. The expression of the positive definite expansion set is , where d represents the direction vector of the control point arrangement, such as , the elements of the direction vector correspond one to one with the control points, and n represents the direction dimension;
[0108] b. Taking the control point arrangement of the optimized tool speed curve as the current control point arrangement, and calculating the objective function value of the current control point arrangement;
[0109] c. Search the current control point arrangement in the direction of a random part of the positive definite expansion set, and calculate the objective function value of the control point arrangement after the search;
[0110] If the objective function value of the changed control point arrangement is greater than the objective function value of the current control point arrangement, all remaining directions in the positive definite expansion set are traversed. If a control point arrangement with a smaller objective function value is still not found, the step size is reduced and c is repeated until the grid size threshold or the maximum number of iterations is reached. The current control point arrangement is used as the secondary optimization tool speed curve.
[0111] If the objective function value of the changed control point arrangement is less than the objective function value of the current control point arrangement, the searched control point arrangement is used as the current control point arrangement, and step c is repeated to obtain a secondary optimized tool speed curve.
[0112] S4, using the control point arrangement of the quadratic optimized tool speed curve as an optimization variable, repeating S2 to S4 alternately for multiple rounds of simulated annealing optimization algorithm and pattern search optimization algorithm until the objective function difference between the control point arrangement of the quadratic optimized tool speed curve obtained in the current round and the control point arrangement of the quadratic optimized tool speed curve obtained in the previous round is less than a preset threshold, thereby obtaining a preliminary optimized speed curve;
[0113] S5, refine the node vector of the preliminary optimized speed curve, and repeat S2 to S5 to optimize the control point arrangement until the difference between the objective function value of the control point arrangement of the preliminary optimized speed curve after the current node vector is refined and the objective function value of the control point arrangement of the preliminary optimized speed curve before the current node vector is refined is less than the preset threshold , and get the optimized speed curve.
[0114] The node vector is refined by inserting nodes into the node vector. , and the control point vector on k Sub-B-spline curve v ( u ), a new node Knot vectors to insert into the B-spline curve U The new node vector is and control point vectors for:
[0115] ;
[0116] in, is any natural number. In order to keep the shape of the B-spline curve unchanged, the new control point vector The method for determining is:
[0117] ;
[0118] Among them, the coefficient Calculate using the following formula:
[0119] ;
[0120] The expression of the objective function used in the above optimization algorithm is:
[0121] ;
[0122] ;
[0123] ;
[0124] in, represents the objective function, Indicates the total tool running time, represents the weight of the total tool running time, Represents the sum of the excess tolerance of the tool speed curve, Indicates the current running time of the tool. represents the arc length of the tool velocity curve, A parameterized variable representing the tool velocity profile, The arc length of the tool velocity curve is represented by the parameterized variable The differential of Represents the tool speed curve. Here, the tool speed curve is substituted into the parameterized variable The value at represents the number of constraints of the objective function, Indicates the number of monitoring points of the tool speed curve, represents the excess amount of the NURBS tool path segment at the jth monitoring point under the i-th constraint condition, It represents the maximum allowable excess under the i-th constraint condition.
[0125] The objective function has constraints, which are divided into linear constraints and nonlinear constraints. Among them, linear constraints include chord error constraints, speed constraints, and speed constraints of each axis in multi-axis CNC machine tools. The expression of linear constraints is:
[0126] ;
[0127] in, Indicates speed, Indicates the maximum speed, represents the interpolation period, Indicates the interpolation period The maximum value of the lower chord error, Indicates the center axis of a multi-axis CNC machine tool speed, Indicates the center axis of a multi-axis CNC machine tool The maximum speed.
[0128] Nonlinear constraints include acceleration constraints, jerk constraints, acceleration constraints of each axis in a multi-axis CNC machine tool, and jerk constraints of each axis in a multi-axis CNC machine tool. The expression of nonlinear constraints is:
[0129] ;
[0130] ;
[0131] ;
[0132] ;
[0133] ;
[0134] ;
[0135] ;
[0136] ;
[0137] in, represents acceleration, Indicates speed, represents the first-order differential of velocity, Represents the first-order differential of the arc length of the tool velocity curve, The second-order differential of the arc length representing the tool velocity curve, Indicates the maximum acceleration, represents the acceleration, represents the second-order differential of velocity, Indicates the maximum acceleration value, Indicates the center axis of a multi-axis CNC machine tool The acceleration of Indicates the center axis of a multi-axis CNC machine tool The maximum acceleration, Indicates the center axis of a multi-axis CNC machine tool The acceleration of Indicates the center axis of a multi-axis CNC machine tool The maximum value of the acceleration, ~ Represents a constant parameter, Indicates the center axis of a multi-axis CNC machine tool The first derivative of the arc length of the tool velocity curve, Indicates the center axis of a multi-axis CNC machine tool The second derivative of the arc length of the tool velocity curve, Indicates the center axis of a multi-axis CNC machine tool The third derivative of the arc length of the tool velocity curve.
[0138] As shown in the above formula transformation, this implementation extracts common factors from the expression, reducing the number of multiplications required for each constraint from 16 to 7, further improving computational efficiency.
[0139] In this embodiment, the dynamic constraint values (upper limits) of each axis of the machine tool are shown in Table 1:
[0140] Table 1: Dynamic constraint values of each axis of the machine tool
[0141]
[0142] Connect multiple tool speed curves in sequence, and perform feed speed optimization as described above on the connection area of two adjacent optimized tool speed curves. The left and right endpoints of the connection area are obtained by calculation, and the calculation expression is as follows:
[0143] ;
[0144] in, represents the left endpoint of the connected region, represents the right endpoint of the connected region, Indicates the connection point of the two adjacent optimized tool speed curves. Indicates the connection point of the previous two adjacent optimized tool speed curves, Indicates the connection point of the next two adjacent optimized tool speed curves.
[0145] Finally, the time optimal feed speed curve of the multi-axis CNC machine tool is obtained, such as Figure 4 As shown in the figure, it can be seen that the time-optimal feed speed curve obtained by the method of the present invention has higher smoothness and saturation.
[0146] The chord error, acceleration, and jerk excess error results of the time-optimal feed rate curve of the multi-axis CNC machine tool are as follows: Figure 5 、 Figure 6 、 Figure 7 As shown, the excess difference results of the speed, acceleration and jerk of each axis of the multi-axis CNC machine tool are as follows: Figure 8 、 Figure 9 、 Figure 10 As shown in the figure, the red dashed lines represent the upper and lower constraint limits. This figure demonstrates that this embodiment is able to plan a time-optimal feedrate curve without exceeding the constraint limits. Furthermore, using this embodiment's time-optimal feedrate curve on a multi-axis CNC machine tool, CNC machining takes only 10.85 seconds, significantly outperforming this method in terms of machining time optimality. In contrast, previously reported algorithms achieve an optimal machining time of 10.96 seconds in this case, and their computation time is 1638.1 seconds, approximately seven times that of this method.
[0147] Example 2:
[0148] The time optimal feed rate planning method for a multi-axis CNC machine tool in this embodiment is based on the embodiment 1. The NURBS tool trajectory curve of the multi-axis CNC machine tool is as follows: Figure 11 The three-dimensional tool path curve of the paper crane shape is shown.
[0149] The control point vectors of the three-dimensional tool path curve in the shape of a thousand paper cranes include:
[0150] [(67.977,-0.005,36.659),(63.682,4.079,80.255),(61.468,4.339,74.019),(11.983,11.125,-39.238),( 38.757,21.631,38.549),( 12.423,23.172,30.127 ),( -0.220,146.508,24.772 ),( -2.673,70.259,17.139),( -36.818,18.851,60.084),( -23.458,18.454,-18.584),( -20.809,1.6012,11.298),(-85.977,0.0102,115.51),(-20.809,-1.5967,11.302),(-23.457,-18.454,-18.586),(-36.819,-18.85,60.081),(-2.6744,-7 0.251,17.139),(-0.22019,-146.51,24.773),(12.421,-23.175,30.124),(38.758,-21.63,38.553),(11.985,-11.127,-39.237),(61.461,-4.336,74.018 ),(63.677,-4.076,80.257 ),( 67.978, -0.005,36.66)]
[0151] The weight vector includes:
[0152] [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
[0153] The node vector includes:
[0154] [0, 0, 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1, 1, 1]
[0155] In this embodiment, the dynamic constraint values (upper limits) of each axis of the machine tool are shown in Table 2:
[0156] Table 2 Dynamic constraint values of each axis of the machine tool
[0157]
[0158] Combining the dynamic constraints of each axis of the machine tool and the time optimal feed rate planning method of the axis CNC machine tool described in Example 1, the time optimal feed rate curve of the multi-axis CNC machine tool is obtained as follows: Figure 12 As shown in the figure, it can be seen that the time-optimal feed speed curve obtained by the method of the present invention has higher smoothness and saturation.
[0159] The chord error, acceleration, and jerk excess error results of the time-optimal feed rate curve of the multi-axis CNC machine tool are as follows: Figure 13 、 Figure 14 、 Figure 15 The results show that the method of the present invention can plan a time-optimal feedrate curve without exceeding the constraint limits. Furthermore, using this time-optimal feedrate curve on a multi-axis CNC machine tool, CNC machining takes only 13.63 seconds, significantly surpassing the previously reported optimal algorithm in this case, which achieved an optimal machining time of 14.06 seconds. Furthermore, due to the inherent limitations of swarm intelligence algorithms, the computation time in this case was nearly three times that of the method of the present invention.
[0160] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A time-optimal feed rate planning method for a multi-axis CNC machine tool, characterized in that: include: Obtain NURBS tool path curves for multi-axis CNC machine tools; Evenly segment the NURBS tool path curve to obtain multiple NURBS tool path segments; The feed rate of each NURBS tool path segment is described using B-spline curves to obtain multiple tool speed curves; The control point arrangement of the tool speed curve is used as the optimization variable, and the feed speed of multiple tool speed curves is optimized to obtain multiple optimized tool speed curves; Connect multiple optimized tool speed curves in sequence, optimize the feed speed in the connection area of two adjacent optimized tool speed curves, and obtain the time-optimal feed speed curve of the multi-axis CNC machine tool; The feed speed optimization is achieved by alternating multiple rounds of simulated annealing optimization algorithm and pattern search optimization algorithm, including: S1, initialize tool speed curve; S2, using the control point arrangement of the tool speed curve as the optimization variable, using the simulated annealing optimization algorithm to optimize the feed speed of the tool speed curve to obtain an optimized tool speed curve; S3, using the control point arrangement of the primary optimized tool speed curve as the optimization variable, and using the pattern search optimization algorithm to optimize the feed speed to obtain the secondary optimized tool speed curve; S4, using the control point arrangement of the quadratic optimized tool speed curve as an optimization variable, repeating S2 to S4 alternately for multiple rounds of simulated annealing optimization algorithm and pattern search optimization algorithm until the difference between the objective function value of the control point arrangement of the quadratic optimized tool speed curve obtained in the current round and the objective function value of the control point arrangement of the quadratic optimized tool speed curve obtained in the previous round is less than a preset threshold, thereby obtaining a preliminary optimized speed curve; S5. Refine the node vector of the preliminary optimized speed curve, and repeat S2 to S5 to optimize the control point arrangement until the difference between the objective function value of the control point arrangement of the preliminary optimized speed curve after the current node vector is refined and the objective function value of the control point arrangement of the preliminary optimized speed curve before the current node vector is refined is less than a preset threshold, thereby obtaining an optimized speed curve.
2. The time-optimal feed rate planning method for a multi-axis CNC machine tool according to claim 1, characterized in that: The NURBS tool path segments are obtained by evenly dividing the segments based on the number of nodes of the NURBS tool path curve.
3. The time-optimal feed rate planning method for a multi-axis CNC machine tool according to claim 1, characterized in that: The expression of the tool speed curve is: ; in, Represents the tool speed curve, m represents the number of control points of the tool speed curve, V i represents the i-th control point, Indicates that the node vector is defined k-order B-spline basis function on the NURBS tool path segment, k represents the degree of the NURBS tool path segment, A parameterized variable representing the tool velocity profile.
4. The time-optimal feed rate planning method for a multi-axis CNC machine tool according to claim 1, characterized in that: The control point arrangement of the tool speed curve is used as an optimization variable, and the simulated annealing optimization algorithm is used to optimize the feed speed of the tool speed curve to obtain an optimized tool speed curve, including: A. Randomly perturb the control point arrangement of the tool velocity curve to obtain a new control point arrangement; B. Calculate the probability of using the new control point arrangement as the current control point arrangement. The expression is as follows: ; ; in, Indicates the probability of taking the j+1th control point arrangement as the current control point arrangement, represents the objective function value of the j-th control point arrangement, represents the objective function value of the j+1th control point arrangement, Indicates the temperature at the current iteration number, represents the initial temperature, represents the control decay rate constant, Indicates the current iteration number; The initial temperature in each iteration process decreases gradually according to the decay rate; C. Get the current control point arrangement based on probability, repeat A to C until the maximum number of iterations is reached, and obtain an optimized tool speed curve.
5. The time-optimal feed rate planning method for a multi-axis CNC machine tool according to claim 1, characterized in that: The control point arrangement of the primary optimized tool speed curve is used as the optimization variable, and the feed speed is optimized by the pattern search optimization algorithm to obtain the secondary optimized tool speed curve, including: a. Obtain a preset initial search grid size and a positive definite expansion set, where the expression of the positive definite expansion set is , where d represents the direction vector of the control point arrangement, and n represents the direction dimension; b. Taking the control point arrangement of the optimized tool speed curve as the current control point arrangement, and calculating the objective function value of the current control point arrangement; c. Search the random part direction in the positive definite expansion set for the current control point arrangement, and calculate the objective function value of the control point arrangement after the search; If the objective function value of the searched control point arrangement is greater than the objective function value of the current control point arrangement, then traverse all remaining directions in the positive definite expansion set. If a control point arrangement with a smaller objective function value is still not found, then shrink the step size and repeat c until the grid threshold or the maximum number of iterations is reached. The current control point arrangement is used as the secondary optimization tool speed curve. If the objective function value of the changed control point arrangement is less than the objective function value of the current control point arrangement, the searched control point arrangement is used as the current control point arrangement, and c is repeated until the grid threshold or the maximum number of iterations is reached to obtain the secondary optimized tool speed curve.
6. The time-optimal feed rate planning method for a multi-axis CNC machine tool according to claim 1, characterized in that: The maximum number of iterations of the simulated annealing optimization algorithm and the pattern search optimization algorithm in each round is determined by a progressive iteration reduction strategy, and the expression of the progressive iteration reduction strategy is: ; in, represents the maximum number of iterations of the simulated annealing optimization algorithm or pattern search optimization algorithm in the i-th round, represents the attenuation factor, Indicates the maximum number of iterations of the simulated annealing optimization algorithm or the pattern search optimization algorithm in the i+1th round.
7. The time-optimal feed rate planning method for a multi-axis CNC machine tool according to claim 1, characterized in that: The expression of the objective function is: ; ; ; in, represents the objective function, Indicates the total tool running time, represents the weight of the total tool running time, Represents the sum of the excess tolerance of the tool speed curve, Indicates the current running time of the tool. represents the arc length of the tool velocity curve, A parameterized variable representing the tool velocity profile, The arc length of the tool velocity curve is represented by the parameterized variable The differential of represents the tool speed curve, represents the number of constraints of the objective function, Indicates the number of monitoring points of the tool speed curve, represents the excess amount of the NURBS tool path segment at the jth monitoring point under the i-th constraint condition, It represents the maximum allowable excess under the i-th constraint condition.
8. The time-optimal feed rate planning method for a multi-axis CNC machine tool according to claim 7, characterized in that: The objective function is provided with constraints, which are divided into linear constraints and nonlinear constraints. The linear constraints include chord error constraints, speed constraints, and speed constraints of each axis in a multi-axis CNC machine tool. The linear constraints are expressed as follows: ; in, Indicates speed, Indicates the maximum speed, represents the interpolation period, Indicates the interpolation period The maximum value of the lower chord error, Indicates the center axis of a multi-axis CNC machine tool speed, Indicates the center axis of a multi-axis CNC machine tool Maximum speed; The nonlinear constraint conditions include acceleration constraint, jerk constraint, acceleration constraint of each axis in a multi-axis CNC machine tool, and jerk constraint of each axis in a multi-axis CNC machine tool. The expression of the nonlinear constraint conditions is: ; ; ; ; ; ; ; ; in, represents acceleration, Indicates speed, represents the first-order differential of velocity, Represents the first-order differential of the arc length of the tool velocity curve, The second-order differential of the arc length representing the tool velocity curve, Indicates the maximum acceleration, represents the acceleration, represents the second-order differential of velocity, Indicates the maximum jerk, Indicates the center axis of a multi-axis CNC machine tool The acceleration of Indicates the center axis of a multi-axis CNC machine tool The maximum acceleration, Indicates the center axis of a multi-axis CNC machine tool The acceleration of Indicates the center axis of a multi-axis CNC machine tool The maximum value of the acceleration, ~ Represents a constant parameter, Indicates the center axis of a multi-axis CNC machine tool The first derivative of the arc length of the tool velocity curve, Indicates the center axis of a multi-axis CNC machine tool The second derivative of the arc length of the tool velocity curve, Indicates the center axis of a multi-axis CNC machine tool The third derivative of the arc length of the tool velocity curve.
9. The time-optimal feed rate planning method for a multi-axis CNC machine tool according to claim 1, characterized in that: The left and right endpoints of the connection area of the two adjacent optimized tool speed curves are obtained by calculation, and the calculation expression is as follows: ; in, represents the left endpoint of the connected region, represents the right endpoint of the connected region, Indicates the connection point of the two adjacent optimized tool speed curves. Indicates the connection point of the previous two adjacent optimized tool speed curves, Indicates the connection point of the next two adjacent optimized tool speed curves.
Citation Information
Patent Citations
Non-uniform rational B-spline (NURBS) interpolation feed speed planning method aiming at embedded system
CN102981456A
Robot NURBS curve speed planning method and device and storage medium
CN114952852A