A five-axis side milling cutter planning method based on contact position optimization of three-point offset model
By introducing the contact position optimization method into the three-point offset model, and using the Levenberg-Marquardt algorithm and AEFA to optimize the contact position, the problem of insufficient accuracy of the three-point offset model in the existing technology in five-axis side milling processing is solved, achieving It achieves more efficient contact between the tool and the curved surface, significantly reducing machining errors.
Patent Information
- Application Number
- CN202310062142.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-18
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-01-18
AI Technical Summary
The existing three-point offset model cannot meet the accuracy requirements of the machined surface in five-axis side milling, and the contact position optimization method has not yet been reported, resulting in large processing errors.
The contact position optimization method based on the three-point offset model is used to optimize the contact position between the tool and the curved surface through the Levenberg-Marquardt algorithm and the artificial electric field method (AEFA), thereby reducing the geometric deviation between the tool and the curved surface and improving the machining accuracy.
It achieves a more efficient three-point offset model solution, reduces the geometric deviation between the tool and the surface, improves the contour accuracy of non-developable ruled surfaces in five-axis side milling, and significantly reduces processing errors.
Smart Images

Figure CN115933524B
Abstract
Description
Technical Field
[0001] The invention relates to the field of numerical control machining, and in particular to a five-axis side milling cutter position planning method based on contact position optimization of a three-point offset model. Background Art
[0002] Five-axis side milling uses the side edge of the tool to remove workpiece material. Compared with end milling, side milling has higher material removal efficiency and better processing quality. However, due to the distortion characteristics of the non-developable ruled surface itself, it is difficult for the tool to accurately fit with the machined surface during tool positioning. Therefore, how to adjust the tool axis to reduce the geometric deviation between the tool and the surface is the main technical difficulty of side milling. Cylindrical milling cutters are one of the commonly used tool types in side milling. In order to achieve the positioning of cylindrical milling cutters, existing literature has proposed single-point offset method, double-point offset method and three-point offset method, but these methods fix the contact position between the tool and the machined surface, limiting the processing accuracy of the resulting tool position. The patent "Non-developable ruled surface blade side milling cutter axis vector planning method, CN103631197A" determines the tool axis vector by searching for asymptotes on non-developable ruled surface equidistant surfaces. The implementation of this method depends on differential geometry theory and requires high professionalism of engineering and technical personnel, which hinders its promotion and application. The patent "A tool positioning method suitable for side milling of non-developable ruled surfaces, CN106227153A" uses four equations and a nonlinear set of four variables to describe the three-point offset of the tool. This method simplifies the expression of the three-point offset model, but does not explore the contact position of the tool-surface. From the above analysis, it can be seen that the three-point offset model is widely used for side milling tool positioning, but due to the limitation of the contact position, the offset tool position is difficult to meet the accuracy requirements of the machined surface. In fact, different contact positions will form different three-point offset tool positions, which will produce different machining errors. However, the three-point positioning method for optimizing the contact position has not been reported. Summary of the invention
[0003] The present invention aims to provide a five-axis side milling cutter planning method based on contact position optimization of a three-point offset model. This method controls the offset tool axis based on the contact position, which can reduce the approach error between the tool and the curved surface and improve the contour accuracy of non-developable ruled surfaces in five-axis side milling.
[0004] The technical solution of the present invention is as follows:
[0005] A five-axis side milling cutter position planning method based on contact position optimization of a three-point offset model comprises the following steps:
[0006] S1, the expression of non-developable ruled surface S(u,v) is as follows:
[0007] S(u,v)=(1-v)B(u)+vT(u),u,v∈[0,1]
[0008] Among them, u and v are the parameters of the non-developable ruled surface, and T(u) and B(u) are the upper and lower guiding lines of the non-developable ruled surface respectively; three constant values v1, v2, and v3 in the v direction are selected, where v1 < v2 < v3, and three u-parameter lines S(u, v1), S(u, v2), and S(u, v3) on the non-developable ruled surface are obtained;
[0009] S2. Taking the radius r of the cylindrical cutter as the offset distance, calculate the normal offset lines of S(u, v1), S(u, v2), and S(u, v3), denoted as D1(u), D2(u), and D3(u):
[0010]
[0011] Among them, n1, n2, and n3 are the unit normal vectors corresponding to the three u-parameter lines respectively;
[0012] S3. When the cutter axis of the cylindrical cutter passes through D1(u), D2(u), and D3(u) simultaneously, the cylindrical cutter is in the three-point offset state, and the corresponding cutter position is the three-point offset cutter position; to obtain the position information of D1(u), D2(u), and D3(u), the u-parameter u of the non-developable ruled surface is selected i , and let D1(u i ) be a point on the cutter axis of the cylindrical cutter. Taking the parameter u in D2(u) and D3(u) as unknowns, and using u a to represent the unknown of D2(u), and u b to represent the unknown of D3(u), starting from the setting that D1(u i ), D2(u a ), and D3(u b ) are collinear, the modulus of the cross product of the vector D2(u a ) - D1(u i ) and the vector D3(u b ) - D1(u i ) is zero, and we get:
[0013] ‖(D2(u a ) - D1(u i )) × (D3(u b ) - D1(u i ))‖ = 0
[0014] S4. Use the Levenberg-Marquardt algorithm to solve the equation in step S3, and obtain the values of the variables u a and u b , denoted as u c and u d , D1(u i ), D2(u c ), D3(ud ) are all known quantities, and the unit tool axis vector passing through these three points is calculated by the following formula:
[0015] I=(D2(u c )-D1(u i )) / ‖D2(u c )-D1(u i )‖
[0016] Where I is the unit tool axis vector obtained by three-point offset. On this basis, the intersection of the normal line at the guide line and the lower guide line on the non-developable ruled surface and the straight line where the tool axis vector is located is calculated and recorded as Q T and Q B ;
[0017] S5, Q T and Q B The connected line segments are uniformly sampled, the number of samples is m, and the sampling point Q is calculated i The projection point P of (1≤i≤m) on S(u,v) i ;Q i P i The intersection point of the line and the tool near the side is recorded as M, which is obtained by the intersection formula of the line and the cylinder. So far, the geometric deviation between the tool and the non-developable ruled surface is obtained: ‖MP i ‖;
[0018] S6. Let ε be the maximum value of the geometric deviations corresponding to all sampling points in step S5. By changing v1, v2, and v3 in step S1, different three-point offset tool positions are obtained using steps S2-S4, and then different ε are obtained. Consider ε as a function of v1, v2, and v3. a ,v b ,v c They represent the variable forms of v1, v2, and v3 respectively. With the goal of minimizing ε, the artificial electric field method is used to adjust the variable v a ,v b ,v c Optimize and obtain the three-point offset tool position I of the tool and the best approximation opt , by I opt Determined Q T It is the knife tip point;
[0019] S7. Densely discretize the u-direction parameter u of the non-developable ruled surface with a discrete interval of 0.01, and use parallel computing technology to obtain different parameters u i Optimal side milling cutter position at.
[0020] The process of step S6 is as follows:
[0021] S6.1, initializing the positions of M particles;
[0022] p i =[v a ,v b ,v c ],1≤i≤M
[0023] Among them, p i represents the position of the ith particle, v a ,v b and v c Randomly select values in the intervals [0,1 / 3), [1 / 3,2 / 3) and [2 / 3,1] respectively;
[0024] S6.2, define the fitness function and calculate the charge of each particle;
[0025] According to the particle position p i Calculate the corresponding three-point offset tool position, and further calculate the maximum value of the tool-surface deviation as p i The fitness F i , then p i The corresponding charge e i Calculated by the following formula:
[0026]
[0027] Among them, q i The calculation equation is:
[0028]
[0029] Among them, Fworst is the maximum value of all particle fitness at present, and Fbest is the minimum value of all particle fitness at present;
[0030] S6.3. Calculate the resultant force on each particle based on the Coulomb force equation;
[0031] The net force on the particle is τ i for:
[0032]
[0033] in, is a random number in [0,1], τ ij The calculation formula is as follows:
[0034]
[0035] Among them, ∈ is a positive constant, p i and p j are the positions of the i-th particle and the j-th particle, respectively, and e i and e jis the corresponding charge, K is the Coulomb force constant, and the calculation formula is as follows:
[0036]
[0037] Among them, K0 and α are the specified parameter values, iter is the current number of loops, and max_iter is the set maximum number of loops;
[0038] S6.4, calculate the particle acceleration, and update the particle velocity and position;
[0039] In the resultant force τ i Under the action, the acceleration of the particle is:
[0040]
[0041] Among them, acc i is the acceleration corresponding to the ith particle, and c satisfies the following calculation formula:
[0042]
[0043] Among them, τ i (j), j = 1, 2, 3 represents τ i The three components of is a random number in [0,1]. At this time, the particle speed vel i The iteration formula is:
[0044]
[0045] Among them, vel i (iter) is the current speed value, vel i (iter+1) is the updated speed value, introducing the intermediate variable q i satisfy:
[0046] q i =p i (iter)+vel i (iter+1)
[0047] Among them, p i (iter) is the current particle position, when q i When the three components of exceed their corresponding intervals, the corresponding components are replaced by the interval boundary values according to the principle of proximity; calculate q i The fitness value is less than p i (iter) fitness, then update the position of the current particle to q i ; Otherwise, keep the current particle position unchanged and enter the next iteration loop;
[0048] S6.5. Repeat the above process until the number of iterations reaches the preset maximum value and output the optimal result.
[0049] The ∈ is a minimum positive value, which is taken as 10 -8 ; K0 and α are 500 and 30 respectively; the maximum number of loops max_iter is set to 50.
[0050] In step S6.5, when the current number of loops iter is less than max_iter, steps S6.1-S6.4 are repeated until the number of loops reaches max_iter, and the particle with the smallest fitness value among the M particles is selected, and its corresponding three-point offset tool position is the optimal tool position.
[0051] The present invention has the following beneficial effects:
[0052] (1) The present invention establishes a three-point offset model with a simple form, which intersects with the previous model. The proposed model is simpler in form and more efficient in solving;
[0053] (2) The present invention proposes a method for reducing the geometric deviation of the machined surface by optimizing the tool-surface contact position, thereby improving the problem of low machining accuracy of the existing three-point offset method;
[0054] (3) The present invention solves the three-point bias optimization model through the artificial electric field method AEFA, which has excellent global optimization capability, supports parallel computing, has stable convergence and high execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flow chart of the five-axis side milling cutter planning method based on the contact position optimization of the three-point offset model.
[0056] Figure 2 It is a schematic diagram of the three-point offset of the cylindrical knife.
[0057] Figure 3 It is a schematic diagram of the calculation of surface machining deviation.
[0058] Figure 4 It is the execution flow chart of the artificial electric field method.
[0059] Figure 5 It is a schematic diagram of the machining test surface.
[0060] Figure 6 It is a comparison diagram of the machining deviation curves between the traditional three-point offset tool position and the tool position of the proposed method.
[0061] Figure 7 It is the error distribution diagram of surface machining based on the traditional three-point offset tool position.
[0062] Figure 8It is the surface machining error distribution diagram based on the tool positions of the method of the present invention. Detailed implementation manners
[0063] The following will describe in detail the specific implementation process of the present invention with reference to the accompanying drawings. This process helps those skilled in the art to further understand the present invention, but does not limit the present invention in any form. It should be noted that for those skilled in the art, any modification or equivalent replacement of the present invention made under the premise of non-creative labor according to the technical concept proposed by the present invention belongs to the protection scope of the present invention.
[0064] The present invention establishes a high-precision side milling cutter position generation model by optimizing the contact points between a cylindrical cutter and a non-developable ruled surface, as Figure 1 shown in the flowchart, which specifically includes the following steps:
[0065] The general expression of the non-developable ruled surface S(u, v) is as follows:
[0066] S(u, v) = (1 - v)B(u) + vT(u), u, v ∈ [0, 1]
[0067] In the formula, u and v are the parameters of the non-developable ruled surface, T(u) and B(u) are the upper and lower guide curves of the non-developable ruled surface respectively. Three constant values v1, v2, and v3 (v1 < v2 < v3) in the v direction are selected to obtain three u-direction equal-parameter curves S(u, v1), S(u, v2), and S(u, v3) on the non-developable ruled surface.
[0068] The non-developable ruled surface is uniformly discretized along the u direction, the discretization interval is [0, 1], and the discretization interval is 0.01. The obtained parameter sequence is {u i} i n =1 , where n is the total number of discrete points.
[0069] Taking the radius r of the cylindrical cutter as the offset distance, calculate the normal offset curves of S(u, v1), S(u, v2), and S(u, v3), denoted as D1(u), D2(u), and D3(u):
[0070]
[0071] In the formula, n1, n2, and n3 are the unit normal vectors corresponding to the three u-direction equal-parameter curves respectively.
[0072] At the i-th discrete position u i , let D1(u i ) be a point on the cutter axis. Taking the parameter u in D2(u) and D3(u) as the unknown, based on the condition of three points being collinear, a three-point offset model of the cutter axis is obtained:
[0073] ‖(D2(u a )-D1(u i ))×(D3(u b )-D1(u i ))‖=0
[0074] where u a represents the unknown quantity of D2(u), u b Represents the unknown quantity D3(u), the schematic diagram of the constructed model is as follows Figure 2 shown.
[0075] Use the Levenberg-Marquardt algorithm to solve the equation in step S3, and then determine the tool axis vector I. Calculate the intersection of the normal line at the guide line and the lower guide line on the non-developable ruled surface and the straight line where the tool axis vector is located, which is recorded as Q T and Q B . For Q T and Q B The connected line segments are uniformly sampled, the number of samples is m, and the sampling point Q is calculated i Projection points P, Q of (1≤i≤m) on S(u,v) i The intersection of the straight line P and the side of the tool close to the surface is recorded as M, and the geometric deviation between the tool and the surface is obtained as ‖MP i ‖,like Figure 3 shown.
[0076] Let ε be all sampling points Corresponding to the maximum value of the geometric deviation, with the goal of minimizing ε, the artificial electric field method (AEFA) is used to optimize v1, v2, and v3. By changing v1, v2, and v3 in step S1, different three-point offset tool positions are obtained using steps S2-S4, and then different ε are obtained; the flowchart of the optimization process is shown in Figure 4 As shown, the steps are as follows:
[0077] (1) Initialize the positions of M particles;
[0078] Specifically, the expression for the position of each particle is:
[0079] p i =[v a ,v b ,v c ],1≤i≤M
[0080] Among them, p i represents the position of the ith particle, v a ,v b and v c Randomly select values in the intervals [0,1 / 3), [1 / 3,2 / 3) and [2 / 3,1] respectively;
[0081] (2) Define the fitness function and calculate the charge of each particle;
[0082] Specifically, according to p i Calculate the corresponding three-point offset tool position, and further calculate the maximum value of the tool-surface deviation as p i The fitness F i , then p i The corresponding charge e i It can be calculated by the following formula:
[0083]
[0084] Among them, q i The calculation equation is:
[0085]
[0086] Among them, Fworst is the maximum value of all particle fitness, and Fbest is the minimum value of all particle fitness.
[0087] (3) Calculate the resultant force on each particle based on the Coulomb force equation;
[0088] Specifically, with particle p i For example, p i The resultant force τ i for:
[0089]
[0090] in, is a random number in [0,1], τ ij The calculation formula is as follows:
[0091]
[0092] Among them, ∈ is the smallest positive value, which is taken as 10 -8 , p i and p j are the positions of the i-th particle and the j-th particle, respectively, and e i and e j is the corresponding charge, K is the Coulomb force constant, and the calculation formula is as follows:
[0093]
[0094] Among them, K0 and α are the specified parameter values, which are 500 and 30 respectively, iter is the current number of loops, and max_iter is the maximum number of loops set, which is set to 50;
[0095] (4) Calculate particle acceleration and update particle velocity and position;
[0096] Specifically, in τ i Under the action, the acceleration of the particle is:
[0097] acc i =cτ i
[0098] Among them, acc i is the acceleration corresponding to the ith particle, and c satisfies the following calculation formula:
[0099]
[0100] Among them, τ i (j), j = 1, 2, 3 represents τ i The three components of is a random number in [0,1]. At this time, the particle speed vel i The iteration formula is:
[0101]
[0102] Among them, vel i (iter) is the current speed value, vel i (iter+1) is the updated speed value, introducing the intermediate variable q i Full:
[0103] q i =p i (iter)+vel i (iter+1)
[0104] Among them, p i (iter) is the current particle position, when q i When the three components of exceed their corresponding intervals, the corresponding components are replaced by the interval boundary values according to the principle of proximity; calculate q i If the fitness value is less than p i (iter) fitness, then update the position of the current particle to q i ; Otherwise, keep the current particle position unchanged and enter the next iteration loop.
[0105] (5) Repeat the above process until the number of iterations reaches the preset maximum value and outputs the optimal result.
[0106] Specifically, if the current loop number iter is less than max_iter, steps S2-S4 are repeated until the loop number reaches max_iter. At this time, the particle with the smallest fitness value among the M particles is selected and output as the optimal particle, and its corresponding three-point offset tool position is the optimal tool position.
[0107] Finally, all parameters u are obtained using parallel computing i The corresponding optimal three-point offset tool position.
[0108] In this embodiment, the non-developable ruled surface tested is as follows Figure 5 The tool used is a cylindrical tool with a radius of r = 2 mm and a tool length of 50 mm. Figure 6 The deviation distribution curves along the tool axis after positioning the tool using the traditional three-point offset method (Redonnet J., Rubio W., Dessein G. Side milling of ruled surfaces: optimal positioning of the milling cutter and calculation of interference. The International Journal of Advanced Manufacturing Technology, 1998; 14 (7): 459–65) and the method proposed in the present invention are shown. It can be seen that the maximum tool-surface deviation values of a single tool position are 0.0067 mm and 0.0029 mm, respectively, and the maximum deviation value of the proposed method is reduced by 56.72%. Furthermore, the surface is uniformly sampled along the u and v directions with a sampling density of 500×20. The adjacent planned tool positions are densified using linear interpolation, and the Z-map method is used to calculate the machining error of each sampling point. The error distribution diagram based on the traditional three-point offset method and the deviation distribution diagram based on the method of the present invention are shown in Figure 7 and Figure 8 , the two distributions are similar, but the sum of the absolute values of the errors of all sampling points are 27.3758 mm and 17.9736 mm respectively. It can be seen that the extreme deviation and cumulative deviation obtained by the proposed method are greatly reduced, which proves the effectiveness of this method.
Claims
1. A five-axis side milling cutter position planning method based on contact position optimization of a three-point offset model, characterized in that: The following steps are involved: S1, the expression of non-developable ruled surface S(u,v) is as follows: S(u,v)=(1-v)B(u)+vT(u),u,v∈[0,1] Among them, u and v are the parameters of the non-developable ruled surface, T(u) and B(u) are the upper and lower guide lines of the non-developable ruled surface respectively; three constant values v1, v2 and v3 in the v direction are selected, v1<v2<v3, and three u-direction isoparametric lines S(u,v1), S(u,v2) and S(u,v3) on the non-developable ruled surface are obtained; S2. Taking the cylindrical knife radius r as the offset distance, calculate the normal offset lines of S(u,v1), S(u,v2) and S(u,v3), recorded as D1(u), D2(u), D3(u): Among them, n1, n2 and n3 are the unit normal vectors corresponding to the three u-direction isoparametric lines; S3. When the cylindrical knife axis passes through D1(u), D2(u), and D3(u) at the same time, the cylindrical knife is in a three-point offset state, and the corresponding tool position is a three-point offset tool position; in order to obtain the position information of D1(u), D2(u), and D3(u), the u-direction parameter u of the non-developable ruled surface is selected. i , let D1(u i ) is a point on the axis of the cylindrical tool, and the parameter u in D2(u) and D3(u) is the unknown quantity, and u is used to calculate the a represents the unknown quantity of D2(u), u b Represents the unknown quantity of D3(u), from D1(u i ), D2(u a ), D3(u b ) Starting from the assumption that the three points are collinear, vector D2(u a )-D1(u i ) and vector D3(u b )-D1(u i )The modulus of the outer product is zero, so: ||(D2(u a )-D1(u i ))×(D3(u b )-D1(u i ))||=0 S4. Use the Levenberg-Marquardt algorithm to solve the equation in step S3 and obtain the variable u a and u b The value of c and u d , D1(u i ), D2(u c ), D3(u d ) are all known quantities, and the unit tool axis vector passing through these three points is calculated by the following formula: I=(D2(u c )-D1(u i )) / ||D2(in c )-D1(u i )|| Where i is the unit tool axis vector obtained by three-point offset. On this basis, the intersection of the normal line at the guide line and the lower guide line on the non-developable ruled surface and the straight line where the tool axis vector is located is calculated and recorded as Q T and Q B ; S5, Q T and Q B The connected line segments are uniformly sampled, the number of samples is m, and the sampling point Q is calculated i The projection point P of (1≤i≤m) on S(u,v) i ;Q i P i The intersection point of the line and the tool near the side is recorded as M, which is obtained by the intersection formula of the line and the cylinder. So far, the geometric deviation between the tool and the non-developable ruled surface is obtained: ‖MP i ‖; S6. Let ε be the maximum value of the geometric deviations corresponding to all sampling points in step S5. By changing v1, v2, and v3 in step S1, different three-point offset tool positions are obtained using steps S2-S4, and then different ε are obtained. Consider ε as a function of v1, v2, and v3. a ,v b ,v c They represent the variable forms of v1, v2, and v3 respectively. With the goal of minimizing ε, the artificial electric field method is used to adjust the variable v a ,v b ,v c Optimize and obtain the three-point offset tool position I of the tool and the best approximation opt , by I opt Determined Q T It is the knife tip point; S7. Densely discretize the u-direction parameter u of the non-developable ruled surface and use parallel computing technology to obtain different parameters u i Optimal side milling cutter position at.
2. The five-axis side milling cutter position planning method based on three-point offset model contact position optimization according to claim 1 is characterized in that: The process of step S6 is as follows: S6.1, initializing the positions of M particles; p i =[v a ,v b ,v c ],1≤i≤M Among them, p i represents the position of the ith particle, v a ,v b and v c Randomly select values in the intervals [0,1 / 3), [1 / 3,2 / 3) and [2 / 3,1] respectively; S6.2, define the fitness function and calculate the charge of each particle; According to the particle position p i Calculate the corresponding three-point offset tool position, and further calculate the maximum value of the tool-surface deviation as p i The fitness F i , then p i The corresponding charge e i Calculated by the following formula: Among them, q i The calculation equation is: Among them, Fworst is the maximum value of all particle fitness at present, and Fbest is the minimum value of all particle fitness at present; S6.
3. Calculate the resultant force on each particle based on the Coulomb force equation; The net force on the particle is τ i for: in, is a random number in [0,1], τ ij The calculation formula is as follows: Among them, ∈ is a positive constant, p i and p j are the positions of the i-th particle and the j-th particle, respectively, and e i and e j is the corresponding charge, K is the Coulomb force constant, and the calculation formula is as follows: Among them, K0 and α are the specified parameter values, iter is the current number of loops, and max_iter is the set maximum number of loops; S6.4, calculate the particle acceleration, and update the particle velocity and position; In the resultant force τ i Under the action, the acceleration of the particle is: acc i =cτ i Among them, acc i is the acceleration corresponding to the ith particle, and c satisfies the following calculation formula: Among them, τ i (j), j = 1, 2, 3 represents τ i The three components of θ2 are random numbers in [0,1]. At this time, the particle velocity vel i The iteration formula is: or i (iter+1)=θvel i (journey)+acc i Among them, vel i (iter) is the current speed value, vel i (iter+1) is the updated speed value, introducing the intermediate variable q i satisfy: what i =p i (journey)+or i (path+1) Among them, p i (iter) is the current particle position, when q i When the three components of exceed their corresponding intervals, the corresponding components are replaced by the interval boundary values according to the principle of proximity; calculate q i The fitness value is less than p i (iter) fitness, then update the position of the current particle to q i ; Otherwise, keep the current particle position unchanged and enter the next iteration loop; S6.
5. Repeat the above process until the number of iterations reaches the preset maximum value and output the optimal result.
3. The five-axis side milling cutter position planning method based on three-point offset model contact position optimization according to claim 2 is characterized in that: The ∈ is a minimum positive value, which is taken as 10 -8 ; K0 and α are 500 and 30 respectively; the maximum number of loops max_iter is set to 50.
4. The five-axis side milling cutter position planning method based on three-point offset model contact position optimization according to claim 2 or 3 is characterized in that: In step S6.5, when the current number of loops iter is less than max_iter, steps S6.1-S6.4 are repeated until the number of loops reaches max_iter, and the particle with the smallest fitness value among the M particles is selected, and its corresponding three-point offset tool position is the optimal tool position.
