Nonlinear error control method and control system for numerical control machine tool

By constructing a nonlinear error dynamic calculation model and real-time correction technology, the problem of insufficient error calculation accuracy in multi-axis CNC machine tools has been solved, achieving higher machining accuracy and efficiency, and ensuring the stability of machine tool operation.

CN122044086APending Publication Date: 2026-05-15JIANGSU SANMAS MECHANICAL & ELECTRICAL EQUIPMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU SANMAS MECHANICAL & ELECTRICAL EQUIPMENT CO LTD
Filing Date
2026-04-01
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing nonlinear error control methods are insufficient in terms of error calculation accuracy, resulting in insufficient machining accuracy of multi-axis CNC machine tools. Furthermore, traditional methods fail to effectively balance machining efficiency and machine tool operation safety.

Method used

A nonlinear error dynamic calculation model integrating axis velocity and acceleration constraints is constructed. An error equivalent curve is constructed by using a piecewise quadratic function fitting method. Combined with real-time error correction, online optimization of the tool position point and tool axis vector is achieved to obtain the theoretical trajectory.

Benefits of technology

It improves the accuracy and effectiveness of error control, enhances the machining precision and efficiency of multi-axis CNC machine tools, ensures the smooth operation of machine tools, and solves the problems of error calculation deviation and abnormal axis movement that exist in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122044086A_ABST
    Figure CN122044086A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of numerical control machine tools, and provides a nonlinear error control method and system for a numerical control machine tool, and the method comprises the steps: constructing a nonlinear error dynamic calculation model fusing the axial speed and acceleration constraints, and traversing the time nodes of an interpolation period between two adjacent cutter location points, obtaining a nonlinear error value of each time node according to the nonlinear error dynamic calculation model, and obtaining a maximum nonlinear error and a corresponding actual position; taking two adjacent cutter location points and the actual position of the maximum nonlinear error as fitting feature points, and constructing a nonlinear error equivalent curvilinear equation by adopting a piecewise quadratic function fitting method; performing error control according to the nonlinear error equivalent curve equation and the error allowable value, if the nonlinear error of the interpolation section meets the precision requirement, not performing optimization, and if the nonlinear error of the interpolation section does not meet the precision requirement, performing interpolation point optimization processing to obtain a theoretical trajectory. According to the invention, the error control accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machine tool technology, and more specifically, to a nonlinear error control method and control system for CNC machine tools. Background Technology

[0002] CNC machine tools, short for numerical control machine tools, are automated machine tools equipped with a program control system. This system logically processes programs with control codes or other symbolic instructions, decodes them, represents them with coded numbers, and inputs them into the CNC device via an information carrier. After processing, the CNC device sends various control signals to control the CNC machine tool's movements, automatically machining parts according to the shape and dimensions required by the drawings.

[0003] Currently, the industry has proposed various control methods for the nonlinear errors caused by the rotational axis motion of multi-axis CNC machine tools. Traditional tool position densification methods involve directly inserting a new tool position at the midpoint of adjacent tool positions, assuming the midpoint is the location of the maximum nonlinear error. For example, the Chinese invention patent application CN202211414243.0, entitled "A Control Method for Nonlinear Errors of CNC Machine Tools," does not actually calculate the error distribution pattern, and is prone to insufficient control accuracy due to the actual offset of the maximum error point.

[0004] In other words, existing nonlinear error control methods are insufficient in terms of error calculation accuracy and have room for optimization. There is an urgent need for a nonlinear error control method for CNC machine tools that can improve machining accuracy. Summary of the Invention

[0005] Based on this, in order to solve the problem of insufficient accuracy in error calculation of existing nonlinear error control methods, this invention provides a nonlinear error control method and control system for CNC machine tools, the specific technical solution of which is as follows: A nonlinear error control method for CNC machine tools, comprising: Based on the configuration parameters and dynamic parameters of the motion axes of the CNC machine tool, a nonlinear error dynamic calculation model integrating axis speed and acceleration constraints is constructed. The time nodes of the interpolation cycle between two adjacent tool positions are traversed. The nonlinear error value of each time node is obtained according to the nonlinear error dynamic calculation model, and the maximum nonlinear error and the corresponding actual position are obtained. Using the actual positions of two adjacent cutter sites and the maximum nonlinear error as fitting feature points, a piecewise quadratic function fitting method is used to construct the equivalent curve equation of the nonlinear error. Error control is performed based on the equivalent curve equation of nonlinear error and the allowable error value. If the nonlinear error of the interpolation segment meets the accuracy requirements, no optimization is performed. If it does not meet the requirements, the interpolation point is optimized to obtain the theoretical trajectory.

[0006] The described nonlinear error control method for CNC machine tools traverses the time nodes of the interpolation cycle between two adjacent tool positions and obtains the nonlinear error value at each time node based on the nonlinear error dynamic calculation model. It then obtains the maximum nonlinear error and its corresponding actual position, enabling precise identification of the actual position and value of the maximum nonlinear error. This avoids the control deviation caused by the traditional method of fixing the midpoint of the tool position as the maximum error point, providing an accurate and reliable basis for subsequent error control. Simultaneously, using the actual positions of two adjacent tool positions and the maximum nonlinear error as fitting feature points, a piecewise quadratic function fitting method is used to construct the equivalent curve equation of the nonlinear error. Compared to traditional single quadratic function or linear fitting methods, the fitting feature points are more targeted, which helps improve the fitting accuracy of the error curve and accurately reflects the actual change law of the nonlinear error. This makes subsequent error classification control more targeted, thereby improving the effectiveness and accuracy of error control.

[0007] In addition, based on the configuration parameters and dynamic parameters of the motion axes of the CNC machine tool, a nonlinear error dynamic calculation model integrating axis speed and acceleration constraints is constructed. This invention breaks through the limitations of traditional static error calculation, and it closely matches the dynamic motion process of actual machining of multi-axis CNC machine tools, making the error calculation more realistic.

[0008] Preferably, the nonlinear error control method for CNC machine tools further includes: The actual trajectory of the tool position point during the machining process is collected in real time. The real-time error is obtained based on the actual trajectory and the theoretical trajectory. The optimized tool position point point and tool axis vector are then corrected online based on the real-time error. The tool position point and tool axis vector after secondary online correction are transformed by the inverse kinematics of the machine tool to obtain the corresponding NC numerical control program, and the NC numerical control program is sent to the CNC machine tool for machining.

[0009] Preferably, the specific method for constructing a nonlinear error dynamic calculation model includes: Between two adjacent cut point sites, an interpolation point sequence is generated; A fundamental error model for obtaining the fundamental nonlinear error is constructed based on two adjacent tool points and the interpolation point sequence. By incorporating shaft velocity and acceleration constraints into the basic error model, a dynamic calculation model for nonlinear error is obtained, which is used to correct the basic nonlinear error through shaft velocity and acceleration. Among them, the basic nonlinear error is used to quantify the degree to which the interpolation point deviates from the ideal straight line trajectory.

[0010] Preferably, the specific method for obtaining the theoretical trajectory includes: If the maximum nonlinear error is greater than the allowable error value, and the absolute value of the error gradient at the maximum nonlinear error is less than the preset gradient threshold, insert the midpoint tool position and perform a midpoint encryption. If the maximum nonlinear error is greater than the allowable error value, and the absolute value of the error gradient at the maximum nonlinear error is not less than the preset gradient threshold, adaptive interpolation is performed, and the number of interpolation points is determined by the ratio of the absolute value of the error gradient to the allowable error value.

[0011] Preferably, the specific method for obtaining the preset gradient threshold includes: The initial gradient threshold is obtained by multiplying the allowable error value and the proportional adjustment coefficient. Based on the vibration test of CNC machine tools, the vibration of CNC machine tools was monitored, and the maximum allowable acceleration under different proportional adjustment coefficients was tested. Optimize the proportional adjustment coefficient so that when the absolute value of the error gradient is not less than the preset gradient threshold, the maximum allowable acceleration decrease ratio after interpolation is greater than the preset proportional threshold. The preset gradient threshold is obtained by multiplying the optimized proportional adjustment coefficient and the allowable error value.

[0012] A nonlinear error control system for CNC machine tools, used to implement the aforementioned nonlinear error control method for CNC machine tools, comprising: The error dynamic calculation model construction module is used to construct a nonlinear error dynamic calculation model that integrates axis velocity and acceleration constraints based on the configuration parameters and dynamic parameters of the motion axes of the CNC machine tool. The nonlinear error acquisition module is used to traverse the time nodes of the interpolation cycle between two adjacent tool points, obtain the nonlinear error value of each time node according to the nonlinear error dynamic calculation model, and obtain the maximum nonlinear error and the corresponding actual position. The error equivalent curve equation construction module is used to construct the nonlinear error equivalent curve equation by using the actual positions of two adjacent tool points and the maximum nonlinear error as fitting feature points and employing a piecewise quadratic function fitting method. The interpolation point optimization module is used to control errors based on the equivalent curve equation of the nonlinear error and the allowable error value. If the nonlinear error of the interpolation segment meets the accuracy requirements, no optimization is performed; otherwise, interpolation point optimization is performed to obtain the theoretical trajectory.

[0013] Preferably, the CNC machine tool nonlinear error control system further includes: The secondary online correction module is used to collect the actual trajectory of the tool position point in real time during the machining process, obtain the real-time error based on the actual trajectory and the theoretical trajectory, and perform secondary online correction on the optimized tool position point point and tool axis vector based on the real-time error. The NC program acquisition module is used to obtain the corresponding NC program by transforming the tool position point and tool axis vector after secondary online correction through the inverse kinematics of the machine tool, and then send the NC program to the CNC machine tool for machining.

[0014] Preferably, the error dynamic calculation model construction module includes: The interpolation point sequence generation unit is used to generate an interpolation point sequence between two adjacent cut point sites; The basic error model construction unit is used to construct a basic error model for obtaining basic nonlinear errors based on two adjacent tool positions and the interpolation point sequence. The error dynamic calculation model construction unit is used to integrate shaft velocity and acceleration constraints into the basic error model to obtain a nonlinear error dynamic calculation model for correcting the basic nonlinear error through shaft velocity and acceleration. Among them, the basic nonlinear error is used to quantify the degree to which the interpolation point deviates from the ideal straight line trajectory.

[0015] Preferably, the interpolation point optimization module includes: A midpoint encryption unit is used to insert a midpoint tool position and perform a midpoint encryption when the maximum nonlinear error is greater than the allowable error value and the absolute value of the error gradient at the maximum nonlinear error is less than a preset gradient threshold. The adaptive interpolation unit is used to perform adaptive interpolation when the maximum nonlinear error is greater than the allowable error value and the absolute value of the error gradient at the maximum nonlinear error is not less than a preset gradient threshold. The number of interpolation points is determined by the ratio of the absolute value of the error gradient to the allowable error value.

[0016] Preferably, the interpolation point optimization module further includes: The initial gradient threshold acquisition unit is used to obtain the initial gradient threshold based on the product between the error allowable value and the proportional adjustment coefficient. The maximum acceleration acquisition unit is used to monitor the vibration of CNC machine tools based on CNC machine tool vibration experiments and to test the maximum allowable acceleration under different proportional adjustment coefficients. The proportional adjustment coefficient optimization unit is used to optimize the proportional adjustment coefficient so that when the absolute value of the error gradient is not less than the preset gradient threshold, the maximum allowable acceleration decrease ratio after interpolation is greater than the preset proportional threshold. The preset gradient threshold acquisition unit is used to obtain the preset gradient threshold based on the product between the optimized proportional adjustment coefficient and the error allowable value. Attached Figure Description

[0017] The invention will be further understood from the following description taken in conjunction with the accompanying drawings. The components in the drawings are not necessarily drawn to scale, but rather the emphasis is on illustrating the principles of the embodiments. In different views, the same reference numerals designate corresponding parts.

[0018] Figure 1 This is a schematic diagram of the overall process of a nonlinear error control method for CNC machine tools according to an embodiment of the present invention; Figure 2This is a flowchart illustrating a specific method for constructing a nonlinear error dynamic calculation model in one embodiment of the present invention; Figure 3 This is a schematic diagram of the overall process of a nonlinear error control method for CNC machine tools according to another embodiment of the present invention; Figure 4 This is a flowchart illustrating a specific method for obtaining a theoretical trajectory in one embodiment of the present invention; Figure 5 This is a flowchart illustrating the specific method for obtaining a preset gradient threshold in one embodiment of the present invention; Figure 6 This is a schematic diagram of the overall structure of a nonlinear error control system for a CNC machine tool according to an embodiment of the present invention. Figure 1 ; Figure 7 This is a schematic diagram of the overall structure of a CNC machine tool according to an embodiment of the present invention. Figure 1 ; Figure 8 This is a schematic diagram of the overall structure of a CNC machine tool according to an embodiment of the present invention. Figure 2 ; Figure 9 This is a schematic diagram of the error dynamic calculation model construction module in one embodiment of the present invention; Figure 10 This is a schematic diagram of the interpolation point optimization module in one embodiment of the present invention.

[0019] Explanation of reference numerals in the attached diagram: 1. X-axis linear motion unit; 2. Y-axis linear motion unit; 3. Z-axis linear motion unit; 4. Working platform. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to its embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of the invention.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0022] In this invention, "first" and "second" do not represent a specific quantity or order, but are merely used to distinguish names.

[0023] Before describing the embodiments of the present invention, a brief introduction to the prior art will be given.

[0024] With the development of high-end manufacturing fields such as aerospace, precision molds, and automotive parts, stringent requirements have been placed on the machining accuracy and surface quality of complex curved surface parts. Multi-axis CNC machine tools, represented by five-axis CNC machine tools, have become the core equipment for machining complex curved surfaces due to their advantages of completing multiple processes in one setup and their high efficiency and high precision.

[0025] Multi-axis CNC machine tool systems generally use linear interpolation to plan tool position trajectories. However, during machining, the linkage between the rotary axis and the linear axis causes the actual movement trajectory of the tool tip to deviate from the theoretical linear trajectory, resulting in nonlinear errors. Especially in the machining of curved parts, the rotary axis needs to frequently adjust its posture, which further amplifies these nonlinear errors, directly leading to substandard part surface accuracy. This becomes the core bottleneck restricting the machining accuracy of multi-axis CNC machine tools. Therefore, precise control of these nonlinear errors has become a key research direction in the field of multi-axis CNC machining.

[0026] Currently, the industry has proposed various control methods for the nonlinear errors caused by the rotational axis motion of multi-axis CNC machine tools, but all of them have obvious technical defects and cannot simultaneously achieve machining accuracy, machining efficiency, and machine tool operation safety, as detailed below: 1. Traditional tool position densification methods involve directly inserting a new tool position at the midpoint of adjacent tool positions. This method does not take into account the dynamic characteristics of the machine tool's motion axes, and indiscriminate densification will significantly reduce the machining efficiency of the machine tool, resulting in a waste of machining capacity. At the same time, this method assumes that the midpoint of the tool position is the position of the maximum nonlinear error. For example, the Chinese invention patent "A Control Method for Nonlinear Error of CNC Machine Tool" disclosed in application number CN202211414243.0 does not actually calculate the error distribution law, and the actual offset of the maximum error point is prone to cause insufficient control accuracy. Furthermore, the motion axis speed and acceleration parameters are not verified after densification, which can easily lead to sudden changes in axis motion.

[0027] 2. Some technologies use vector interpolation to replace traditional linear interpolation. Although this can reduce the deviation of the tool axis vector, the rotational axis motion corresponding to the interpolation vector cannot meet the requirements of smooth operation. Especially when the interpolation vector is close to the singular area of ​​the machine tool, the speed and acceleration of the rotational axis will vibrate violently, exceeding the design performance threshold of the machine tool, which can easily cause wear or even damage to machine tool components.

[0028] 3. Existing nonlinear error calculation models are mostly static models that do not incorporate the speed and acceleration constraints of the machine tool's motion axes. This disconnects them from the actual dynamic motion process of machining, resulting in significant deviations in error calculation. Furthermore, the error equivalent curve is constructed using only a single quadratic function or linear fitting, and the selection of fitting feature points is limited, which cannot accurately reflect the actual changing patterns of nonlinear errors and can mislead subsequent error control.

[0029] 4. Existing control methods are all offline optimization modes, which only optimize the APT tool path file before machining. They do not take into account the additional errors caused by sudden factors such as machine tool thermal deformation, tool micro-wear, workpiece clamping deformation, and motion axis clearance during actual machining. The theoretical trajectory after offline optimization will still deviate in actual machining, and the final machining accuracy cannot be guaranteed.

[0030] One objective of this invention is to address the problem of insufficient accuracy in error calculation in existing nonlinear error control methods, thereby improving the accuracy of error control. To this end, as... Figure 1 As shown, an embodiment of the present invention provides a nonlinear error control method for CNC machine tools, comprising the following steps: S1. Based on the configuration parameters and dynamic parameters of the CNC machine tool and its motion axes, a nonlinear error dynamic calculation model integrating axis speed and acceleration constraints is constructed. The time nodes of the interpolation cycle between two adjacent tool positions are traversed. The nonlinear error value of each time node is obtained according to the nonlinear error dynamic calculation model. The maximum nonlinear error and the corresponding actual position are obtained.

[0031] The configuration parameters of CNC machine tools include, but are not limited to, the configuration adaptation parameters of AC double-swivel head, BC rotary table, and gantry multi-axis machine tools. The dynamic parameters of the motion axes include, but are not limited to, the allowable speed values, allowable acceleration values, and axis linkage characteristic parameters for each linear and rotary axis. The maximum nonlinear error can be understood as the maximum distance by which the actual trajectory curve deviates from the theoretical straight trajectory.

[0032] As a preferred technical solution, such as Figure 2 As shown, the specific methods for constructing a nonlinear error dynamic calculation model include: S11 generates an interpolation point sequence that satisfies the axis velocity / acceleration constraints between two adjacent tool positions.

[0033] Calculate the linear displacement between two adjacent tool positions, and obtain the maximum allowable feed rate of the interpolation segment based on the dynamic parameters of each axis. Combined with acceleration constraints, calculate the total time taken for the interpolation segment to accelerate from 0 to the maximum allowable feed rate and then decelerate back to 0. Finally, divide the total time equally according to the interpolation cycle to generate the interpolation point sequence.

[0034] S12, construct a basic error model for obtaining the basic nonlinear error based on two adjacent tool points and the interpolation point sequence.

[0035] Generally, due to the rotation of the rotary axis in CNC machine tools, the actual trajectory of the tool tip deviates from the theoretical straight trajectory. Here, the distance by which the actual tool tip trajectory deviates from the theoretical straight trajectory can be defined as the nonlinear error. For a given interpolation point, its theoretical trajectory is the straight line between two adjacent tool position points, while the actual trajectory is the tool tip position after the rotation of the rotary axis. Therefore, the nonlinear error can be understood as the perpendicular distance from the interpolation point to the straight line.

[0036] S13 integrates shaft velocity and acceleration constraints into the basic error model to obtain a dynamic calculation model for nonlinear error that corrects the basic nonlinear error through shaft velocity and acceleration.

[0037] Among them, the basic nonlinear error is used to quantify the degree to which the interpolation point deviates from the ideal straight line trajectory.

[0038] Specifically, the APT toolpath file can be imported first, and then parsed and standardized to extract valid toolpath data and unify the data format and coordinate system. Configuration parameters include the center distance of the oscillating head's A-axis rotation, the center distance of the oscillating head's C-axis rotation, and the travel of each linear axis of the machine tool. Dynamic parameters include the maximum allowable feed rate of each axis, the maximum allowable acceleration of each axis, the maximum angular velocity of the rotary axes, and the CNC system interpolation cycle.

[0039] Since shaft velocity / acceleration affects the generation density and position of interpolation points, and thus affects nonlinear error, shaft velocity and acceleration constraints can be incorporated into the basic error model to modify the basic error model and obtain a dynamic calculation model for nonlinear error that can be used to correct the basic nonlinear error through shaft velocity and acceleration.

[0040] When the actual feed rate approaches the maximum permissible feed rate, the interpolation point interval increases, amplifying the error. Therefore, it is necessary to correct the basic nonlinear error based on the actual feed rate to obtain a speed correction term. For example, the speed correction term = basic nonlinear error × (1 + speed correction coefficient × actual feed rate / maximum permissible feed rate). The speed correction coefficient is typically set between 0.05 and 0.2 and can be determined through machine tool calibration.

[0041] When the actual axis acceleration approaches the maximum allowable acceleration of the corresponding axis, acceleration fluctuations at the interpolation point can cause trajectory deviation. Therefore, it is necessary to correct the basic nonlinear error based on the actual axis acceleration to obtain an acceleration correction term. For example, the acceleration correction term = basic nonlinear error × (1 + acceleration correction coefficient × actual axis acceleration / maximum acceleration). The acceleration correction coefficient is typically taken as 0.03~0.15 and can be determined through machine tool testing and calibration.

[0042] For the velocity correction coefficient and the acceleration correction coefficient, the least squares method can be used to fit and correct them by comparing the corresponding calculated values ​​with the measured values. That is, the optimal velocity correction coefficient and acceleration correction coefficient can be solved in reverse by measuring the error values ​​under different velocities / accelerations.

[0043] The final nonlinear error dynamic calculation model can be expressed as: Nonlinear error at a certain interpolation point after merging axis velocity and acceleration constraints = basic nonlinear error + velocity correction term + acceleration correction term.

[0044] In actual machining, when the rotary and linear axes of a multi-axis machine tool are linked, the higher the speed and the greater the acceleration, the more obvious the generation interval / fluctuation of interpolation points, and the nonlinear error will be significantly amplified. For example, when machining curved surfaces at high speed, the static error is 0.01mm, but when the speed is close to the maximum value, the actual error may reach 0.02mm. The aforementioned dynamic calculation model for nonlinear error quantifies this amplification effect through speed correction terms and acceleration correction terms, which makes the error calculation results closer to the actual operating state of the machine tool, avoiding the static model's underestimation of error leading to machining deviations or overestimation of error leading to excessive refinement.

[0045] In actual machining, speed and acceleration are often coupled. For example, acceleration fluctuations at high speeds amplify errors far more than equivalent acceleration fluctuations at low speeds. For instance, when the actual feed rate approaches the maximum allowable feed rate and the actual axis acceleration approaches the maximum acceleration, the actual error amplification effect exhibits nonlinear superposition, such as a product-level amplification. The linear summation of the aforementioned nonlinear error dynamic calculation model will underestimate the error, leading to insufficient optimization of the interpolation segment and substandard machining accuracy. Therefore, a speed-acceleration coupling coefficient can be introduced to optimize the nonlinear error dynamic calculation model to reflect the synergistic amplification effect. The optimized nonlinear error dynamic calculation model is expressed as: Nonlinear error at a certain interpolation point after integrating axis speed and acceleration constraints = Basic nonlinear error + Speed ​​correction term + Acceleration correction term + Speed-acceleration coupling coefficient × Speed ​​correction term × Acceleration correction term. The speed-acceleration coupling coefficient can be experimentally calibrated and is generally between 0.01 and 0.05.

[0046] When the actual feed rate is much lower than the maximum allowable feed rate, such as in low-speed finishing, the interpolation points are generated more densely, the trajectory is smoother, and the final actual nonlinear error is generally smaller than the basic nonlinear error. Therefore, the speed correction term can be activated only when the actual feed rate is greater than a certain value, such as when the ratio between the actual feed rate and the maximum allowable feed rate (actual feed rate / maximum allowable feed rate) is greater than 0.3, in order to take into account the error reduction characteristics under low speed and smooth acceleration.

[0047] The total interpolation time of two adjacent tool positions is divided according to the interpolation cycle of the CNC system to generate all the time nodes that need to be calculated, thereby constructing the time node sequence of the interpolation cycle.

[0048] After constructing the time node sequence of the interpolation cycle, the actual position of the tool tip at each time node is calculated based on the machine tool kinematics model, thereby obtaining the actual interpolation point coordinates corresponding to each time node. Specifically, the A / C axis angle is first calculated based on the tool axis vector at the tool position point, and the actual coordinates of the tool tip are calculated in combination with the A / C axis angle; for each time node, the theoretical interpolation point at that moment is first calculated, and then substituted into the forward kinematics model to obtain the actual interpolation point coordinates.

[0049] Next, the nonlinear error at each time point is calculated to quantify the degree to which each actual interpolation point deviates from the theoretical straight line trajectory; all nonlinear error sequences are traversed, the maximum value is taken as the maximum nonlinear error, and the actual position and value corresponding to the maximum nonlinear error are obtained.

[0050] S2, using the actual positions of two adjacent tool points and the maximum nonlinear error as fitting feature points, constructs the equivalent curve equation of nonlinear error using a piecewise quadratic function fitting method.

[0051] Here, the actual positions of two adjacent cutter sites and the maximum nonlinear error can be used as fitting feature points, and the interpolation segment can be split into two fields. The first sub-segment corresponds to the distance from the first cutter site to the maximum nonlinear error among the two adjacent cutter sites, and the second sub-segment corresponds to the distance from the maximum nonlinear error to the last cutter site among the two adjacent cutter sites. Compared with a single quadratic function / linear fitting, this method can accurately match the single-peak nonlinear change pattern of error rising from 0 to the maximum nonlinear error and then falling back to 0, significantly improving the fitting accuracy.

[0052] S3. Error control is performed based on the equivalent curve equation of nonlinear error and the allowable error value. If the nonlinear error of the interpolation segment meets the accuracy requirements, no optimization is performed. If it does not meet the requirements, the interpolation point is optimized to obtain the theoretical trajectory.

[0053] Here, the allowable value for nonlinear error can be set. Based on the equation of the equivalent curve of nonlinear error and the equivalent straight line of the allowable value of nonlinear error The intersection point is divided into three categories for error control with dynamic constraints on the motion axis. If the nonlinear error of the interpolation segment meets the accuracy requirements, no optimization is performed. If it does not meet the requirements, the interpolation point is optimized in combination with the allowable thresholds of the speed and acceleration of the machine tool motion axis.

[0054] For example, when the straight line When the interpolation segment's nonlinear error has no intersection with the equivalent curve of the nonlinear error (i.e., the allowable error value > the maximum nonlinear error), the nonlinear error of the interpolation segment meets the accuracy requirements and no optimization is performed; when the straight line... It intersects the nonlinear error equivalent curve at only one point, namely At the maximum nonlinear error, the maximum nonlinear error of the interpolation segment is at a critical value. At this time, a tool position point splitting and densification can be performed in conjunction with the dynamic constraints of the motion axis. The newly inserted tool position point and tool axis vector satisfy that the axis velocity and acceleration do not exceed the threshold. When the straight line The equivalent curve of the nonlinear error has two intersection points, namely When the maximum nonlinear error is reached, the interpolation point corresponding to the allowable error value can be calculated first. Then, the number of interpolation points can be determined by combining the dynamic constraints of the motion axis. After rounding and halving the number of interpolation points, the coordinates of the new interpolation points can be determined according to the principle of equal segmentation interpolation. The axis motion parameters of the new interpolation points should meet the allowable constraints of velocity and acceleration.

[0055] Thus, by classifying the intersection points of the nonlinear error equivalent curve and the allowable error value into three categories, error control with dynamic constraints on the motion axes is carried out. This invention abandons the traditional method of indiscriminate tool position densification, and does not optimize the interpolation segments that meet the accuracy requirements, thus maximizing the preservation of the machine tool's machining efficiency and avoiding waste of machining capacity. At the same time, in the optimization process, the interpolation point design is combined with the allowable thresholds of the machine tool's motion axes speed and acceleration to ensure that the operating parameters of each motion axis of the machine tool do not exceed the threshold after optimization, avoiding sudden changes in axis motion, ensuring the smooth operation of the machine tool, and solving the problem that traditional densification methods are prone to causing abnormal axis motion.

[0056] In summary, the proposed CNC machine tool nonlinear error control method, by traversing the time nodes of the interpolation cycle between two adjacent tool positions and obtaining the nonlinear error values ​​at each time node according to the nonlinear error dynamic calculation model, obtains the maximum nonlinear error and its corresponding actual position. This enables accurate identification of the actual position and value of the maximum nonlinear error, avoiding the control deviation caused by the traditional method of fixing the midpoint of the tool position as the maximum error point, and providing an accurate and reliable basis for subsequent error control. Simultaneously, using the actual positions of two adjacent tool positions and the maximum nonlinear error as fitting feature points, a piecewise quadratic function fitting method is used to construct the equivalent curve equation of the nonlinear error. Compared with the traditional single quadratic function or linear fitting method, the fitting feature points are more targeted, which helps improve the fitting accuracy of the error curve, accurately reflects the actual change law of the nonlinear error, and makes subsequent error classification control more targeted, thereby improving the effectiveness of error control.

[0057] In addition, based on the configuration parameters and dynamic parameters of the motion axes of the CNC machine tool, a nonlinear error dynamic calculation model integrating axis speed and acceleration constraints is constructed. This invention breaks through the limitations of traditional static error calculation, and it closely matches the dynamic motion process of actual machining of multi-axis CNC machine tools, making the error calculation more realistic.

[0058] In one embodiment, such as Figure 3 As shown, the nonlinear error control method for CNC machine tools further includes: S4 collects the actual trajectory of the tool position point during the machining process in real time, obtains the real-time error based on the actual trajectory and the theoretical trajectory, and performs secondary online correction on the optimized tool position point point and tool axis vector based on the real-time error.

[0059] Specifically, the actual tool tip position and tool axis posture data that match the theoretical interpolation cycle are collected in real time and preprocessed to eliminate noise in the original data and ensure data validity, thereby obtaining the actual trajectory of the tool position that is in time and space synchronized with the theoretical trajectory during the machining process.

[0060] Because machining errors on five-axis machine tools originate not only from tool tip position deviation but also from tool axis vector attitude deviations, especially in curved surface machining, tool axis tilt angle deviations can lead to incorrect cutting edge contact positions, resulting in surface errors. Therefore, real-time errors need to be calculated in two dimensions, rather than a single positional error.

[0061] The first step is to obtain the real-time nonlinear error of the tool tip position and the real-time attitude error of the tool axis vector. The tool axis vector is a unit vector, and its error is determined by jointly considering the vector angle deviation and the magnitude deviation to avoid attitude errors caused by vector distortion.

[0062] Next, the real-time nonlinear error of the tool tip position and the real-time attitude error of the tool axis vector are normalized to obtain the single-cycle real-time comprehensive error, which is: single-cycle real-time comprehensive error = (real-time nonlinear error of tool tip position / allowable position error) + (real-time attitude error of tool axis vector / allowable vector angle error).

[0063] If the single-cycle real-time comprehensive error is no greater than 1, it means that both dimensions of error meet the requirements. In this case, the actual trajectory of the tool position is not corrected, and the offline optimized tool position / tool ​​axis vector is used. Otherwise, it means that at least one dimension of error exceeds the threshold, triggering a second online correction.

[0064] After triggering the second online correction, the error can be further subdivided based on the single-cycle real-time comprehensive error. If 1 < single-cycle real-time comprehensive error ≤ 1.5, a small incremental correction is performed, with the correction amount ≤ 5% of the offline interpolation segment displacement; if the single-cycle real-time comprehensive error > 1.5, a large incremental correction is performed, with 5% ≤ correction amount ≤ 10% of the offline interpolation segment displacement, and a machining warning is triggered to remind the operator to check the machine tool / tool.

[0065] The corrected tool position point / tool ​​axis vector corresponding to the machine tool motion axis displacement, velocity, and acceleration should meet the machine tool dynamic parameter thresholds. The correction amount generally needs to meet the constraint conditions first, and then the accuracy requirements. That is, if the correction amount calculated according to accuracy exceeds the axis dynamic constraint, the upper limit of the constraint is taken as the maximum correction amount, and the interpolation segment is extended to perform multi-cycle step correction.

[0066] To address the characteristics of surface machining on five-axis machine tools, incremental compensation is used at the tool position point, i.e., compensation along the error normal to ensure the trajectory profile. Spherical linear interpolation is used for the tool axis vector to ensure it is a unit vector and avoid posture distortion. S-shaped acceleration / deceleration interpolation can be used between the corrected tool position point and tool axis vector and the previous interpolation segment to ensure a smooth trajectory and avoid sudden changes in axis motion speed.

[0067] S5, after the secondary online correction of the tool position point and tool axis vector, obtains the corresponding NC numerical control program through the inverse kinematics transformation of the machine tool, and sends the NC numerical control program to the CNC machine tool for machining.

[0068] Here, the system obtains the corresponding NC program by transforming the tool position point and tool axis vector after secondary online correction through the inverse kinematics of the machine tool. Based on the NC program, it obtains the actual motion commands of the corresponding X / Y / Z / A / C axes, drives the servo motor to perform machining, and realizes real-time trajectory correction.

[0069] In this embodiment, the present invention introduces an online secondary correction step. The actual trajectory data of the tool position point during actual machining is collected in real time by means of grating rulers, encoders and other devices at the machine tool end. The real-time comprehensive error is obtained by comparing the actual trajectory with the optimized theoretical trajectory. The tool position point point and tool axis vector after offline optimization are then corrected in a secondary manner, forming a dual error control mode of offline optimization and online closed-loop correction. This effectively solves the problem that traditional methods cannot cope with sudden factors such as thermal deformation, tool micro-wear, clamping deformation and motion axis clearance in actual machining due to offline optimization alone. This ensures that the machining trajectory fits the theoretical accuracy throughout the entire process, further improving the machining accuracy and surface quality of complex curved parts.

[0070] In one embodiment, such as Figure 4 As shown, the specific methods for obtaining the theoretical trajectory include: S31. If the maximum nonlinear error is greater than the allowable error value, and the absolute value of the error gradient at the maximum nonlinear error is less than the preset gradient threshold, insert the midpoint tool position and perform midpoint encryption once.

[0071] Specifically, when the absolute value of the error gradient at the point of maximum nonlinear error is less than the preset gradient threshold, it can be understood that the error accumulates slowly and the tool moves smoothly. In this case, only a small amount of interpolation is needed, such as inserting a midpoint tool position and performing midpoint densification once.

[0072] The allowable error value is generally set according to process requirements, such as 0.2mm. Assuming the first tool position point and the first tool axis vector are E1 and F1 respectively, and the second tool position point and the second tool axis vector are E2 and F2 respectively, then the newly inserted tool position point is (E1+E2) / 2, and the newly inserted tool axis vector is (F1+F2) / 2.

[0073] S32. If the maximum nonlinear error is greater than the allowable error value, and the absolute value of the error gradient at the maximum nonlinear error is not less than the preset gradient threshold, adaptive interpolation is performed. The number of interpolation points is determined by the ratio of the absolute value of the error gradient to the allowable error value.

[0074] When the absolute value of the error gradient at the point of maximum nonlinear error is not less than the preset gradient threshold, it indicates that the error accumulates rapidly in the region of strong nonlinearity, which may lead to a sudden change in acceleration. In this case, it is necessary to increase the number of interpolation points.

[0075] Here, this embodiment mainly introduces the error gradient to dynamically determine the interpolation density, avoiding over-optimization, so as to realize an adaptive error control mechanism based on the error gradient.

[0076] For example, the number of interpolation points is represented as .in, Represents the absolute value of the error gradient. Indicates the allowable error value. This represents the interpolation density adjustment factor (default 1.5), which is rounded down to n to ensure equal interpolation. The i-th new tool position is represented as E1 + (i / (n+1)) × (E2 - E1), and the i-th new tool axis vector is represented as F1 + (i / (n+1)) × (F2 - F1), i = 1, 2, ..., n. This indicates rounding up to the nearest integer.

[0077] The interpolation density adjustment coefficient can be calibrated experimentally to ensure that when the absolute value of the error gradient is large (i.e., the error changes drastically), n increases to improve the interpolation density and suppress sudden error changes; when the absolute value of the error gradient is small (the error changes gradually), n decreases to maintain efficiency and avoid over-optimization.

[0078] As a preferred technical solution, such as Figure 5 As shown, the specific methods for obtaining the preset gradient threshold include: S311, obtain the initial gradient threshold based on the product between the allowable error value and the proportional adjustment coefficient.

[0079] The scaling factor can generally be limited to the range of 0.1-0.2. When the scaling factor is small, the preset gradient threshold is stricter, which easily triggers dense interpolation. In this case, the strategy is relatively conservative and can achieve higher accuracy. When the scaling factor is large, the preset gradient threshold is more lenient, which makes it less likely to trigger dense interpolation and reduces the number of interpolations. In this case, the strategy is relatively aggressive, which is more efficient but slightly increases the risk to accuracy.

[0080] S312 is based on the vibration test of CNC machine tools to monitor the vibration of CNC machine tools and test the maximum allowable acceleration under different proportional adjustment coefficients.

[0081] Here, an AC double-swivel head five-axis machine tool can be used to select a typical surface machining program segment. By installing an acceleration sensor, parameters such as the machine tool vibration amplitude, etc., can be monitored.

[0082] S313, optimize the proportional adjustment coefficient so that when the absolute value of the error gradient is not less than the preset gradient threshold, the maximum allowable acceleration decrease ratio after interpolation is greater than the preset proportional threshold.

[0083] The preset percentage threshold can be set according to actual needs, such as setting it to 60%, to ensure that vibration can be effectively suppressed.

[0084] S314, obtain the preset gradient threshold based on the product of the optimized proportional adjustment coefficient and the error allowable value.

[0085] In this way, it can be ensured that the final preset gradient threshold can both suppress machine tool vibration and meet the actual machining constraints.

[0086] Generally speaking, the larger the entropy value of the error, the more drastic the fluctuation of the error within the interpolation segment, and the more peaks it exhibits, requiring more interpolation points; when the entropy value of the error approaches 0, the error is concentrated at a single point, requiring only local optimization.

[0087] The above number of interpolation points The function is linear and does not consider the error distribution pattern. Therefore, as a preferred technical solution, error distribution entropy can be introduced as an indicator to measure the uniformity of the nonlinear error distribution throughout the entire interpolation segment, and a piecewise nonlinear function can be constructed to obtain the number of interpolation points.

[0088] Specifically, the error distribution entropy H characterizes the severity of error fluctuations. When the error distribution entropy is less than the preset entropy threshold (default 0.2), it can be understood as an error distribution cluster, and the number of interpolation points n is set to the minimum number of interpolation points (default 1). When the error distribution entropy is not less than the preset entropy threshold, it can be understood as an error distribution cluster, and the number of interpolation points n is set to... .in, This represents the scaling factor, which is generally between 0.8 and 1.5, with a default value of 0.8.

[0089] Here, the error distribution entropy H is defined as the uniformity of the distribution of nonlinear errors within the time interval [0,1], based on information entropy theory. A preset entropy threshold is used as the critical value for judging whether the error distribution is uniform; it can be determined by statistically analyzing the relationship between the error distribution and the interpolation effect in historical processing data.

[0090] For example, a preset entropy threshold Where K represents the number of uniform sampling points within the interpolation segment. These represent the error amplitude factor and the reference error, respectively. The error amplitude factor can generally be defined as the mean error within the interpolation segment, while the reference error is generally the maximum allowable error of the system, typically 0.1 mm in engineering. Thus, by introducing the error amplitude factor, the preset entropy threshold can be adaptively adjusted to the error magnitude, resulting in a lower preset entropy threshold as the error amplitude decreases, thereby avoiding over-interpolation in small error scenarios.

[0091] In other words, when the maximum nonlinear error is greater than the allowable error value, and the absolute value of the error gradient at the maximum nonlinear error is not less than the preset gradient threshold, and the error distribution entropy is less than the preset entropy threshold, local peak interpolation is performed, requiring only one tool point to be inserted at the peak position to avoid global interpolation; when the maximum nonlinear error is greater than the allowable error value, and the absolute value of the error gradient at the maximum nonlinear error is not less than the preset gradient threshold, and the error distribution entropy is not less than the preset entropy threshold, adaptive interpolation is performed, with the number of interpolation points... .

[0092] It should be noted that for the number of interpolation points n, its boundaries can be constrained, that is, the maximum and minimum number of interpolation points can be limited.

[0093] In this way, the number of interpolation points is dynamically determined by the error distribution entropy and the maximum error gradient. At low entropy, i.e., when the error is concentrated, minimizing interpolation avoids over-interpolation in the low-entropy region, thus improving efficiency. At high entropy, the error fluctuates drastically, and... It can enhance the interpolation density.

[0094] Generally, when a machine tool performs continuous machining and the machining time increases, thermal deformation can easily lead to decreased accuracy and increased vibration, resulting in increased backlash and nonlinear errors. In such cases, increasing interpolation points can help maintain accuracy. Here, to correlate machine tool performance degradation factors and dynamically determine the density of interpolation points for adaptive error control, the continuous machining time of the CNC machine tool (in hours) can be obtained. Based on this continuous machining time, the number of interpolation points can be further optimized so that the final number of interpolation points is positively correlated with the continuous machining time. For example, the optimized number of interpolation points. .in, The performance degradation coefficient is used to quantify the degree of performance degradation of a machine tool after continuous processing. It can be calibrated through life tests such as vibration tests or set based on experience. The larger the value, the faster the degradation.

[0095] An embodiment of the present invention also provides a nonlinear error control system for CNC machine tools, used to implement the aforementioned nonlinear error control method for CNC machine tools, such as... Figure 6 As shown, it includes a module for constructing a dynamic error calculation model, a module for obtaining nonlinear errors, a module for constructing an equivalent error curve equation, and a module for optimizing interpolation points.

[0096] The CNC machine tool generally includes three linear axes (X, Y, and Z) and two rotary axes (such as A / C rotary axes). These three linear axes and two rotary axes are linked to achieve complex surface machining, and their motion trajectory is controlled by linear interpolation as defined by ISO standards. Figure 7 as well as Figure 8 As shown, the CNC machine tool described in this embodiment includes an X-axis linear motion unit 1, a Y-axis linear motion unit 2, and a Z-axis linear motion unit 3. The X-axis linear motion unit is fixedly mounted on the work platform 4, the Y-axis linear motion unit is fixedly mounted on the X-axis linear motion unit, and the Z-axis linear motion unit is fixedly mounted on the Y-axis linear motion unit. The X-axis linear motion unit, the Y-axis linear motion unit, and the Z-axis linear motion unit are combined together to drive the tool to move along the XYZ plane.

[0097] In addition to the X-axis linear motion unit, Y-axis linear motion unit, and Z-axis linear motion unit, the CNC machine tool also includes an A-axis motion unit and a C-axis motion unit, which are combined together to drive the tool to rotate along the A / axis.

[0098] Since the specific structure of a five-axis CNC machine tool is a conventional technical method in this field, it will not be described in detail here.

[0099] The error dynamic calculation model construction module is used to construct a nonlinear error dynamic calculation model that integrates axis speed and acceleration constraints based on the configuration parameters and motion axis dynamic parameters of the CNC machine tool. The nonlinear error acquisition module is used to traverse the time nodes of the interpolation cycle between two adjacent tool positions, obtain the nonlinear error value of each time node according to the nonlinear error dynamic calculation model, and obtain the maximum nonlinear error and the corresponding actual position.

[0100] Specifically, such as Figure 9 As shown, the error dynamic calculation model construction module includes an interpolation point sequence generation unit, a basic error model construction unit, and an error dynamic calculation model construction unit.

[0101] The interpolation point sequence generation unit is used to generate an interpolation point sequence between two adjacent tool points; the basic error model construction unit is used to construct a basic error model for obtaining the basic nonlinear error based on two adjacent tool points and the interpolation point sequence.

[0102] The error dynamic calculation model construction unit is used to integrate shaft velocity and acceleration constraints into the basic error model to obtain a nonlinear error dynamic calculation model for correcting the basic nonlinear error through shaft velocity and acceleration; wherein, the basic nonlinear error is used to quantify the degree to which the interpolation point deviates from the ideal straight trajectory.

[0103] Here, by constructing a nonlinear error dynamic calculation model that integrates axis velocity and acceleration constraints, the limitations of traditional static error calculation can be overcome, and the model can better reflect the dynamic motion process of actual machining on multi-axis CNC machine tools, making the error calculation more realistic. At the same time, by traversing the time nodes of the interpolation cycle between two adjacent tool points to calculate the error at each time node, the actual position and value of the maximum nonlinear error can be accurately identified, avoiding the control deviation caused by the traditional method of fixing the midpoint of the tool point as the maximum error point, and providing an accurate and reliable basis for subsequent error control.

[0104] The error equivalent curve equation construction module is used to construct the nonlinear error equivalent curve equation by using the actual positions of two adjacent tool points and the maximum nonlinear error as fitting feature points and employing a piecewise quadratic function fitting method. The interpolation point optimization module is used to perform error control based on the nonlinear error equivalent curve equation and the allowable error value. If the nonlinear error of the interpolation segment meets the accuracy requirements, no optimization is performed; otherwise, interpolation point optimization is performed to obtain the theoretical trajectory.

[0105] Here, the two adjacent tool positions and the actual position of the maximum nonlinear error are used as fitting feature points. A piecewise quadratic function fitting method is used to construct the error equivalent curve equation. Compared with the traditional single quadratic function or linear fitting method, the fitting feature points are more targeted, which can significantly improve the fitting accuracy of the error curve, accurately reflect the actual change law of nonlinear error, make the subsequent error classification control more targeted, and effectively improve the effectiveness of error control.

[0106] The interpolation point optimization module includes a primary midpoint encryption unit and an adaptive difference unit.

[0107] The first-point densification unit is used to insert a midpoint tool position and perform a first-point densification when the maximum nonlinear error is greater than the allowable error value and the absolute value of the error gradient at the maximum nonlinear error is less than the preset gradient threshold. The adaptive interpolation unit is used to perform adaptive interpolation when the maximum nonlinear error is greater than the allowable error value and the absolute value of the error gradient at the maximum nonlinear error is not less than the preset gradient threshold. The number of interpolation points is determined by the ratio of the absolute value of the error gradient to the allowable error value.

[0108] As a preferred technical solution, such as Figure 10 As shown, the interpolation point optimization module also includes an initial gradient threshold acquisition unit, a maximum acceleration acquisition unit, a proportional adjustment coefficient optimization unit, and a preset gradient threshold acquisition unit.

[0109] The initial gradient threshold acquisition unit is used to obtain the initial gradient threshold based on the product between the allowable error value and the proportional adjustment coefficient; the maximum acceleration acquisition unit is used to monitor the vibration of CNC machine tools based on CNC machine tool vibration experiments and test the maximum allowable acceleration under different proportional adjustment coefficients. The proportional adjustment coefficient optimization unit is used to optimize the proportional adjustment coefficient so that when the absolute value of the error gradient is not less than the preset gradient threshold, the maximum allowable acceleration decrease ratio after interpolation is greater than the preset proportional threshold; the preset gradient threshold acquisition unit is used to obtain the preset gradient threshold based on the product between the optimized proportional adjustment coefficient and the allowable error value.

[0110] In summary, the nonlinear error control system for CNC machine tools obtains the nonlinear error value at each time point by traversing the interpolation cycle between two adjacent tool positions and based on the nonlinear error dynamic calculation model. This allows for the accurate identification of the actual location and value of the maximum nonlinear error, avoiding the control deviation caused by the traditional method of fixedly identifying the midpoint of the tool position as the maximum error point. This provides an accurate and reliable basis for subsequent error control. Furthermore, by using the actual locations of two adjacent tool positions and the maximum nonlinear error as fitting feature points, a piecewise quadratic function fitting method is employed to construct the equivalent curve equation of the nonlinear error. Compared to traditional single quadratic function or linear fitting methods, the fitting feature points are more targeted, improving the fitting accuracy of the error curve and accurately reflecting the actual change law of the nonlinear error. This makes subsequent error classification control more targeted, thereby enhancing the effectiveness of error control.

[0111] In addition, based on the configuration parameters and dynamic parameters of the motion axes of the CNC machine tool, a nonlinear error dynamic calculation model integrating axis speed and acceleration constraints is constructed. This invention breaks through the limitations of traditional static error calculation, and it closely matches the dynamic motion process of actual machining of multi-axis CNC machine tools, making the error calculation more realistic.

[0112] In one embodiment, the nonlinear error control system for CNC machine tools further includes a secondary online correction module and an NC program acquisition module.

[0113] Specifically, the secondary online correction module is used to collect the actual trajectory of the tool position point during the machining process in real time, obtain the real-time error based on the actual trajectory and the theoretical trajectory, and perform secondary online correction on the optimized tool position point point and tool axis vector based on the real-time error; the NC program acquisition module is used to obtain the corresponding NC program by transforming the tool position point point and tool axis vector after secondary online correction through the inverse kinematics of the machine tool, and send the NC program to the CNC machine tool for machining.

[0114] In this embodiment, the present invention introduces an online secondary correction step. The actual trajectory data of the tool position point during actual machining is collected in real time by means of grating rulers, encoders and other devices at the machine tool end. The real-time comprehensive error is obtained by comparing the actual trajectory with the optimized theoretical trajectory. The tool position point point and tool axis vector after offline optimization are then corrected in a secondary manner, forming a dual error control mode of offline optimization and online closed-loop correction. This effectively solves the problem that traditional methods cannot cope with sudden factors such as thermal deformation, tool micro-wear, clamping deformation and motion axis clearance in actual machining due to offline optimization alone. This ensures that the machining trajectory fits the theoretical accuracy throughout the entire process, further improving the machining accuracy and surface quality of complex curved parts.

[0115] The technical features of the embodiments described can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0116] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.

Claims

1. A nonlinear error control method for CNC machine tools, characterized in that, include: Based on the configuration parameters and dynamic parameters of the motion axes of the CNC machine tool, a nonlinear error dynamic calculation model integrating axis speed and acceleration constraints is constructed. The time nodes of the interpolation cycle between two adjacent tool positions are traversed. The nonlinear error value of each time node is obtained according to the nonlinear error dynamic calculation model, and the maximum nonlinear error and the corresponding actual position are obtained. Using the actual positions of two adjacent cutter sites and the maximum nonlinear error as fitting feature points, a piecewise quadratic function fitting method is used to construct the equivalent curve equation of the nonlinear error. Error control is performed based on the equivalent curve equation of nonlinear error and the allowable error value. If the nonlinear error of the interpolation segment meets the accuracy requirements, no optimization is performed. If it does not meet the requirements, the interpolation point is optimized to obtain the theoretical trajectory.

2. The nonlinear error control method for CNC machine tools as described in claim 1, characterized in that, Also includes: The actual trajectory of the tool position point during the machining process is collected in real time. The real-time error is obtained based on the actual trajectory and the theoretical trajectory. The optimized tool position point point and tool axis vector are then corrected online based on the real-time error. The tool position point and tool axis vector after secondary online correction are transformed by the inverse kinematics of the machine tool to obtain the corresponding NC numerical control program, and the NC numerical control program is sent to the CNC machine tool for machining.

3. The nonlinear error control method for CNC machine tools as described in claim 1, characterized in that, Specific methods for constructing a nonlinear error dynamic calculation model include: Between two adjacent cut point sites, an interpolation point sequence is generated; A fundamental error model for obtaining the fundamental nonlinear error is constructed based on two adjacent tool points and the interpolation point sequence. By incorporating shaft velocity and acceleration constraints into the basic error model, a dynamic calculation model for nonlinear error is obtained, which is used to correct the basic nonlinear error through shaft velocity and acceleration. Among them, the basic nonlinear error is used to quantify the degree to which the interpolation point deviates from the ideal straight line trajectory.

4. The nonlinear error control method for CNC machine tools as described in claim 3, characterized in that, Specific methods for obtaining theoretical trajectories include: If the maximum nonlinear error is greater than the allowable error value, and the absolute value of the error gradient at the maximum nonlinear error is less than the preset gradient threshold, insert the midpoint tool position and perform a midpoint encryption. If the maximum nonlinear error is greater than the allowable error value, and the absolute value of the error gradient at the maximum nonlinear error is not less than the preset gradient threshold, adaptive interpolation is performed, and the number of interpolation points is determined by the ratio of the absolute value of the error gradient to the allowable error value.

5. The nonlinear error control method for CNC machine tools as described in claim 4, characterized in that, The specific methods for obtaining the preset gradient threshold include: The initial gradient threshold is obtained by multiplying the allowable error value and the proportional adjustment coefficient. Based on the vibration test of CNC machine tools, the vibration of CNC machine tools was monitored, and the maximum allowable acceleration under different proportional adjustment coefficients was tested. Optimize the proportional adjustment coefficient so that when the absolute value of the error gradient is not less than the preset gradient threshold, the maximum allowable acceleration decrease ratio after interpolation is greater than the preset proportional threshold. The preset gradient threshold is obtained by multiplying the optimized proportional adjustment coefficient and the allowable error value.

6. A nonlinear error control system for a CNC machine tool, used to implement the nonlinear error control method for a CNC machine tool as described in any one of claims 1-5, characterized in that, include: The error dynamic calculation model construction module is used to construct a nonlinear error dynamic calculation model that integrates axis velocity and acceleration constraints based on the configuration parameters and dynamic parameters of the motion axes of the CNC machine tool. The nonlinear error acquisition module is used to traverse the time nodes of the interpolation cycle between two adjacent tool points, obtain the nonlinear error value of each time node according to the nonlinear error dynamic calculation model, and obtain the maximum nonlinear error and the corresponding actual position. The error equivalent curve equation construction module is used to construct the nonlinear error equivalent curve equation by using the actual positions of two adjacent tool points and the maximum nonlinear error as fitting feature points and employing a piecewise quadratic function fitting method. The interpolation point optimization module is used to control errors based on the equivalent curve equation of the nonlinear error and the allowable error value. If the nonlinear error of the interpolation segment meets the accuracy requirements, no optimization is performed; otherwise, interpolation point optimization is performed to obtain the theoretical trajectory.

7. A nonlinear error control system for CNC machine tools as described in claim 6, characterized in that, Also includes: The secondary online correction module is used to collect the actual trajectory of the tool position point in real time during the machining process, obtain the real-time error based on the actual trajectory and the theoretical trajectory, and perform secondary online correction on the optimized tool position point point and tool axis vector based on the real-time error. The NC program acquisition module is used to obtain the corresponding NC program by transforming the tool position point and tool axis vector after secondary online correction through the inverse kinematics of the machine tool, and then send the NC program to the CNC machine tool for machining.

8. A nonlinear error control system for CNC machine tools as described in claim 7, characterized in that, The error dynamic calculation model construction module includes: The interpolation point sequence generation unit is used to generate an interpolation point sequence between two adjacent cut point sites; The basic error model construction unit is used to construct a basic error model for obtaining basic nonlinear errors based on two adjacent tool positions and the interpolation point sequence. The error dynamic calculation model construction unit is used to integrate shaft velocity and acceleration constraints into the basic error model to obtain a nonlinear error dynamic calculation model for correcting the basic nonlinear error through shaft velocity and acceleration. Among them, the basic nonlinear error is used to quantify the degree to which the interpolation point deviates from the ideal straight line trajectory.

9. A nonlinear error control system for CNC machine tools as described in claim 8, characterized in that, The interpolation point optimization module includes: A midpoint encryption unit is used to insert a midpoint tool position and perform a midpoint encryption when the maximum nonlinear error is greater than the allowable error value and the absolute value of the error gradient at the maximum nonlinear error is less than a preset gradient threshold. The adaptive interpolation unit is used to perform adaptive interpolation when the maximum nonlinear error is greater than the allowable error value and the absolute value of the error gradient at the maximum nonlinear error is not less than a preset gradient threshold. The number of interpolation points is determined by the ratio of the absolute value of the error gradient to the allowable error value.

10. A nonlinear error control system for a CNC machine tool as described in claim 9, characterized in that, The interpolation point optimization module also includes: The initial gradient threshold acquisition unit is used to obtain the initial gradient threshold based on the product between the error allowable value and the proportional adjustment coefficient. The maximum acceleration acquisition unit is used to monitor the vibration of CNC machine tools based on CNC machine tool vibration experiments and to test the maximum allowable acceleration under different proportional adjustment coefficients. The proportional adjustment coefficient optimization unit is used to optimize the proportional adjustment coefficient so that when the absolute value of the error gradient is not less than the preset gradient threshold, the maximum allowable acceleration decrease ratio after interpolation is greater than the preset proportional threshold. The preset gradient threshold acquisition unit is used to obtain the preset gradient threshold based on the product between the optimized proportional adjustment coefficient and the error allowable value.