An online precision correction method and system for multi-axis CNC machining
By constructing a digital twin of a multi-axis CNC machine tool, real-time acquisition and decomposition of tool and spindle data are performed to generate a virtual mirror error field. Combined with an energy efficiency constraint-based dynamic adjustment compensation strategy, the problems of difficulty in distinguishing error sources and neglecting energy efficiency in multi-axis CNC machining are solved, achieving efficient precision correction and resource optimization.
Patent Information
- Application Number
- CN202611202683.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-11-06
AI Technical Summary
Existing multi-axis CNC machining technology struggles to perceive the true physical state of the cutting interface in real time under high-speed, heavy-load cutting conditions, making it impossible to intelligently distinguish the source of error. This results in a lack of targeted compensation strategies and ignores energy efficiency constraints, leading to ineffective consumption of energy and cooling resources, which makes it difficult to meet the requirements of high-precision continuous machining.
A digital twin of a multi-axis CNC machine tool is constructed, and six-dimensional force and torque signals at the tool tip and micro-strain array data of the spindle bearing housing are acquired in real time. A virtual mirror error field is generated through a data assimilation algorithm, and orthogonal decomposition is performed. Combined with an energy efficiency constraint dynamic adjustment compensation strategy, the accuracy adaptive correction is achieved.
It improves the targeting and effectiveness of compensation, dynamically balances accuracy assurance and resource efficiency, avoids overcompensation or undercompensation, combines technical rationality and economic feasibility, and ensures the stability and safety of the processing process.
Smart Images

Figure CN123047456A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of precision control technology, specifically to an online precision correction method and system for multi-axis CNC machining. Background Technology
[0002] Multi-axis CNC machine tools undertake the core machining tasks of complex curved surface parts in aerospace, precision mold, and high-end equipment manufacturing. With the continuous improvement of part precision requirements and the pursuit of machining efficiency, how to maintain stable machining accuracy under high-speed and heavy-load cutting conditions has become a key technical bottleneck restricting the development of high-end manufacturing. In existing technologies, the guarantee of CNC machining accuracy mainly relies on two approaches: one is the static compensation method based on offline calibration and error budgeting. This method pre-measures machine tool geometric errors, thermal errors, etc., and establishes a compensation model, then writes the compensation value into the CNC system before machining or during machining intervals. However, this method cannot reflect the dynamic errors caused by time-varying factors such as tool wear, chatter, and thermal coupling during the cutting process, and the compensation lag is significant, making it difficult to meet the requirements of high-precision continuous machining. The second approach is the feedback compensation method based on online measurement. This method obtains the workpiece contour deviation by installing a probe or vision sensor on the machine and then corrects the machining parameters in reverse.
[0003] However, such methods have obvious drawbacks: First, contact probes take a long time to measure, interrupting the machining cycle and failing to capture high-frequency chatter information during cutting. Although non-contact sensors respond quickly, their measurement results only represent the final error and cannot distinguish the source of the error, such as tool wear, thermal deformation, chatter, etc., resulting in a lack of targeted compensation strategies and a tendency to overcompensate or miscompensate. Second, existing compensation methods generally ignore energy efficiency constraints, performing fixed-intensity compensation regardless of the error size, process stage, or amount of remaining material, leading to ineffective consumption of energy and cooling resources, which is inconsistent with the development trend of green manufacturing. In recent years, digital twin technology has been introduced into the CNC machining field to achieve condition monitoring and prediction by constructing virtual machine tool models. However, existing digital twin applications are mostly concentrated on equipment health monitoring or process simulation, especially lacking an adaptive correction mechanism that combines digital twin condition estimation results with machining economic evaluation, implements differentiated compensation based on error component characteristics, and balances accuracy assurance and resource efficiency during the compensation process.
[0004] Therefore, there is an urgent need for a multi-axis CNC online accuracy adaptive correction method that can sense the real physical state of the cutting interface in real time, intelligently distinguish the source of error, and dynamically adjust the compensation strategy according to energy efficiency constraints. Summary of the Invention
[0005] To address the aforementioned technical problems, an online accuracy correction method and system for multi-axis CNC machining is provided. This technical solution solves the problems mentioned above.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] An online accuracy correction method for multi-axis CNC machining includes:
[0008] A digital twin of a multi-axis CNC machine tool is constructed, the digital twin including the machine tool's geometric topology, servo dynamic parameters, and thermo-mechanical coupling field model;
[0009] During the machining process, six-dimensional force and torque signals at the tool tip and micro-strain array data of the spindle bearing housing are collected simultaneously. The measured data stream is then injected into the digital twin in real time through a data assimilation algorithm for state estimation, generating a virtual mirror error field that reflects the true physical state of the current cutting interface.
[0010] The virtual mirror error field is orthogonally decomposed to separate the slow-varying trend component caused by tool wear and the transient high-frequency component caused by cutting chatter.
[0011] Obtain the remaining material removal amount and target surface roughness requirements of the current processing step, and calculate the marginal utility index of accuracy compensation by combining the current energy consumption monitoring value of the machine tool.
[0012] The compensation corresponding to the slow-changing trend component is set as the benchmark accuracy guarantee item to maintain the part pass rate, and is executed regardless of the marginal utility index. When the marginal utility index is higher than the preset economic threshold, an additional value-added compensation item for the transient high-frequency component is enabled. The value-added compensation item is achieved by adjusting the spindle speed to avoid the resonance lobe diagram stability region.
[0013] The generated compensation strategy is converted into a macro program variable or RTCP tool tip compensation vector that can be recognized by the CNC system, and then smoothly superimposed onto the motion command in the next interpolation cycle.
[0014] Preferably, generating a virtual mirror error field that reflects the true physical state of the current cutting interface specifically includes:
[0015] The cutting force vector direction angle is extracted from the six-dimensional force and torque signals and compared with the theoretical cutting force direction in the digital twin to obtain the force-induced deformation deviation benchmark value.
[0016] Analyze the phase difference at each measuring point in the micro-strain array data to reconstruct the spatial distribution of principal axis thermal elongation and bending deformation;
[0017] The force-induced deformation deviation benchmark value is used as a weighting factor to weight and superimpose the spatial distribution morphology, and then mapped to the tool tip coordinate system through the inverse kinematics solver of the digital twin to output the virtual mirror error field.
[0018] Preferably, the marginal utility index for calculating accuracy compensation specifically includes:
[0019] Obtain the unit time power consumption rate and coolant flow rate at the current moment, normalize them, and sum them to obtain the instantaneous resource cost;
[0020] Based on historical processing statistics, an error-pass rate mapping model is established. According to the target surface roughness requirement and the amplitude of the current virtual mirror error field, the probability of scrap loss and rework time cost will be estimated if no compensation is made.
[0021] The marginal utility index is obtained by dividing the product of the scrap loss probability and the rework time cost by the instantaneous resource cost.
[0022] Preferably, the added compensation term for transient high-frequency components is achieved by adjusting the spindle speed to avoid the stable region of the resonant lobe diagram, specifically including:
[0023] Based on the modal parameters and current cutting depth in the digital twin, a three-dimensional stability lobe diagram is drawn in real time;
[0024] The rotational speed axis and depth of cut axis of the leaf lobe diagram are normalized, and the minimum normal distance from the current operating point to the nearest stability boundary is calculated in the normalized coordinate system as the stability margin index.
[0025] If the stability margin index is less than the safety threshold, then, under the premise of satisfying the surface linear velocity process constraint, the optimal rotational speed point that maximizes the stability margin index is searched.
[0026] Generate an S-shaped acceleration / deceleration transition curve from the current speed to the optimal speed point, and embed it into the spindle function word of the next segment of G code.
[0027] Preferably, it also includes closed-loop verification and model self-evolution steps:
[0028] The actual machining contour after compensation is sampled and verified using a non-contact displacement sensor installed on the side of the workpiece to obtain a measurement point cloud;
[0029] The measured point cloud is registered with the theoretical contour of the digital twin, and the normal deviation sequence is extracted.
[0030] Determine whether the mean of the normal deviation sequence exceeds a preset drift threshold or whether the proportion of its low-frequency component amplitude exceeds a preset ratio. If so, determine that there is a systematic offset.
[0031] The recursive least squares method is used to identify the correction increments of the heat convection transfer coefficient and contact stiffness parameters in the digital twin;
[0032] The correction increment is incorporated into the model parameter matrix in a sliding window manner to complete the online self-evolutionary calibration of the digital twin.
[0033] Preferably, before constructing the digital twin of the multi-axis CNC machine tool, the following steps are also included:
[0034] Perform standardized excitation tests on the machine tool and collect dynamic response datasets for each axis under different load and temperature combinations;
[0035] The Bayesian optimization algorithm was used to optimize the hyperparameters of the dynamic response dataset and establish an initial thermo-mechanical coupling field model.
[0036] The initial model is deployed on an edge computing node and configured with a low-latency communication interface with the CNC system to ensure that the real-time performance of the state estimation is not less than 1 kHz.
[0037] Preferably, the generated compensation strategy is converted into a macro program variable or RTCP tool tip compensation vector that can be recognized by the CNC system, specifically including:
[0038] For the slowly varying trend component, it is solved as the micron-level offset between each linear axis and the rotation axis, and written into the tool compensation register or workpiece coordinate system offset register of the CNC system.
[0039] For the speed adjustment command corresponding to the transient high-frequency component, it is encapsulated as an asynchronous event packet containing a timestamp aligned with the interpolation period, and sent to the spindle driver via the fieldbus, so that the spindle driver performs speed switching at the corresponding interpolation moment;
[0040] Before the compensation takes effect, check whether all correction parameters exceed the machine tool's soft limit and safe speed threshold. If they exceed the limit, automatically cut off to the safe boundary and trigger the alarm log.
[0041] Preferably, the digital twin further integrates a tool life prediction sub-model, and the method further includes:
[0042] During the state estimation process, the wear width VB value of the tool flank face is estimated simultaneously;
[0043] When the VB value is close to the preset tool change threshold but has not yet been reached, a tool residual value decay factor is introduced into the marginal utility index calculation.
[0044] If the diminished marginal utility index is still higher than the economic threshold and the VB value does not exceed the critical safety value, then the value-added compensation item will continue to be executed until the end of this process.
[0045] If the VB value exceeds the critical safety value, the value-added compensation item will be forcibly suspended regardless of the marginal utility index, while the execution of the baseline accuracy guarantee item will be maintained, and a tool change command will be triggered.
[0046] Preferably, after generating the virtual mirror error field, the method further includes:
[0047] A joint time-frequency analysis of the virtual mirror error field is performed to extract its concentrated energy frequency band;
[0048] The energy concentration frequency band is pattern matched with the machine tool historical fault spectrum library;
[0049] If the match is successful and the confidence level exceeds the warning threshold, an equipment health diagnosis report will be generated and pushed to the maintenance management system while performing accuracy compensation, so as to achieve collaborative decision-making between accuracy assurance and predictive maintenance.
[0050] An online accuracy correction system for multi-axis CNC machining, the system comprising:
[0051] A digital twin modeling unit is used to construct a digital twin of a multi-axis CNC machine tool, the digital twin including the machine tool's geometric topology, servo dynamic parameters, and a thermo-mechanical coupling field model;
[0052] The multi-source sensing and state estimation unit is used to simultaneously acquire six-dimensional force and torque signals at the tool tip and micro-strain array data of the spindle bearing housing during the machining process, and inject the measured data stream into the digital twin in real time through a data assimilation algorithm to perform state estimation and generate a virtual mirror error field that reflects the real physical state of the current cutting interface.
[0053] An error orthogonal decomposition unit is used to orthogonally decompose the virtual mirror error field and separate the slow-varying trend component caused by tool wear and the transient high-frequency component caused by cutting chatter.
[0054] The marginal utility assessment unit is used to obtain the amount of remaining material removed in the current processing step and the target surface roughness requirement, and calculate the marginal utility index of accuracy compensation by combining the current energy consumption monitoring value of the machine tool.
[0055] An adaptive compensation decision unit is used to set the compensation corresponding to the slow-changing trend component as a benchmark accuracy guarantee item to maintain the part qualification rate. It is executed regardless of the marginal utility index. When the marginal utility index is higher than the preset economic threshold, an additional value-added compensation item for the transient high-frequency component is activated. The value-added compensation item is achieved by adjusting the spindle speed to avoid the resonance lobe diagram stability region, and the corresponding compensation strategy is output.
[0056] The instruction conversion and safety verification unit is used to convert the compensation strategy into a macro program variable or RTCP tool tip compensation vector that can be recognized by the CNC system, and smoothly superimpose it into the motion command in the next interpolation cycle.
[0057] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0058] 1. This invention synchronously acquires six-dimensional force and torque signals from the tool tip and micro-strain array data from the spindle bearing housing, and injects these data into a digital twin using a data assimilation algorithm for state estimation, generating a virtual mirror error field. This error field is not a simple geometric deviation mapping, but rather a true physical state representation of the cutting interface that integrates mechanical, thermal, and dynamic multi-physics field information, providing a reliable data foundation for subsequent precise compensation. An orthogonal decomposition and differentiated compensation mechanism for errors is created to improve the targeting and effectiveness of compensation. This invention orthogonally decomposes the virtual mirror error field into slowly varying trend components and transient high-frequency components, corresponding to progressive errors such as tool wear and sudden errors such as cutting chatter, respectively. Different compensation methods are used for different components: trajectory offset compensation is performed on the slowly varying components, and the resonance zone is avoided by adjusting the spindle speed for the transient high-frequency components. This avoids the overcompensation or undercompensation problems caused by the traditional method of applying a one-size-fits-all approach to all errors, improving compensation accuracy and stability.
[0059] 2. An energy efficiency-constrained marginal utility evaluation mechanism is introduced to achieve a dynamic balance between accuracy assurance and resource efficiency. This invention is the first to incorporate the marginal utility index—a quantitative indicator of processing economy—into the compensation decision loop, setting slow-varying compensation as a benchmark guarantee item that is always executed to ensure the bottom line of part qualification rate. Transient high-frequency value-added compensation is only activated when the marginal utility is higher than the economic threshold. This mechanism avoids excessive consumption of energy and cooling resources under low-yield operating conditions, making the compensation behavior both technically reasonable and economically feasible, in line with the concept of green and intelligent manufacturing. This invention uses a non-contact displacement sensor to sample and verify the compensated contour, and feeds back the normal deviation sequence to the digital twin. It uses the recursive least squares method to update key boundary parameters such as thermal convection heat transfer coefficient and contact stiffness online. This mechanism enables the digital twin to continuously self-calibrate during the machining process, effectively overcoming the deviation between the initial model and the actual working conditions, and ensuring the stability and reliability of compensation accuracy during long-term machining. This invention simultaneously estimates the tool wear VB value during state estimation and incorporates its residual value decay factor into the marginal utility calculation. Furthermore, when the tool exceeds its limits, it forcibly suspends incremental compensation and maintains baseline compensation, avoiding ineffective compensation and safety risks. In addition, through time-frequency analysis of the virtual mirror error field and fault spectrum matching, a device health diagnosis report can be generated while performing accuracy compensation, enabling collaborative decision-making for accuracy assurance and predictive maintenance, and improving the overall operational efficiency of the equipment.
[0060] 3. This invention transforms the compensation strategy into macro program variables or RTCP tool tip compensation vectors, and encapsulates the speed adjustment commands for transient high-frequency components using asynchronous event packets with timestamps to ensure strict synchronization with the interpolation cycle; at the same time, it automatically verifies the soft limit and safe speed threshold before compensation takes effect, and cuts off and alarms when the limit is exceeded, thus avoiding the risk of machine tool collision or overspeed caused by compensation commands and ensuring the inherent safety of the online calibration process. Attached Figure Description
[0061] Figure 1 This is a flowchart outlining the steps of the present invention.
[0062] Figure 2 This is a system architecture diagram of the present invention. Detailed Implementation
[0063] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0064] Example 1: Refer to Figure 1 As shown, an online accuracy correction method for multi-axis CNC machining includes:
[0065] Step 101: Construct a digital twin of a multi-axis CNC machine tool. The digital twin includes the machine tool's geometric topology, servo dynamic parameters, and a thermo-mechanical coupling field model. Specifically, based on the machine tool's CAD assembly model, extract the geometric topological relationships of each motion axis, including static geometric parameters such as guide rail straightness, lead screw pitch error, and rotary axis eccentricity. Obtain the servo dynamic parameters of each feed axis through hammer impact testing or vibrator testing, including mass, damping, stiffness, and friction coefficient. Utilize finite element simulation combined with measured temperature field data to establish a thermo-mechanical coupling field model of the spindle-tool holder-tool system. This model describes the generation and conduction path of cutting heat and the resulting coupled response of thermal and mechanical deformation. The digital twin mentioned here refers to a high-fidelity virtual mirror model running in an edge computing node and maintaining real-time synchronization with the physical machine tool. Its state variables include the position, velocity, acceleration, temperature distribution, and stress-strain field of each axis.
[0066] Step 102: During the machining process, the six-dimensional force and torque signals at the tool tip and the micro-strain array data of the spindle bearing housing are simultaneously acquired. The measured data stream is then injected into the digital twin in real time through a data assimilation algorithm for state estimation, generating a virtual mirror error field that reflects the true physical state of the current cutting interface. Specifically, the six-dimensional force / torque sensor is installed inside the tool holder, outputting cutting force and torque in three directions at a sampling rate of not less than 1kHz. The micro-strain array consists of multiple fiber optic strain sensors attached to the outer rings of the front and rear bearing housings of the spindle, used to sense the thermal elongation and bending deformation of the spindle. Data assimilation... The algorithm employs an ensemble Kalman filter framework, using the aforementioned measured data as the observation vector and the state prediction value of the digital twin as the prior estimate. The prior estimate is corrected by calculating the Kalman gain matrix to obtain the posterior state estimate. This posterior state estimate contains the actual force, temperature, and deformation information of the cutting interface at the current moment. After coordinate transformation and mapping to the tool tip coordinate system, it constitutes a virtual mirror error field. The virtual mirror error field is a six-dimensional time-varying data field with the tool tip as the origin, containing three-dimensional displacement errors and three-dimensional angle errors. Its value reflects the comprehensive deviation of the tool from the ideal trajectory under the current cutting state.
[0067] Step 103: Perform orthogonal decomposition on the virtual mirror error field to separate the slow-varying trend component caused by tool wear and the transient high-frequency component caused by cutting chatter. Specifically, perform empirical mode decomposition on each channel signal of the virtual mirror error field to decompose the original signal into several intrinsic mode function components. Based on the center frequency and energy ratio of each component, the components with a center frequency lower than the preset cutoff frequency and whose energy increases monotonically with time are grouped into slow-varying trend components, which represent the gradual dimensional deviation caused by tool flank wear. The components with a center frequency higher than the preset cutoff frequency and whose energy shows intermittent sudden increases are grouped into transient high-frequency components, which represent the surface waviness deterioration caused by cutting chatter. The orthogonal decomposition mentioned here means that the components satisfy the orthogonality condition, that is, the inner product of any two components is zero, ensuring that the slow-varying and high-frequency components are not coupled in energy and can be compensated independently.
[0068] Step 104: Obtain the remaining material removal amount and target surface roughness requirement for the current machining process. Combine this with the machine tool's current energy consumption monitoring value to calculate the marginal utility index of accuracy compensation. Specifically, the remaining material removal amount is obtained by reading the difference between the workpiece counter of the CNC system and the volume already processed in the current process. The target surface roughness requirement is obtained from the process card. The energy consumption monitoring value is collected in real time by a smart meter and a flow meter to measure spindle power and coolant flow rate. The calculation process of the marginal utility index is as follows: First, divide the unit time energy consumption rate and coolant flow rate consumption rate by their respective historical values. The maximum value is normalized, and the two normalized values are added together to obtain the instantaneous resource cost. Then, based on the mapping relationship table between error amplitude and scrap rate established by historical processing statistics, the current virtual mirror error field amplitude is used as input to look up the table to obtain the scrap loss probability, which is then multiplied by the rework time cost per piece to obtain the expected loss amount. Finally, the expected loss amount is divided by the instantaneous resource cost, and the quotient is the marginal utility index. The marginal utility index mentioned here is a dimensionless scalar. The larger its value, the higher the pass rate benefit obtained by investing a unit of resources for accuracy compensation under the current working conditions.
[0069] Step 105: Set the compensation corresponding to the slow-changing trend component as the baseline accuracy guarantee item to maintain the part pass rate, and execute it regardless of the marginal utility index. When the marginal utility index is higher than the preset economic threshold, additional value-added compensation item for the transient high-frequency component is activated. The value-added compensation item is achieved by adjusting the spindle speed to avoid the stable region of the resonance lobe diagram. Specifically, the baseline accuracy guarantee item is always effective, and its compensation amount is the projection value of the slow-changing trend component on each motion axis. The value-added compensation item is only activated when the marginal utility index exceeds the economic threshold. Its compensation method is to adjust the spindle speed to make the current working point far away from the chatter boundary of the stability lobe diagram. The economic threshold is set based on the upper limit of the enterprise's tolerance for single-piece processing cost, which can be determined through historical data statistical analysis. The baseline accuracy guarantee item and the value-added compensation item constitute a layered compensation architecture. The former ensures the bottom line of part size qualification, and the latter further improves the surface quality under the premise of economic feasibility.
[0070] Step 106: The generated compensation strategy is converted into macro program variables or RTCP tool tip compensation vectors that can be recognized by the CNC system, and smoothly superimposed onto the motion command in the next interpolation cycle. Specifically, for slow-changing trend components, they are calculated into micron-level offsets of each linear axis and rotary axis, and written into the tool compensation register or workpiece coordinate system offset register through the CNC system's user macro program interface. For speed adjustment commands corresponding to transient high-frequency components, they are encapsulated into asynchronous event packets containing timestamps aligned with the interpolation cycle, and sent to the spindle driver via EtherCAT or PROFINET fieldbus, so that the spindle driver performs speed switching at the precisely corresponding interpolation moment. Before the compensation takes effect, the system automatically checks whether all correction parameters exceed the machine tool soft limit and safe speed threshold. If they exceed the limit, they are automatically truncated to the safe boundary and an alarm log is triggered. The smooth superposition mentioned here means that the compensation amount is transitioned between adjacent interpolation cycles using linear or cubic spline interpolation to avoid step abrupt changes that could cause servo system shock.
[0071] In some embodiments, generating a virtual mirror error field that reflects the true physical state of the current cutting interface specifically includes:
[0072] Step 201: Extract the cutting resultant force vector direction angle from the six-dimensional force and torque signals, and compare it with the theoretical cutting force direction in the digital twin to obtain the force-induced deformation deviation benchmark value. Specifically, perform vector synthesis on the three directional cutting force components output by the six-dimensional force sensor to calculate the azimuth and pitch angles of the resultant force vector in the machine tool coordinate system. At the same time, read the direction angle of the theoretical cutting force under the current cutting parameters from the digital twin. Take the difference between the measured resultant force direction angle and the theoretical direction angle as the angle deviation, and multiply the angle deviation by the current cutting force amplitude to obtain the force-induced deformation deviation benchmark value. The force-induced deformation deviation benchmark value mentioned here is a scalar, and its physical meaning is the additional bending moment equivalent deformation caused by the deviation of the actual cutting force direction from the theoretical direction. The larger the value, the more the tool-workpiece contact state deviates from the ideal condition.
[0073] Step 202: Analyze the phase difference of each measuring point in the micro-strain array data to reconstruct the spatial distribution of the spindle's thermal elongation and bending deformation. Specifically, the micro-strain array includes at least four fiber optic strain sensors uniformly arranged along the spindle axis. Perform Fourier transform on the strain signals output by each sensor to extract the fundamental frequency component and calculate the phase difference between the fundamental frequency components of adjacent sensors. Calculate the spindle bending curvature based on the ratio of the phase difference to the sensor spacing and integrate along the axial direction to obtain the bending deformation curve. Simultaneously, extract the DC component of the strain signal from each sensor, subtract the elastic strain caused by the mechanical load to obtain the pure thermal strain, and integrate along the axial direction to obtain the thermal elongation distribution. Superimpose the bending deformation curve and the thermal elongation distribution to obtain the spatial distribution of the spindle's thermo-mechanical coupled deformation. The spatial distribution described here is a two-dimensional function with the spindle axis as the independent variable and radial displacement and axial elongation as dependent variables, describing the actual deformation state of the spindle under the combined action of current cutting heat and cutting force.
[0074] Step 203: The force-induced deformation deviation benchmark value is used as a weighting factor to weight and superimpose the spatial distribution pattern, and then mapped to the tool tip coordinate system through the inverse kinematics solver of the digital twin to output the virtual mirror error field. Specifically, the force-induced deformation deviation benchmark value is normalized to a weighting coefficient between zero and one; this weighting coefficient is multiplied point by point with the spindle thermo-mechanical coupling deformation spatial distribution pattern to obtain the comprehensive deformation field after mechanical state modulation; then the inverse kinematics solver in the digital twin is called to transform the comprehensive deformation field from the spindle coordinate system to the tool tip coordinate system. The influence of tool holder overhang length, tool clamping angle and current position of the rotation axis is considered during the transformation process; the transformation result is the virtual mirror error field; the inverse kinematics solver mentioned here is an analytical or numerical solution module based on the geometric parameters of the machine tool kinematic chain. Its input is the deformation amount of the spindle end, and its output is the equivalent displacement error of the tool tip in the workpiece coordinate system.
[0075] In some embodiments, calculating the marginal utility index of accuracy compensation specifically includes:
[0076] Step 301: Obtain the current unit-time power consumption rate and coolant flow rate, normalize them, and sum them to obtain the instantaneous resource cost. Specifically, the unit-time power consumption rate is obtained from the instantaneous power reading of the smart meter, in kilowatts; the coolant flow rate is obtained from the instantaneous flow reading of the electromagnetic flow meter, in liters per minute. The normalization process is as follows: divide the current power consumption rate by the historical maximum power consumption rate of the machine tool under full-load cutting to obtain the power normalization coefficient; divide the current coolant flow rate by the rated flow of the coolant pump to obtain the coolant normalization coefficient; add the two normalization coefficients together, and the sum is the instantaneous resource cost. The instantaneous resource cost mentioned here is a dimensionless scalar between zero and two. The larger the value, the higher the resource consumption intensity per unit time under the current working condition.
[0077] Step 302: Based on historical processing statistics, an error-pass rate mapping model is established. This model estimates the probability of scrap loss and rework time cost if no compensation is made, according to the target surface roughness requirement and the amplitude of the current virtual mirror error field. Specifically, the error-pass rate mapping model is a lookup table or regression model established by statistically analyzing the amplitude of the virtual mirror error field in historical processing batches and the final quality inspection results. Using the root mean square amplitude of the current virtual mirror error field as input, the model is queried to obtain the corresponding estimated scrap rate. This scrap rate is multiplied by the value of a single product to obtain a monetized expression of the scrap loss probability. The rework time cost is obtained by multiplying the standard rework time for this process in the process database by the workshop hourly rate. The scrap loss probability mentioned here is not a strict probability theory concept, but rather refers to the proportion of expected scrap economic loss to the value of a single product under the current error level.
[0078] Step 303: Divide the product of the scrap loss probability and the rework time cost by the instantaneous resource cost to obtain the marginal utility index. Specifically, multiply the monetized expression of the scrap loss probability obtained in step 302 by the rework time cost to obtain the expected total loss amount without compensation. Divide this total loss amount by the instantaneous resource cost obtained in step 301, and the quotient is the marginal utility index. When the instantaneous resource cost approaches zero (such as during the idle tooling stage), to avoid division by zero errors, the system clamps the instantaneous resource cost to a preset minimum positive value. The marginal utility index mentioned here reflects the economic loss that can be recovered by investing one unit of resource for precision compensation under the current resource consumption level. The higher the value, the stronger the economic rationality of the compensation.
[0079] In some embodiments, the incremental compensation term for transient high-frequency components is achieved by adjusting the spindle speed to avoid the stable region of the resonant lobe diagram, specifically including:
[0080] Step 401: Based on the modal parameters in the digital twin and the current depth of cut, a three-dimensional stability leaf plot is drawn in real time. Specifically, modal parameters such as the natural frequency, damping ratio, and mode shape of the spindle-tool holder-tool system are extracted from the digital twin. Combining the current depth of cut and the number of tool teeth, the critical depth of cut at different spindle speeds is calculated using regenerative chatter theory. A three-dimensional stability leaf plot is generated with the spindle speed as the horizontal axis, the depth of cut as the vertical axis, and the stability margin as the color dimension. The three-dimensional stability leaf plot mentioned here is a discretized two-dimensional grid data. Each grid point stores the stability margin value under the corresponding combination of speed and depth of cut. A positive stability margin indicates stability, and a negative stability margin indicates chatter.
[0081] Step 402: Normalize the rotational speed axis and depth of cut axis of the leaf pattern. Calculate the minimum normal distance from the current operating point to the nearest stability boundary in the normalized coordinate system as the stability margin index. Specifically, divide the rotational speed axis by the maximum allowable spindle speed of the machine tool, and divide the depth of cut axis by the maximum allowable depth of cut of the process to obtain the normalized coordinate system. In the normalized coordinate system, starting from the current operating point, traverse all boundary points in the leaf pattern where the stability margin is zero, calculate the Euclidean distance from the current operating point to each boundary point, and take the minimum value as the stability margin index. The direction of this minimum distance is perpendicular to the stability boundary, hence it is called the minimum normal distance. The stability margin index mentioned here is a normalized dimensionless distance value. The larger the value, the farther the current operating point is from the chatter boundary, and the safer the machining.
[0082] Step 403: If the stability margin index is less than the safety threshold, then, under the premise of satisfying the surface linear velocity process constraint, search for the optimal rotational speed point that maximizes the stability margin index; specifically, the safety threshold is preset according to the process reliability requirements, usually taken as 5% to 10% of the normalized distance; when the stability margin index is lower than the safety threshold, the system scans all candidate rotational speed points on the rotational speed axis of the leaf lobe diagram with a fixed step size; for each candidate rotational speed point, check whether its corresponding surface linear velocity is within the process allowable range; among the candidate points that satisfy the linear velocity constraint, select the rotational speed point with the largest stability margin index as the optimal rotational speed point; the surface linear velocity process constraint mentioned here means that, in order to ensure the quality of the machined surface and the tool life, the product of the spindle speed and the tool diameter must fall within the process window;
[0083] Step 404: Generate an S-shaped acceleration / deceleration transition curve from the current speed to the optimal speed point, and embed it into the spindle function word of the next G-code segment. Specifically, starting from the current speed and targeting the optimal speed point, plan an S-shaped speed curve that meets the machine tool spindle acceleration and jerk limits. This curve includes an acceleration segment, a constant speed segment, and a deceleration segment, with continuous acceleration without abrupt changes at the junctions of each segment. Encode the key time points and speed values of the S-shaped curve into asynchronous event packets with timestamps, and embed them into the spindle function word of the next G-code segment. When the CNC system executes this G-code, it triggers speed switching at precise interpolation times according to the timestamps. The S-shaped acceleration / deceleration transition curve ensures the dynamic stability of the spindle speed change process and avoids servo shocks and transient vibrations caused by step speed changes.
[0084] In some embodiments, the online accuracy correction method for multi-axis CNC machining according to claim 1 further includes closed-loop verification and model self-evolution steps:
[0085] Step 501: Use a non-contact displacement sensor installed on the workpiece side to sample and verify the actual machining contour after compensation, and obtain a measurement point cloud; specifically, the non-contact displacement sensor is a laser triangulation probe or a white light interferometer, which is installed on the machine tool table or fixture, and scans the key features of the workpiece during machining intervals or tool change periods; the sensor output is three-dimensional point cloud data, and the sampling density is adaptively adjusted according to the feature curvature; the measurement point cloud mentioned here is the discrete geometric expression of the actual surface of the workpiece after compensation, which is used to verify the compensation effect;
[0086] Step 502: Register the measured point cloud with the theoretical contour of the digital twin and extract the normal deviation sequence; specifically, use the iterative nearest point algorithm to perform rigid body registration between the measured point cloud and the theoretical CAD model in the digital twin to eliminate clamping and positioning errors; after registration, calculate the signed normal distance from each measurement point to the theoretical contour, and arrange them in spatial order to obtain the normal deviation sequence; the normal deviation sequence mentioned here is a one-dimensional ordered array, where positive values represent material residue and negative values represent overcutting;
[0087] Step 503: Determine whether the mean of the normal deviation sequence exceeds a preset drift threshold or whether the proportion of its low-frequency component amplitude exceeds a preset ratio. If so, a systematic offset is determined to exist. Specifically, calculate the arithmetic mean of the normal deviation sequence. If its absolute value exceeds a preset drift threshold (usually one-tenth of the tolerance band), a constant systematic error is determined to exist. Perform low-pass filtering on the normal deviation sequence to extract low-frequency components and calculate the ratio of low-frequency component energy to total energy. If this ratio exceeds a preset ratio (usually 70%), a slowly varying systematic error is determined to exist. Any of the above conditions being met indicates a systematic offset. The systematic offset referred to here is a persistent deviation between the parameters of the digital twin model and the actual physical state, not caused by random noise.
[0088] Step 504: Identify the correction increments for the thermal convection heat transfer coefficient and contact stiffness parameters in the digital twin using the recursive least squares method. Specifically, the thermal convection heat transfer coefficient and contact stiffness are used as the parameters to be identified, the normal deviation sequence is used as the observation output, and the simulation response of the digital twin is used as the model output. A parameter sensitivity matrix is constructed, and the parameter estimates are updated online using the recursive least squares algorithm. Each update uses only the newly arrived observation data, without reprocessing historical data, and the computational complexity remains constant. The correction increment mentioned here is the difference between the new estimate and the old estimate, reflecting the direction and magnitude of the model parameters that need to be adjusted.
[0089] Step 505: Integrate the correction increments into the model parameter matrix using a sliding window to complete the online self-evolutionary calibration of the digital twin. Specifically, a fixed-length sliding window is set, storing the most recent correction increments within the window. Each time a new increment enters the window, the oldest increment is removed. A weighted average is taken for all increments within the window, with the weighting coefficient decaying over time, and recent increments having a higher weight. The weighted average increments are then superimposed onto the original parameter matrix of the digital twin to complete the parameter update. The sliding window method described here ensures the smoothness of parameter updates and provides a rapid response capability to recent changes in operating conditions, avoiding parameter jumps caused by single abnormal observations.
[0090] In some embodiments, prior to constructing a digital twin of a multi-axis CNC machine tool, the method further includes:
[0091] Step 601: Perform standardized excitation tests on the machine tool and collect dynamic response datasets for each axis under different load and temperature combinations. Specifically, the standardized excitation tests include: performing reciprocating motion at different speeds and accelerations within the stroke range of each feed axis, and recording position, speed, and current feedback; applying stepped loads at different spindle speeds and recording vibration and temperature rise responses; repeating the above tests under three temperature conditions: cold start, warm start, and thermal equilibrium. The obtained data constitutes a dynamic response dataset covering typical working conditions. The dynamic response dataset mentioned here is the data foundation for subsequent modeling, and its working condition coverage determines the generalization ability of the model.
[0092] Step 602: Use the Bayesian optimization algorithm to optimize the hyperparameters of the dynamic response dataset and establish an initial thermo-mechanical coupling field model. Specifically, the thermo-mechanical coupling field model contains multiple undetermined hyperparameters, such as material thermal conductivity, contact thermal resistance, and friction coefficient. Using the mean square error between the model's predicted output and the measured dynamic response as the objective function, and the hyperparameters as optimization variables, the Bayesian optimization algorithm efficiently searches for the global optimum in the parameter space. Bayesian optimization guides the selection of sampling points through a Gaussian process surrogate model, converging to the optimum with fewer evaluation iterations compared to grid search or genetic algorithms. The initial thermo-mechanical coupling field model mentioned here is a data-driven calibrated digital twin initial version with engineering-usable accuracy.
[0093] Step 603: Deploy the initial model on an edge computing node and configure a low-latency communication interface with the CNC system to ensure that the real-time performance of the state estimation is not less than 1 kHz. Specifically, the edge computing node uses an industrial-grade GPU or FPGA accelerator card to run the digital twin state estimation algorithm. The communication interface uses EtherCAT or TSN time-sensitive network to ensure that the data transmission latency is less than 1 millisecond and the jitter is controllable. The state estimation loop runs at a fixed frequency of 1 kHz, and completes a series of operations such as data acquisition, assimilation calculation and error field output in each cycle. The 1 kHz real-time performance mentioned here is a prerequisite for ensuring the effective capture and compensation of transient high-frequency components.
[0094] In some embodiments, the generated compensation strategy is converted into a macro program variable or RTCP tool tip compensation vector that can be recognized by the CNC system, specifically including:
[0095] Step 701: For the slowly varying trend component, it is solved into micrometer-level offsets for each linear axis and rotary axis, and written into the tool compensation register or workpiece coordinate system offset register of the CNC system. Specifically, according to the machine tool kinematic chain structure, the slowly varying error vector in the tool tip coordinate system is back-projected to the direction of each motion axis to obtain the compensation offset for each axis. For linear axes, the offset is directly written into the tool length compensation or radius compensation register. For rotary axes, the offset is converted into angular offset and written into the workpiece coordinate system rotation offset parameter. The writing operation is completed through the PMC ladder diagram or user macro program interface of the CNC system. The micrometer-level offset mentioned here is a compensation instruction that can be directly interpreted and executed by the CNC system after inverse kinematics solution.
[0096] Step 702: For the speed adjustment command corresponding to the transient high-frequency component, it is encapsulated into an asynchronous event packet containing a timestamp aligned with the interpolation cycle, and sent to the spindle driver via the fieldbus, causing the spindle driver to perform speed switching at the corresponding interpolation moment. Specifically, the data structure of the asynchronous event packet includes: event type identifier, target speed value, effective timestamp, and S-curve parameters. The timestamp is based on the CNC system interpolation clock and is accurate to the microsecond level. The fieldbus adopts a periodic synchronous communication mode. The spindle driver checks whether there is an event to be executed in each communication cycle. When the local clock matches the event timestamp, it triggers speed switching. The asynchronous event packet mechanism mentioned here achieves precise timing synchronization between the compensation command and motion control, avoiding the timing uncertainty caused by the serial execution of traditional G-code.
[0097] Step 703: Before compensation takes effect, verify whether all correction parameters exceed the machine tool's soft limit and safe speed threshold. If they exceed the limits, automatically truncate to the safe boundary and trigger an alarm log. Specifically, the system maintains a safety parameter table, recording the soft limit range of each axis, maximum feed rate, maximum spindle speed, and other safe boundaries. After each compensation parameter is generated, it is compared with the corresponding safe boundary. If a parameter exceeds the boundary, it is clamped to the boundary value, and the type of exceedance, original value, and truncation value are recorded in the alarm log. The alarm log is stored in the local database of the edge computing node for post-event traceability and analysis. The safety verification mechanism mentioned here is the last line of defense of the compensation system, ensuring that any abnormal compensation command will not cause machine tool collision or overspeed accidents.
[0098] In some embodiments, the digital twin further integrates a tool life prediction sub-model, and the method further includes:
[0099] Step 801: During the state estimation process, the tool flank wear width VB value is estimated simultaneously. Specifically, the tool life prediction sub-model is embedded in the data assimilation algorithm framework, using the growth trend of cutting force amplitude and the proportion of high-frequency harmonic energy in the six-dimensional force / torque signal as the observation input, and the VB value as the hidden state. The VB value is estimated online through extended Kalman filtering or particle filtering. This estimation process shares the same state estimation framework as the generation of the virtual mirror error field, requiring no additional computational overhead. The VB value mentioned here is a key indicator characterizing the degree of tool wear, and its estimation accuracy directly affects the reliability of subsequent compensation decisions.
[0100] Step 802: When the VB value is close to the preset tool replacement threshold but has not yet been reached, a tool residual value decay factor is introduced into the marginal utility index calculation. Specifically, the preset tool replacement threshold is the VB limit value specified by the process. When the VB value reaches 80% of the tool replacement threshold, the decay mechanism is activated. The decay factor is equal to the ratio of the VB value to the tool replacement threshold and the reciprocal of that ratio. That is, the closer the VB value is to the threshold, the smaller the decay factor. Multiply the decay factor by the original marginal utility index to obtain the decayed marginal utility index. The tool residual value decay factor mentioned here reflects the diminishing marginal returns of continuing to invest compensation resources when the tool is about to fail.
[0101] Step 803: If the diminished marginal utility index is still higher than the economic threshold and the VB value does not exceed the critical safety value, then the value-added compensation item continues to be executed until the end of this process. Specifically, the critical safety value is the upper limit of VB set to prevent tool breakage or workpiece scrap, which is usually slightly higher than the tool replacement threshold. As long as the VB value does not exceed the critical safety value and the diminished marginal utility index is still economically reasonable, the system maintains the execution of the value-added compensation item and makes full use of the remaining tool life to complete the current process. The continued execution strategy mentioned here avoids quality loss caused by prematurely abandoning compensation due to the tool approaching the end of its life.
[0102] Step 804: If the VB value exceeds the critical safety value, the incremental compensation item is forcibly suspended regardless of the marginal utility index, while the execution of the baseline accuracy guarantee item is maintained, and a tool change command is triggered. Specifically, once the VB value exceeds the critical safety value, the system immediately freezes the output of the incremental compensation item, but the baseline accuracy guarantee item is unaffected and continues to execute to ensure that the part dimensions do not exceed the tolerance. At the same time, a tool change M code is sent to the CNC system, and a tool change prompt pops up on the human-machine interface. The forced suspension mechanism mentioned here is a manifestation of the safety priority principle, ensuring that the risk of tool failure is not ignored due to economic considerations.
[0103] In some embodiments, after generating the virtual mirror error field, the method further includes:
[0104] Step 901: Perform time-frequency joint analysis on the virtual mirror error field to extract its energy concentration frequency band; specifically, perform short-time Fourier transform or wavelet packet transform on the signals of each channel of the virtual mirror error field to obtain the time spectrum; identify the frequency bands with energy significantly higher than the background noise on the time spectrum, and extract their center frequency and bandwidth as the energy concentration frequency band; the energy concentration frequency band mentioned here reflects the dominant dynamic behavior characteristics under the current cutting state, such as spindle imbalance, bearing damage, gear meshing, etc.
[0105] Step 902: Perform pattern matching between the energy concentration frequency band and the machine tool historical fault spectrum database; specifically, the historical fault spectrum database stores feature spectrum templates corresponding to various faults that have occurred in the history of this machine tool or the same model of machine tool; calculate the matching degree between the current energy concentration frequency band and each fault template using dynamic time warping or cosine similarity algorithm; the fault type corresponding to the template with the highest matching degree is the candidate diagnosis result; the pattern matching mentioned here is the process of associating and reasoning with the current dynamic behavior and known fault patterns;
[0106] Step 903: If the match is successful and the confidence level exceeds the warning threshold, a device health diagnosis report is generated and pushed to the maintenance management system while performing accuracy compensation, realizing collaborative decision-making for accuracy assurance and predictive maintenance. Specifically, the confidence level is the probability value of the matching degree after normalization; the warning threshold is set according to the false alarm tolerance. When the confidence level exceeds the warning threshold, the system automatically generates a health diagnosis report containing the fault type, severity, and recommended measures, and pushes it to the factory maintenance management system via OPCUA or MQTT protocol. At the same time, the accuracy compensation process continues to be executed without interference. The collaborative decision-making mechanism mentioned here enables the accuracy correction system to also have the function of device health monitoring.
[0107] Example 2: Refer to Figure 2 As shown, this application also provides an online accuracy correction system for multi-axis CNC machining, comprising:
[0108] A digital twin modeling unit is used to construct a digital twin of a multi-axis CNC machine tool. The digital twin includes the machine tool's geometric topology, servo dynamic parameters, and a thermo-mechanical coupling field model. Specifically, the unit receives the machine tool's CAD model, dynamic test data, and thermal simulation data, and generates a digital twin instance that can run in real time on an edge computing node after parameter identification and model calibration.
[0109] The multi-source sensing and state estimation unit is used to simultaneously acquire six-dimensional force and torque signals from the tool tip and micro-strain array data from the spindle bearing housing during the machining process. The measured data stream is then injected into the digital twin in real time through a data assimilation algorithm for state estimation, generating a virtual mirror error field that reflects the true physical state of the current cutting interface. Specifically, this unit includes a sensor interface module, a data preprocessing module, and a data assimilation calculation module, and outputs the virtual mirror error field at a fixed period of 1kHz.
[0110] The error orthogonal decomposition unit is used to orthogonally decompose the virtual mirror error field, separating the slow-varying trend component caused by tool wear and the transient high-frequency component caused by cutting chatter; specifically, this unit implements empirical mode decomposition or variational mode decomposition algorithm and outputs two orthogonal component signals.
[0111] The marginal utility assessment unit is used to obtain the amount of remaining material removed in the current processing step and the target surface roughness requirement. Combined with the current energy consumption monitoring value of the machine tool, it calculates the marginal utility index for accuracy compensation. Specifically, this unit connects to the CNC system and energy metering instruments to calculate and output the marginal utility index scalar in real time.
[0112] An adaptive compensation decision unit is used to set the compensation corresponding to the slow-changing trend component as a benchmark accuracy guarantee item to maintain the part pass rate. It is executed regardless of the marginal utility index. When the marginal utility index is higher than the preset economic threshold, an additional value-added compensation item for the transient high-frequency component is activated. The value-added compensation item is implemented by adjusting the spindle speed to avoid the resonance lobe diagram stability region, and the corresponding compensation strategy is output. Specifically, this unit includes hierarchical decision logic and a lobe diagram optimization search module, and outputs a complete compensation strategy including the benchmark compensation amount and the value-added compensation instruction.
[0113] The instruction conversion and security verification unit is used to convert the compensation strategy into macro program variables or RTCP tool tip compensation vectors that can be recognized by the CNC system, and smoothly superimpose them into the motion instruction in the next interpolation cycle. Specifically, this unit includes a kinematics inverse solution module, an asynchronous event encapsulation module, and a security verification module to ensure that the compensation instruction is compliant in format, accurate in timing, and safe and controllable.
[0114] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. An online accuracy correction method for multi-axis CNC machining, characterized in that, include: A digital twin of a multi-axis CNC machine tool is constructed, the digital twin including the machine tool's geometric topology, servo dynamic parameters, and thermo-mechanical coupling field model; During the machining process, six-dimensional force and torque signals at the tool tip and micro-strain array data of the spindle bearing housing are collected simultaneously. The measured data stream is then injected into the digital twin in real time through a data assimilation algorithm for state estimation, generating a virtual mirror error field that reflects the true physical state of the current cutting interface. The virtual mirror error field is orthogonally decomposed to separate the slow-varying trend component caused by tool wear and the transient high-frequency component caused by cutting chatter. Obtain the remaining material removal amount and target surface roughness requirements of the current processing step, and calculate the marginal utility index of accuracy compensation by combining the current energy consumption monitoring value of the machine tool. The compensation corresponding to the slow-changing trend component is set as the benchmark accuracy guarantee item to maintain the part pass rate, and is executed regardless of the marginal utility index. When the marginal utility index is higher than the preset economic threshold, an additional value-added compensation item for the transient high-frequency component is enabled. The value-added compensation item is achieved by adjusting the spindle speed to avoid the resonance lobe diagram stability region. The generated compensation strategy is converted into a macro program variable or RTCP tool tip compensation vector that can be recognized by the CNC system, and then smoothly superimposed onto the motion command in the next interpolation cycle.
2. The online accuracy correction method for multi-axis CNC machining according to claim 1, characterized in that, Generate a virtual mirror error field that reflects the true physical state of the current cutting interface, specifically including: The cutting force vector direction angle is extracted from the six-dimensional force and torque signals and compared with the theoretical cutting force direction in the digital twin to obtain the force-induced deformation deviation benchmark value. Analyze the phase difference at each measuring point in the micro-strain array data to reconstruct the spatial distribution of principal axis thermal elongation and bending deformation; The force-induced deformation deviation benchmark value is used as a weighting factor to weight and superimpose the spatial distribution morphology, and then mapped to the tool tip coordinate system through the inverse kinematics solver of the digital twin to output the virtual mirror error field.
3. The online accuracy correction method for multi-axis CNC machining according to claim 1, characterized in that, The marginal utility index for calculating accuracy compensation specifically includes: Obtain the unit time power consumption rate and coolant flow rate at the current moment, normalize them, and sum them to obtain the instantaneous resource cost; Based on historical processing statistics, an error-pass rate mapping model is established. According to the target surface roughness requirement and the amplitude of the current virtual mirror error field, the probability of scrap loss and rework time cost will be estimated if no compensation is made. The marginal utility index is obtained by dividing the product of the scrap loss probability and the rework time cost by the instantaneous resource cost.
4. The online accuracy correction method for multi-axis CNC machining according to claim 1, characterized in that, The added compensation term for transient high-frequency components is achieved by adjusting the spindle speed to avoid the stable region of the resonance lobe diagram, specifically including: Based on the modal parameters and current cutting depth in the digital twin, a three-dimensional stability lobe diagram is drawn in real time; The rotational speed axis and depth of cut axis of the leaf lobe diagram are normalized, and the minimum normal distance from the current operating point to the nearest stability boundary is calculated in the normalized coordinate system as the stability margin index. If the stability margin index is less than the safety threshold, then, under the premise of satisfying the surface linear velocity process constraint, the optimal rotational speed point that maximizes the stability margin index is searched. Generate an S-shaped acceleration / deceleration transition curve from the current speed to the optimal speed point, and embed it into the spindle function word of the next segment of G code.
5. The online accuracy correction method for multi-axis CNC machining according to claim 1, characterized in that, It also includes closed-loop validation and model self-evolution steps: The actual machining contour after compensation is sampled and verified using a non-contact displacement sensor installed on the side of the workpiece to obtain a measurement point cloud; The measured point cloud is registered with the theoretical contour of the digital twin, and the normal deviation sequence is extracted. Determine whether the mean of the normal deviation sequence exceeds a preset drift threshold or whether the proportion of its low-frequency component amplitude exceeds a preset ratio. If so, determine that there is a systematic offset. The recursive least squares method is used to identify the correction increments of the heat convection transfer coefficient and contact stiffness parameters in the digital twin; The correction increment is incorporated into the model parameter matrix in a sliding window manner to complete the online self-evolutionary calibration of the digital twin.
6. The online accuracy correction method for multi-axis CNC machining according to claim 1, characterized in that, Before building a digital twin of a multi-axis CNC machine tool, the following steps are also included: Perform standardized excitation tests on the machine tool and collect dynamic response datasets for each axis under different load and temperature combinations; The Bayesian optimization algorithm was used to optimize the hyperparameters of the dynamic response dataset and establish an initial thermo-mechanical coupling field model. The initial model is deployed on an edge computing node and configured with a low-latency communication interface with the CNC system to ensure that the real-time performance of the state estimation is not less than 1 kHz.
7. The online accuracy correction method for multi-axis CNC machining according to claim 1, characterized in that, The generated compensation strategy is converted into macro program variables or RTCP tool tip compensation vectors that can be recognized by the CNC system, specifically including: For the slowly varying trend component, it is solved as the micron-level offset between each linear axis and the rotation axis, and written into the tool compensation register or workpiece coordinate system offset register of the CNC system. For the speed adjustment command corresponding to the transient high-frequency component, it is encapsulated as an asynchronous event packet containing a timestamp aligned with the interpolation period, and sent to the spindle driver via the fieldbus, so that the spindle driver performs speed switching at the corresponding interpolation moment; Before the compensation takes effect, check whether all correction parameters exceed the machine tool's soft limit and safe speed threshold. If they exceed the limit, automatically cut off to the safe boundary and trigger the alarm log.
8. The online accuracy correction method for multi-axis CNC machining according to claim 1, characterized in that, The digital twin also integrates a tool life prediction sub-model, and the method further includes: During the state estimation process, the wear width VB value of the tool flank face is estimated simultaneously; When the VB value is close to the preset tool change threshold but has not yet been reached, a tool residual value decay factor is introduced into the marginal utility index calculation. If the diminished marginal utility index is still higher than the economic threshold and the VB value does not exceed the critical safety value, then the value-added compensation item will continue to be executed until the end of this process. If the VB value exceeds the critical safety value, the value-added compensation item will be forcibly suspended regardless of the marginal utility index, while the execution of the baseline accuracy guarantee item will be maintained, and a tool change command will be triggered.
9. The online accuracy correction method for multi-axis CNC machining according to claim 1, characterized in that, After generating the virtual mirror error field, the process further includes: A joint time-frequency analysis of the virtual mirror error field is performed to extract its concentrated energy frequency band; The energy concentration frequency band is pattern matched with the machine tool historical fault spectrum library; If the match is successful and the confidence level exceeds the warning threshold, an equipment health diagnosis report will be generated and pushed to the maintenance management system while performing accuracy compensation, so as to achieve collaborative decision-making between accuracy assurance and predictive maintenance.
10. An online precision correction system for multi-axis CNC machining, characterized in that, The online accuracy correction method for implementing multi-axis CNC machining as described in any one of claims 1-9, the system comprising: A digital twin modeling unit is used to construct a digital twin of a multi-axis CNC machine tool, the digital twin including the machine tool's geometric topology, servo dynamic parameters, and thermo-mechanical coupling field model; The multi-source sensing and state estimation unit is used to simultaneously acquire six-dimensional force and torque signals at the tool tip and micro-strain array data of the spindle bearing housing during the machining process, and inject the measured data stream into the digital twin in real time through a data assimilation algorithm to perform state estimation and generate a virtual mirror error field that reflects the real physical state of the current cutting interface. An error orthogonal decomposition unit is used to orthogonally decompose the virtual mirror error field and separate the slow-varying trend component caused by tool wear and the transient high-frequency component caused by cutting chatter. The marginal utility assessment unit is used to obtain the amount of remaining material removed in the current processing step and the target surface roughness requirement, and calculate the marginal utility index of accuracy compensation by combining the current energy consumption monitoring value of the machine tool. An adaptive compensation decision unit is used to set the compensation corresponding to the slow-changing trend component as a benchmark accuracy guarantee item to maintain the part qualification rate. It is executed regardless of the marginal utility index. When the marginal utility index is higher than the preset economic threshold, an additional value-added compensation item for the transient high-frequency component is activated. The value-added compensation item is achieved by adjusting the spindle speed to avoid the resonance lobe diagram stability region, and the corresponding compensation strategy is output. The instruction conversion and safety verification unit is used to convert the compensation strategy into a macro program variable or RTCP tool tip compensation vector that can be recognized by the CNC system, and smoothly superimpose it into the motion command in the next interpolation cycle.
