Accurate bow height error control method based on Hausdorff distance evaluation
The precise bow height error control method based on Hausdorff distance assessment solves the problem of accurate assessment and control of bow height error in five-axis CNC machining of complex curved surfaces, improves machining accuracy and efficiency, adapts to five-axis machining scenarios, and reduces the impact of machine tool geometric errors.
Patent Information
- Application Number
- CN202511760182.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-02-27
AI Technical Summary
Existing technologies for five-axis CNC machining of complex curved surfaces suffer from problems such as approximate calculation of bow height error, difficulty in adapting to five-axis machining, and neglect of machine tool geometric errors, which limit machining accuracy and efficiency.
A precise bow height error control method based on Hausdorff distance assessment is adopted. The interpolation step size is optimized by the OC method iterative algorithm, combined with developable ruled surface construction and tool axis vector planning, the geometric deviation of the intermediate layer is evaluated, and machine tool geometric error compensation is introduced to achieve precise bow height error control.
It improves the accuracy assessment and control of bow height error, adapts to curvature change regions, enhances five-axis machining accuracy and efficiency, reduces the impact of machine tool geometric errors, and meets the needs of high-precision machining.
Smart Images

Figure CN121578739A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of numerical control machining, in particular to a precise camber error control method based on Hausdorff distance evaluation. BACKGROUND
[0002] Since the traditional numerical control system usually uses a small straight line segment or a circular arc to approximate a free curve and completes machining through piecewise interpolation, camber error will be generated in the process of curve interpolation approximation. In the numerical control machining of complex curved surface parts, camber error directly affects the machining precision. At present, many studies on camber error of complex curves tend to use osculating circle to fit the curve trajectory, which is called OC (Osculating Circle) approximation method. The way of obtaining the trajectory point by using the OC method significantly reduces the calculation complexity and effectively reduces the operation burden of the numerical control system. However, with the increase of the complexity of the curve, the OC approximation method faces two major bottlenecks of calculation efficiency and precision control. Dense discretization leads to a dramatic increase in data volume, increasing the preprocessing burden of the numerical control system, and fixed step interpolation is difficult to adapt to the curvature mutation area and is prone to serious error in the curvature mutation area. However, compared with other methods, the calculation of the OC approximation method is simple, and many studies increase other restrictions based on the OC method to realize the control of the camber error of machining and meet other working condition restrictions.
[0003] However, although the existing research has partially alleviated the above problems through parameterized interpolation, there is still a lack of dynamic optimization mechanism for precise evaluation of camber error, which has the following key limitations: first, most of the existing models determine the camber error in an approximate way, rather than the precise camber error; second, the model generally does not consider the influence of the tool axis vector in the machining process, which makes it difficult to apply to the application scenario of five-axis machining; third, the existing model ignores the influence of machine tool geometric error on machining error.
[0004] Therefore, how to construct a dynamic optimization model that integrates tool axis vector adaptation and machine tool geometric error compensation to realize precise evaluation and real-time control of camber error in five-axis machining of complex curved surfaces has become a key and difficult point in the field of five-axis numerical control machining of complex curved surfaces. SUMMARY
[0005] The present application provides a precise camber error control method based on Hausdorff distance evaluation to effectively solve the problems of approximate calculation of camber error, difficulty in adapting to five-axis machining, efficiency and precision bottlenecks of OC method, and modeling and analysis of five-axis machine tool geometric error, thereby effectively improving the precision of camber control and the precision of five-axis machining.
[0006] To achieve the above purpose, the present application provides a precise camber error control method based on Hausdorff distance evaluation, which comprises: S1. Implementation of the precise bow height error iterative algorithm based on OC method: The initial chord length is calculated by approximating the curve segment using the OC method. The bow height error point within the positioning step is obtained by analytically solving the curve derivative to obtain the Hausdorff distance h0. The interpolation step size is adjusted iteratively to make the bow height error meet the threshold requirement δmax. S2. Construction of developable ruled surface: Determine the parameters of the two construction lines of the developable ruled surface to be processed. Based on the two construction lines with unequal radii and parallel axes, generate the developable ruled surface to be processed using the lofting function of 3D modeling software. As a preferred embodiment, the construction parameters are: lower construction line radius R1 = 19mm, upper construction line radius R2 = 20mm, construction line length L = 10mm, and axial distance between the two construction lines D = 10mm. S3. Toolpath planning for surfaces considering tool axis vectors: The surface to be machined is offset, and a horizontal cutting plane is used to divide the surface into layers between the two boundary curves. The surface is divided into multiple machining contour lines according to different Z values in the z-axis direction of the workpiece coordinate system for error evaluation. The trajectory points of the upper and lower boundary curves on the surface are obtained based on the iterative algorithm in step S1. The trajectory points of the upper and lower boundaries are connected to obtain the tool axis vectors I, J, and K, and the optimized toolpath trajectory is determined. S4. Intermediate layer error assessment: The vector extension method is used to calculate the machining points of each intermediate layer. The geometric deviation between the actual trajectory point and the theoretical arc center is calculated by Euclidean distance to assess the rationality of the toolpath planning. S5. Machine Tool Geometric Error Identification and Compensation: Construct the mapping and transfer relationship between the machine tool coordinate system, rotary table coordinate system, fixture coordinate system and workpiece coordinate system of the five-axis cradle machine tool, introduce global compensation parameters to establish error compensation equations, and realize the mapping and compensation of machine tool geometric errors. S6. Verification of Method Effectiveness: Simulation experiments were conducted on typical complex trajectories, including the flower-shaped contour and the scaled-down S-shaped surface, to compare the proposed control strategy with the traditional equal-section curve method. Simultaneously, experimental verification was carried out on a five-axis CNC machine tool. The average value of the bow height error of each segment of the curved trajectory was used as the evaluation index to measure the bow height error in the curvature change region and evaluate the bow height error control effect.
[0007] Preferably, in S1, the process of calculating the initial chord length using the OC method is as follows: based on the preset bow height error threshold δmax, and based on the radius of curvature ρ of the curve C(u) at the starting point P, the trajectory from... Closest arc starting from point initial chord length The chord length intersects the curve segment C(u) at the initial iteration point Q0; the initial chord length calculation formula satisfies the relationship between the chord length and the radius of curvature ρ and the bow height error threshold δmax, and is used to determine the chord length of the closely spaced circular arc starting from the starting point P. The initial chord length calculation formula is as follows: ; In the formula, represents The radius of curvature at .
[0008] Preferably, in S1, the process of analytically solving the step height error point is as follows: S11, set the slope of chord to K, and the slope of chord is obtained from points P and Q0; S12, set the slope of curve C(u) at point to k0, which is obtained by differentiating curve C(u) at point , and the calculation formula is as follows: ; S13, let K=k0, and accurately solve the corresponding height error point of curve segment C(u), calculate the Hausdorff distance h0 corresponding to the point, and the calculation formula of the Hausdorff distance h0 corresponding to the point is as follows: ; In the formula, represents the parameter of point on curve , and represents a constant term.
[0009] Preferably, in S1, the process of iteratively adjusting the interpolation step is as follows: compare the obtained Hausdorff distance h0 with δmax, if h0 is not greater than δmax, then Q0 is taken as the farthest interpolation point in the interpolation period; if h0 is greater than δmax, then take the height error point corresponding to h0 as the center and δmax as the radius to draw a circle, draw a tangent of the circle through point P, and the tangent intersects curve C(u) at a new point, repeat the analytical differentiation of the curve and calculate the Hausdorff distance h m corresponding to the new step, until h m is not greater than δmax, and the iteration is terminated.
[0010] Preferably, in S3, the specific process of surface tool path planning is as follows: S31, offset the surface to be machined according to the tool radius, and analyze the envelope surface formed by the tool path trajectory; S32, divide the offset surface into multiple curve layers parallel to the bottom surface according to different Z values of the z-axis direction of the workpiece coordinate system, and obtain the trajectory points of the upper and lower boundary curves based on the iterative algorithm of step S1; S33, sequentially connecting the corresponding track points of the upper and lower boundary curves to generate the tool axis vector I, J, K vector of each track point, the track of the lower boundary curve being the tool tip point track, and finally forming the optimized tool path.
[0011] Preferably, in S4, the calculation process of the intermediate layer machining point is as follows: Let the lower boundary starting machining point be The corresponding tool axis direction vector is The vector extension method is used to calculate the intermediate layer machining point coordinates, determine the extension parameter t and the target Z value of the intermediate layer, and the calculation formula is: ; ; In the formula, Z is the Z value of the target layer, t is the extension parameter.
[0012] Preferably, in S4, the calculation process of the geometric deviation is as follows: Let the center of the theoretical circular arc be For each actual machining point P(t) of the intermediate layer, the Euclidean distance of the actual point to the center of the theoretical circular arc is calculated according to the formula And the geometric deviation And a judgment is made, specifically, when is greater than 0, the actual point is an external deviation, otherwise the actual point is an internal deviation, and the calculation formula is: ; ; In the formula, is the Euclidean distance of the actual point to the center of the theoretical circular arc, is the geometric deviation, and R is the radius of the theoretical circular arc.
[0013] Preferably, in S5, the construction process of the mapping transmission relationship of the machine tool coordinate system is as follows: analyzing the motion chain topological structure of the five-axis cradle machine tool, clearly defining the transmission path between the machine tool coordinate system, the rotary table coordinate system, the fixture coordinate system and the workpiece coordinate system, and establishing the mapping transmission relationship between the coordinate systems through the coordinate transformation matrix.
[0014] Preferably, in S5, the process of machine tool geometric error compensation is as follows: S51, the fixture offset, the rotary table offset and the angle error are introduced into the coordinate transformation equation as global compensation parameters, and the coordinate transformation equation is: ; In the formula, is the rotary table coordinate system, is the angle coordinate system, is the workpiece coordinate system, and A and B are the rotation angles of the two rotary axes of the machine tool. S52, quantifying the influence of each axis error on the Cartesian space machining position by partial derivative analysis, and converting the measured machine deviation to the machine coordinate system by using a rotation matrix; S53, establishing an error compensation equation, fitting global offset parameters by using the least square method, and realizing the mapping and compensation of each axis error to the Cartesian space.
[0015] Preferably, in S6, the calculation formula of the average value of the camber error is: ; In the formula, is the average value of the camber error of each step length of the curve part trajectory, is the camber error of the first step length.
[0016] Therefore, the present application proposes an accurate camber error control method based on Hausdorff distance evaluation, which has the following beneficial effects: The accurate evaluation and iterative control of the camber error are realized, the system burden of dense discretization of the OC method is avoided, the curvature mutation area is adapted, and the machining precision and efficiency are improved; the surface tool path is planned in combination with the tool axis vector, the five-axis machining scene is adapted, and the high-precision machining problem of developable straight-line surface is solved; the machine tool geometric error identification and compensation are introduced, the influence of inherent errors is reduced, and the five-axis machining precision is further ensured.
[0017] The technical solutions of the present application will be further described in detail below through the drawings and examples. DRAWINGS
[0018] Figure 1 is the OC method schematic diagram of the camber error of the accurate camber error control method based on Hausdorff distance evaluation of the present application; Figure 2 is the iterative adjustment step length schematic diagram of the accurate camber error control method based on Hausdorff distance evaluation of the present application; Figure 3 is the comparison schematic diagram before and after the iterative algorithm optimization of the accurate camber error control method based on Hausdorff distance evaluation of the present application; Figure 4 is the part information to be machined of the accurate camber error control method based on Hausdorff distance evaluation of the present application; Figure 5 is the machine coordinate system transmission relationship schematic diagram of the accurate camber error control method based on Hausdorff distance evaluation of the present application; Figure 6This is a flower pattern contour trajectory diagram of the precise bow height error control method based on Hausdorff distance assessment of the present invention, wherein (a) is a global view diagram and (b) is a detail diagram of a high-rate area. Figure 7 The diagram shows the bow height error control effect of the precise bow height error control method based on Hausdorff distance assessment and the traditional equal-section curve method. (a) is the bow height error distribution trend diagram of the traditional equal-section curve method, and (b) is the bow height error distribution trend diagram of the precise bow height error control method based on Hausdorff distance assessment. Figure 8 This is a schematic diagram of the machining points of the intermediate layer of the curved surface in the precise bow height error control method based on Hausdorff distance evaluation of this invention. Detailed Implementation
[0019] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of this application.
[0020] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0021] like Figures 1-8 As shown, the precise bow height error control method based on Hausdorff distance assessment provided by this invention includes: S1. Implementation of the precise bow height error iterative algorithm based on OC method: The initial chord length is calculated by approximating the curve segment using the OC method. The bow height error point within the positioning step is obtained by analytically solving the curve derivative to obtain the Hausdorff distance h0. The interpolation step size is adjusted iteratively to make the bow height error meet the threshold requirement δmax. S2. Construction of developable ruled surface: Determine the parameters of the two construction lines of the developable ruled surface to be processed. Based on the two construction lines with unequal radii and parallel axes, generate the developable ruled surface to be processed using the lofting function of 3D modeling software. As a preferred embodiment, the construction parameters are: lower construction line radius R1 = 19mm, upper construction line radius R2 = 20mm, construction line length L = 10mm, and axial distance between the two construction lines D = 10mm. The OC method for calculating the initial chord length is as follows: Based on the preset bow height error threshold δmax, and using the radius of curvature ρ of curve C(u) at the starting point P, the initial chord length is calculated along the trajectory from... Closest arc starting from point an initial chord length , the initial chord length calculation formula satisfies that the chord length is related to the radius of curvature p and the arch height error threshold dmax, and is used for determining the chord length of the osculating circle arc starting from the starting point P, the initial chord length calculation formula is: ; In the formula, represents the radius of curvature at .
[0022] The process of analytically solving the arch height error point in the step length is as follows: S11, let the slope of chord be K, and the slope of chord be obtained from the two points P and Q0; S12, let the slope of the curve C(u) at point be k0, which is obtained by deriving the curve C(u) at point , and the calculation formula is: ; S13, let K=k0, and accurately solve the arch height error point on the curve segment C(u), calculate the Hausdorff distance h0 corresponding to the point, and the calculation formula of the Hausdorff distance h0 corresponding to the point is: ; In the formula, represents the parameter of point on the curve , represents a constant term.
[0023] The process of iteratively adjusting the interpolation step length is as follows: compare the obtained Hausdorff distance h0 with dmax, if h0 is not greater than dmax, then Q0 is taken as the farthest interpolation point in the interpolation period; if h0 is greater than dmax, a circle is made with the arch height error point corresponding to h0 as the center and dmax as the radius, a tangent of the circle is made through point P, the tangent intersects the curve C(u) at a new point, the curve is repeatedly analytically derived, the Hausdorff distance h m corresponding to the new step length is calculated, and the iteration is terminated until h m is not greater than dmax.
[0024] S3, consider the curved surface tool path planning of tool axis vector: offset the curved surface to be processed, adopt horizontal cutting plane to divide the curved surface between two boundary curves, divide the curved surface into multiple machining contour lines according to different Z value height of z axis direction of workpiece coordinate system for error evaluation, obtain the trajectory points of upper and lower boundary curves on the curved surface based on the iterative algorithm of step S1, connect the trajectory points of upper and lower boundaries to obtain tool axis vector I, J and K vector, determine the optimized tool path trajectory; The specific process of curved surface tool path planning is: S31, offset the curved surface to be processed according to the tool radius, analyze the envelope surface formed by the tool path trajectory; S32, divide the offset curved surface into multiple curve layers parallel to the bottom surface according to different Z values of z axis direction of workpiece coordinate system, respectively obtain the trajectory points of upper and lower boundary curves based on the iterative algorithm of step S1; S33, connect the corresponding trajectory points of upper and lower boundary curves in turn to generate tool axis vector I, J and K vector of each trajectory point, the trajectory of lower boundary curve is tool tip point trajectory, and finally form the optimized tool path.
[0025] S4, intermediate layer error evaluation: calculate each intermediate layer machining point by vector extension method, calculate the geometric deviation of actual trajectory point and theoretical circular arc center by Euclidean distance, and evaluate the rationality of tool path planning; The calculation process of intermediate layer machining point is: Let the starting machining point of lower boundary be The corresponding tool axis direction vector is The vector extension method is adopted to calculate the intermediate layer machining point coordinates, determine the extension parameter t and the target Z value of the intermediate layer, and the calculation formula is: ; ; In the formula, Z is the Z value of the target layer, t is the extension parameter.
[0026] The calculation process of geometric deviation is: let the theoretical circular arc center be For each actual machining point P(t) of the intermediate layer, calculate the Euclidean distance of the actual point to the theoretical center by formula And the geometric deviation And make a judgment, specifically, when is greater than 0, the actual point is out of bias, otherwise the actual point is in bias, and the calculation formula is: ; ; In the formula, is the Euclidean distance of the actual point to the theoretical center, R represents the geometric deviation, and R is the theoretical radius of the circular arc.
[0027] S5. Machine Tool Geometric Error Identification and Compensation: Construct the mapping and transfer relationship between the machine tool coordinate system, rotary table coordinate system, fixture coordinate system and workpiece coordinate system of the five-axis cradle machine tool, introduce global compensation parameters to establish error compensation equations, and realize the mapping and compensation of machine tool geometric errors. The process of constructing the mapping and transfer relationship of the machine tool coordinate system is as follows: analyze the kinematic chain topology of the five-axis cradle machine tool, clarify the transfer path between the machine tool coordinate system, rotary table coordinate system, fixture coordinate system and workpiece coordinate system, and establish the mapping and transfer relationship between each coordinate system through the coordinate transformation matrix.
[0028] The process of machine tool geometric error compensation is as follows: S51. Fixture offset, rotary table offset, and angular error are used as global compensation parameters and introduced into the coordinate transformation equation, which is: ; In the formula, For the turntable coordinate system, Using an angular coordinate system, Let A be the workpiece coordinate system, and let A and B be the rotation angles of the two rotation axes of the machine tool, respectively. S52. The influence of each axis error on the machining position in Cartesian space is quantified by partial derivative analysis, and the measured machine tool deviation is transformed to the machine tool coordinate system using a rotation matrix. S53. Establish the error compensation equation, and use the least squares method to fit the global offset parameters to realize the mapping and compensation of each axis error to the Cartesian space.
[0029] S6. Verification of Method Effectiveness: Simulation experiments were conducted on typical complex trajectories, including the flower-shaped contour and the scaled-down S-shaped surface, to compare the proposed control strategy with the traditional equal-section curve method. Simultaneously, experimental verification was carried out on a five-axis CNC machine tool. The average value of the bow height error of each segment of the curved trajectory was used as the evaluation index to measure the bow height error in the curvature change region and evaluate the bow height error control effect.
[0030] The formula for calculating the average bow height error is: ; In the formula, This represents the average error of the step length and bow height for each segment of the curved trajectory. For the first The bow height error of the step length.
[0031] The effectiveness of the proposed method is verified by comparing its performance with that of the traditional equal-section curve method in controlling the bow height error on the flower-shaped contour and the surface trajectory of the scaled-down S-piece.
[0032] Example 1 like Figures 1-8 As shown, the present invention provides a precise bow height error control method based on Hausdorff distance assessment. Using a five-axis cradle machine as the machining equipment and a parameterized developable ruled surface, the method takes two construction lines with radii R1=19mm and R2=20mm, a construction line length L=10mm, and an axial distance of 10mm as the machining object. Through a five-step core process, precise bow height error control and efficient machining are achieved. The specific steps are as follows: S1. Implementation of the precise bow height error iterative algorithm based on the OC method: (1) Initial chord length calculation: Based on the preset bow height error threshold δmax, and the radius of curvature ρ of curve C(u) at the starting point P, as follows: Figure 1 As shown, the initial chord length of the closely spaced circular arc starting from point P on the trajectory is calculated using the formula. This chord length intersects the curve segment C(u) at the initial iteration point Q0. The formula for calculating the initial chord length is: ; In the formula, represent Place The radius of curvature is used to determine the geometric features of a closely spaced circular arc; (2) Analytical solution of bow height error points: Let the chord The slope is K, and the chord The slope of the curve is obtained from points P and Q0, and the curve C(u) lies at point P. The slope k0 at point C(u) passes through the curve C(u) relative to the point. The derivative yields the following formula: ; Let K = k0, accurately determine the point of bow height error on curve segment C(u), and then calculate the corresponding Hausdorff distance h using the formula. 0, like Figure 2 As shown, the formula for calculating the Hausdorff distance h0 corresponding to this point is: ; In the formula, Representative point In the curve The parameters, Represents a constant term.
[0033] (3) Iterative adjustment of interpolation step size: compare h0 with δmax, if h0≤δmax, then Q0 is the farthest interpolation point in the interpolation period; if h0>δmax, take the sagitta error point as the center and δmax as the radius to make a circle, and draw a tangent line of the circle through P, and the tangent line intersects the curve C(u) at a new point; repeat the calculation of the Hausdorff distance h corresponding to the new step size m , until h m ≤δmax, the iteration is terminated, and the comparison before and after optimization is shown in Figure 3 , which avoids the problem of "advance" or "lag" of discrete points.
[0034] S2, developable ruled surface construction: Use a three-dimensional modeling software to construct two construction lines according to the preset parameters: the first radius R1=19mm, the second radius R2=20mm, the length of the two construction lines is L=10mm, and the axial distance is set to 10mm. The information of the part to be processed is shown in Figure 4 .
[0035] Use the lofting function to fit the two construction lines into the developable ruled surface to be processed, which provides a curved surface model for subsequent tool path planning.
[0036] S3, considering the tool axis vector, the curved surface tool path planning: Curved surface offset processing: according to the radius of the tool used for machining, the curved surface to be processed is offset, and the offset curved surface is taken as the reference for tool path planning to avoid the influence of tool radius on machining accuracy.
[0037] Curved surface layering: the offset curved surface is divided into multiple curve layers parallel to the bottom surface according to different Z values, and each curve layer corresponds to a machining height plane.
[0038] Trajectory point acquisition and tool axis vector generation: based on the iterative algorithm of S1, the trajectory points of the upper and lower boundary curves of the curved surface are calculated respectively; the corresponding trajectory points of the upper and lower boundary curves are connected in turn to generate the tool axis vectors I, J, and K vectors of each trajectory point, and the trajectory of the lower boundary curve is the tool tip point trajectory, and finally the optimized tool path trajectory is formed.
[0039] S4, error evaluation of intermediate layer: Intermediate layer machining point calculation: let the starting machining point of the lower boundary be , and the corresponding tool axis direction vector be , the three-dimensional coordinates of the intermediate point and the extension parameter t and the target Z value of the intermediate layer are calculated by formula, and the machining points P(t) of each intermediate layer are obtained, and the calculation formula is: ; ; In the formula, , the Z value of the target layer is To extend the parameters.
[0040] Geometric deviation calculation and judgment: set the center of the theoretical circular arc as For each intermediate layer processing point P(t), the Euclidean distance of the actual point to the center of the theoretical circle is calculated by the formula And the geometric deviation And a judgment is made to evaluate the error.
[0041] Specifically, when is greater than 0, the actual point is out of bias, otherwise the actual point is in bias, and the overall average error is used to judge the rationality of the tool path planning.
[0042] The calculation formula is: ; ; In the formula, is the Euclidean distance of the actual point to the center of the theoretical circle, is the geometric deviation, and R is the theoretical circular arc radius.
[0043] S5, machine tool geometric error identification and compensation: Coordinate system mapping transmission relationship construction: analyze the topological structure of the five-axis cradle machine tool motion chain, as shown in Figure 5 , the mapping transmission path of the machine tool coordinate system, the rotary table coordinate system, the fixture coordinate system and the workpiece coordinate system is clear, and the mapping relationship between each coordinate system is established through the coordinate transformation matrix.
[0044] Error compensation equation establishment: the fixture offset, rotary table offset and angle error are taken as global compensation parameters, and introduced into the coordinate transformation equation: ; In the formula, is the rotary table coordinate system, is the angle coordinate system, is the workpiece coordinate system, and A and B are the rotation angles of the two rotary axes of the machine tool.
[0045] Error mapping and compensation: through partial derivative analysis, the influence of each axis error on the processing position in Cartesian space is quantified, the measured machine tool deviation is converted to the machine tool coordinate system by using the rotation matrix; the least square method is used to fit the global offset parameters, and the error compensation equation is established, realizing the mapping and compensation of each axis error to the Cartesian space.
[0046] S6, verification of the effectiveness of the method: Multiple simulations were conducted using the MATLAB simulation platform to verify the method, and the results were compared with traditional methods for generating toolpath trajectory points using equally divided curve trajectories. This evaluated the performance of the proposed precise bow height error control method based on Hausdorff distance assessment under complex trajectory paths. The simulated trajectories included two types: a typical floral contour and a scaled-down S-shaped contour.
[0047] like Figure 6 As shown, a flower-shaped contour with large curvature changes is first adopted. In MATLAB, the curve contour is obtained through a defined curve function, and then the trajectory points on the contour are obtained using an algorithm.
[0048] On this trajectory, a traditional method of equally divided curve trajectory was first used to generate trajectory points for simulation experiments. A certain number of trajectory points were pre-set to be generated. Subsequently, the number of trajectory points generated by the precise bow height error control method based on Hausdorff distance evaluation remained consistent with the aforementioned traditional method. The bow height error results of the processed trajectory points are as follows: Figure 7 As shown.
[0049] Table 1 shows the bow height error control effect of the traditional equal-division curve trajectory generation toolpath trajectory points. The bow height error in areas with large curve trajectory curvature changes was calculated and the average value was obtained. Table 3 shows the bow height error control effect obtained by the precise bow height error control method based on Hausdorff distance evaluation. These results show that the bow height error is effectively controlled by the precise bow height error control method based on Hausdorff distance evaluation. Specifically, the average bow height error decreased from 0.00035984 mm to 0.000034482 mm, a reduction of 90.41%.
[0050] Tables 2 and 4 show the bow height error control performance of the traditional equally divided curve trajectory method with fewer toolpath trajectory points and the bow height error control performance of the precise bow height error control method based on Hausdorff distance assessment with fewer trajectory points. These results show that the bow height error accuracy is still significantly improved. Specifically, the average bow height error is reduced from the initial 0.0013572 mm to 0.000100834 mm, a reduction of 92.57%.
[0051] Table 1. Effect of controlling the bow height error of toolpath points generated by traditional equally divided curve trajectory.
[0052] Table 2. Effect of Traditional Equally Divided Curve Trajectory Generation on Bow Height Error Control with Fewer Toolpath Trajectory Points
[0053] Table 3. Bow height error control effect of the precise bow height error control method based on Hausdorff distance assessment
[0054] Table 4. The accuracy of the bow height error control method based on Hausdorff distance assessment with fewer trajectory points.
[0055] Simulation experiments were conducted on the reduced-size S-shaped surface contour. Table 5 shows the machining simulation using the default toolpath in UG, i.e., the machining trajectory of the tool tip point, and the corresponding tool axis vector for each trajectory point. Error analysis was performed using the actual machining points and the point set on the toolpath trajectory surface to be machined. Table 6 shows the machining simulation using a precise bow height error control method based on Hausdorff distance evaluation to generate toolpath points for the upper and lower boundary curves of the reduced-size S-shaped surface contour. Error analysis was performed using the actual machining points and the point set on the toolpath trajectory surface to be machined. Figure 8 As shown.
[0056] Table 5. Geometric Deviation Analysis of the Middle Layer of UG Toolpath
[0057] Table 6. Geometric Deviation Analysis of the Intermediate Layer in the Precision Bow Height Error Control Method
[0058] Experimental results show that after adopting the precise bow height error control method based on Hausdorff distance evaluation provided by this invention, the bow height error control accuracy is improved, the five-axis machining error is reduced, the amount of machining data is reduced, the dense discretization of the OC method is avoided, the range of geometric deviation fluctuations is reduced, and the high-precision machining requirements are effectively met. Specific data are as follows: the average deviation of the machining point at z=2.5 decreased from 0.0432mm to 0.0047mm, a reduction of 89.12%. The average deviation of the machining point at z=5 decreased from 0.0432mm to 0.0063mm, a reduction of 85.41%. Similarly, the average deviation of the machining point at z=7.5 decreased from 0.0432mm to 0.0048mm, a reduction of 88.89%.
[0059] Therefore, this invention provides a precise bow height error control method based on Hausdorff distance evaluation. First, the interpolation step size is iteratively optimized using the OC method combined with Hausdorff distance to achieve precise bow height error control. Then, a ruled surface is constructed, and the surface toolpath is planned using tool axis vector mapping. Subsequently, the geometric deviation of the intermediate layer is evaluated to ensure the rationality of the toolpath. Finally, geometric errors are compensated through machine tool coordinate system mapping and global compensation parameters. This invention effectively solves the problems of approximate bow height error evaluation, difficulty in adapting to five-axis machining, and neglect of machine tool errors in existing technologies, significantly improving machining accuracy and efficiency.
[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A precise bow height error control method based on Hausdorff distance assessment, characterized in that, include: S1. Implementation of the precise bow height error iterative algorithm based on OC method: The initial chord length is calculated by approximating the curve segment using the OC method. The bow height error point within the positioning step is obtained by analytically solving the curve derivative to obtain the Hausdorff distance h0. The interpolation step size is adjusted iteratively to make the bow height error meet the threshold requirement δmax. S2. Construction of developable ruled surface: Determine the parameters of the two construction lines of the developable ruled surface to be processed. Based on the two construction lines with unequal radii and parallel axes, generate the developable ruled surface to be processed using the lofting function of 3D modeling software. As a preferred embodiment, the construction parameters are: lower construction line radius R1 = 19mm, upper construction line radius R2 = 20mm, construction line length L = 10mm, and axial distance between the two construction lines D = 10mm. S3. Toolpath planning for surfaces considering tool axis vectors: The surface to be machined is offset, and a horizontal cutting plane is used to divide the surface into layers between the two boundary curves. The surface is divided into multiple machining contour lines according to different Z values in the z-axis direction of the workpiece coordinate system for error evaluation. The trajectory points of the upper and lower boundary curves on the surface are obtained based on the iterative algorithm in step S1. The trajectory points of the upper and lower boundaries are connected to obtain the tool axis vectors I, J, and K, and the optimized toolpath trajectory is determined. S4. Intermediate layer error assessment: The vector extension method is used to calculate the machining points of each intermediate layer. The geometric deviation between the actual trajectory point and the theoretical arc center is calculated by Euclidean distance to assess the rationality of the toolpath planning. S5. Machine Tool Geometric Error Identification and Compensation: Construct the mapping and transfer relationship between the machine tool coordinate system, rotary table coordinate system, fixture coordinate system and workpiece coordinate system of the five-axis cradle machine tool, introduce global compensation parameters to establish error compensation equations, and realize the mapping and compensation of machine tool geometric errors. S6. Verification of Method Effectiveness: Simulation experiments were conducted on typical complex trajectories, including the flower-shaped contour and the scaled-down S-shaped surface, to compare the proposed control strategy with the traditional equal-section curve method. Simultaneously, experimental verification was carried out on a five-axis CNC machine tool. The average value of the bow height error of each segment of the curved trajectory was used as the evaluation index to measure the bow height error in the curvature change region and evaluate the bow height error control effect.
2. The precise bow height error control method based on Hausdorff distance assessment according to claim 1, characterized in that, In S1, the OC method calculates the initial chord length as follows: Based on the preset bow height error threshold δmax, and using the radius of curvature ρ of curve C(u) at the starting point P, the trajectory from... Closest arc starting from point initial chord length The chord length intersects the curve segment C(u) at the initial iteration point Q0; the initial chord length calculation formula satisfies the relationship between the chord length and the radius of curvature ρ and the bow height error threshold δmax, and is used to determine the chord length of the closely spaced circular arc starting from the starting point P. The initial chord length calculation formula is as follows: ; In the formula, represent Place The radius of curvature.
3. The precise bow height error control method based on Hausdorff distance assessment according to claim 2, characterized in that, In S1, the analytical solution for the error point of the inner bow height within the step length is as follows: S11, Setting the chord The slope is K, and the chord The slope is obtained from points P and Q0; S12. Let curve C(u) lie at point... The slope at point is k0, and the curve C(u) passes through the point... The derivative yields the following formula: ; S13. Let K = k0, and accurately find the corresponding bow height error point on the curve segment C(u). Calculate the Hausdorff distance h0 corresponding to this point. The formula for calculating the Hausdorff distance h0 corresponding to this point is: ; In the formula, Representative point In the curve The parameters, Represents a constant term.
4. The precise bow height error control method based on Hausdorff distance assessment according to claim 3, characterized in that, In S1, the iterative adjustment of the interpolation step size is as follows: the obtained Hausdorff distance h0 is compared with δmax. If h0 is not greater than δmax, then Q0 is taken as the farthest interpolation point within the interpolation period; if h0 is greater than δmax, then the bow height error point corresponding to h0 is taken as the farthest interpolation point. Draw a circle with center P and radius δmax. Draw a tangent line to this circle through point P, intersecting the curve C(u) at a new point. Repeat the analytical differentiation of the curve to calculate the Hausdorff distance h corresponding to the new step size. m until h m The iteration terminates when the value is not greater than δmax.
5. The precise bow height error control method based on Hausdorff distance assessment according to claim 1, characterized in that, In S3, the specific process of surface toolpath planning is as follows: S31. Based on the tool radius, offset the surface to be machined and analyze the envelope formed by the tool path trajectory; S32. Divide the offset surface into multiple curve layers parallel to the bottom surface according to different Z values in the z-axis direction of the workpiece coordinate system, and obtain the trajectory points of the upper and lower boundary curves respectively based on the iterative algorithm in step S1. S33. Connect the corresponding trajectory points of the upper and lower boundary curves in sequence to generate the tool axis vectors I, J, and K of each trajectory point. The trajectory of the lower boundary curve is the trajectory of the tool tip point, and finally the optimized toolpath is formed.
6. The precise bow height error control method based on Hausdorff distance assessment according to claim 1, characterized in that, In S4, the calculation process for intermediate layer processing points is as follows: Let the starting processing point of the lower boundary be The corresponding tool axis direction vector is The vector extension method is used to calculate the coordinates of the intermediate layer processing points, determine the extension parameter t and the target Z value of the intermediate layer, and the calculation formula is as follows: ; ; In the formula, The Z value of the target layer. For extended parameters.
7. The precise bow height error control method based on Hausdorff distance assessment according to claim 6, characterized in that, In S4, the calculation process for geometric deviation is as follows: Let the center of the theoretical arc be... For each actual processing point P(t) in the intermediate layer, calculate the Euclidean distance from the actual point to the theoretical center of the circle according to the formula. and geometric deviation And make a judgment, specifically when When the value is greater than 0, the actual point is externally deflected; otherwise, the actual point is internally deflected. The calculation formula is as follows: ; ; In the formula, Let Euclidean distance be the actual point from the theoretical center of the circle. R represents the geometric deviation, and R is the theoretical radius of the circular arc.
8. The precise bow height error control method based on Hausdorff distance assessment according to claim 1, characterized in that, In S5, the process of constructing the mapping and transfer relationship of the machine tool coordinate system is as follows: analyze the kinematic chain topology of the five-axis cradle machine tool, clarify the transfer path between the machine tool coordinate system, rotary table coordinate system, fixture coordinate system and workpiece coordinate system, and establish the mapping and transfer relationship between each coordinate system through the coordinate transformation matrix.
9. The precise bow height error control method based on Hausdorff distance assessment according to claim 8, characterized in that, In S5, the process of machine tool geometric error compensation is as follows: S51. Fixture offset, rotary table offset, and angular error are used as global compensation parameters and introduced into the coordinate transformation equation, which is: ; In the formula, For the turntable coordinate system, Using an angular coordinate system, Let A be the workpiece coordinate system, and let A and B be the rotation angles of the two rotation axes of the machine tool, respectively. S52. The influence of each axis error on the machining position in Cartesian space is quantified by partial derivative analysis, and the measured machine tool deviation is transformed to the machine tool coordinate system using a rotation matrix. S53. Establish the error compensation equation, and use the least squares method to fit the global offset parameters to realize the mapping and compensation of each axis error to the Cartesian space.
10. The precise bow height error control method based on Hausdorff distance assessment according to claim 1, characterized in that, In S6, the formula for calculating the average bow height error is: ; In the formula, This represents the average error of the step length and bow height for each segment of the curved trajectory. For the first The bow height error of the step length.