A high-precision numerical control lathe turning tool automatic compensation system

CN122064026BActive Publication Date: 2026-09-18HANGZHOU YOUJIA MASCH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202610543157.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-23
Publication Date
2026-09-18
Estimated Expiration
2046-04-23

AI Technical Summary

Technical Problem

[0003]现有针对刀具磨损的自动补偿技术,多基于均质金属材料的连续切削过程开发,其技术路径主要包括两类:一是依赖定期停机进行人工离线测量,这严重中断自动加工流程,效率低下且无法获知两次测量间的磨损状态;二是基于主轴电流或平均切削力等单一信号设定阈值进行粗略在线补偿,该方法在复合材料断续切削场景下局限性显著,其问题核心在于,首先,现有传感与分析方法难以在复杂的工艺噪声中,有效解耦并提取出与切削刃局部微观磨损形貌直接关联的高信噪比特征,导致磨损状态感知精度低、实时性差,其次,现有补偿模型通常将刀具简化为一个理想几何点进行整体偏移,这种简化模型完全无法应对实际发生的非均匀磨损,当刀刃出现局部微崩或不对称的边界磨损时,单一的刀尖位置补偿无法修正由此引起的工件几何形状误差,补偿行为本身即可能成为新的误差源,因此,当前技术体系缺乏一种能够在加工过程中,在线、高分辨率地感知切削刃局部的多维磨损状态,并据此驱动多轴运动系统进行空间轨迹与刀具几何参数协同自适应调整的精密补偿方法

Benefits of technology

[0014] The beneficial effects of this invention are as follows: This solution deeply integrates information from multiple sensors to intelligently perceive the non-uniform wear state of the cutting tool, and uses a high-fidelity digital twin model corrected by real-time data to predict the wear evolution trend. Based on this, it can automatically generate compensation instructions to coordinately adjust the tool's spatial trajectory and geometric parameters, achieving proactive and precise forward compensation. This method significantly improves the machining quality and dimensional consistency of high-precision turning of difficult-to-machine materials under complex working conditions, effectively reduces workpiece scrap and process interruption caused by tool wear, and realizes intelligent closed-loop maintenance of machining accuracy and optimized utilization of tool life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122064026B_ABST
    Figure CN122064026B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of high-precision CNC lathe turning tool automatic compensation system, specifically, it is related to the field of tool automatic compensation, the scheme is fused by depth multi-sensor information, intelligent perception tool uneven wear state, and utilize high-fidelity digital twin model corrected by real-time data, look ahead to predict wear evolution trend, based on this, it can automatically generate compensation instruction of collaborative adjustment tool space trajectory and geometric parameter, realize initiative, accurate and forward-looking compensation, this method significantly improves the machining quality and size consistency of high-precision turning of difficult-to-machine materials under complex working conditions, effectively reduces the workpiece scrap and process interruption caused by tool wear, realizes the intelligent closed-loop maintenance of machining precision and the optimized utilization of tool life.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic tool compensation, and more specifically, to an automatic compensation system for high-precision CNC lathe turning tools. Background Technology

[0002] With the rapid development of aerospace, high-end equipment and other fields, the demand for high-precision and high-efficiency machining of complex components made of difficult-to-machine materials such as carbon fiber reinforced composites and titanium-based composites is becoming increasingly urgent. When CNC turning such components, typical intermittent cutting conditions such as grooving and turning discontinuous contours are often encountered. The materials being machined have significant anisotropy, high hardness and strong abrasiveness. External factors such as the influence of coolant medium during machining and sudden load changes in the spindle due to changes in working conditions further exacerbate the complexity of the machining process. Under such harsh conditions, the interaction between the tool and the heterogeneous material is extremely intense, resulting in uneven distribution of mechanical and thermal loads on different areas of the cutting edge. This leads to the simultaneous and rapid evolution of various non-uniform wear modes such as surface adhesion, micro-chipping, and boundary wear. This directly threatens the final dimensional accuracy, geometric tolerances and surface integrity of the workpiece. In particular, it can easily cause delamination, burrs and other damage that is difficult to repair in composite materials. Therefore, achieving accurate perception and compensation for such non-uniform wear is the key to ensuring the machining quality and efficiency of high-value components.

[0003] Existing automatic compensation technologies for tool wear are mostly developed based on continuous cutting processes of homogeneous metal materials. Their technical approaches mainly fall into two categories: one relies on periodic machine shutdowns for manual offline measurements, which severely disrupts the automated machining process, is inefficient, and fails to reveal the wear state between measurements; the other is based on setting thresholds for coarse online compensation using single signals such as spindle current or average cutting force. This method has significant limitations in intermittent cutting scenarios involving composite materials. The core problem lies in the fact that existing sensing and analysis methods struggle to effectively decouple and extract high signal-to-noise ratio features directly related to the local microscopic wear morphology of the cutting edge amidst complex process noise, leading to wear... The current technology lacks a precise compensation method that can perceive the multi-dimensional wear state of the cutting edge online and at high resolution during machining, and drive the multi-axis motion system to adaptively adjust the spatial trajectory and tool geometric parameters accordingly. Furthermore, existing compensation models typically simplify the tool into an ideal geometric point and offset it as a whole. This simplified model is completely unable to cope with the non-uniform wear that actually occurs. When the cutting edge experiences local micro-chipping or asymmetrical boundary wear, single tool tip position compensation cannot correct the resulting workpiece geometric shape error. The compensation behavior itself may become a new source of error. Therefore, the current technology lacks a precise compensation method that can perceive the multi-dimensional wear state of the cutting edge locally in a high-resolution manner during machining, and drive the multi-axis motion system to perform coordinated adaptive adjustment of spatial trajectory and tool geometric parameters accordingly. Summary of the Invention

[0004] This invention addresses the technical problems existing in the prior art by providing a high-precision CNC lathe turning tool automatic compensation system. It solves the problems mentioned in the background art through a multi-sensor synchronization module, a feature extraction module, a digital twin prediction module, and a compensation decision and execution module.

[0005] The technical solution of this invention to solve the above-mentioned technical problems is as follows: specifically including: a multi-sensor synchronization module, a feature extraction module, a digital twin prediction module, and a compensation decision and execution module, wherein; Multi-sensor synchronization module: When the machine tool starts to perform machining tasks, it collects raw signals from force sensor, vibration sensor and micro coaxial vision module, and performs wavelet threshold denoising and Butterworth bandpass filtering on the raw signals from force sensor, vibration sensor and micro coaxial vision module respectively to generate multi-modal synchronization data packets with unified timestamps. Feature extraction module: After the multi-sensor synchronization module generates multi-modal synchronization data packets, it receives the multi-modal synchronization data packets and uses the spatiotemporal attention mechanism to analyze the multi-modal synchronization data packets, extracting low-dimensional wear state feature vectors that characterize the wear band on the back face of the tool, the crescent-shaped depression on the front face, and the local micro-chipping state. Digital twin prediction module: After the feature extraction module outputs the low-dimensional wear state feature vector, it calls the preset high-fidelity digital twin model of tool wear, which includes the material removal mechanism and wear physics law, and uses the joint state estimation algorithm based on unscented Kalman filtering to use the low-dimensional wear state feature vector as the observation value to correct the high-fidelity digital twin model of tool wear in real time, thereby predicting the spatial distribution prediction data of tool wear within a future time window of a set duration. Compensation Decision and Execution Module: After the digital twin prediction module outputs the tool wear spatial distribution prediction data, it combines the target machining contour of the current workpiece and calculates through the multi-objective optimization decision-maker to generate a collaborative compensation instruction for simultaneously correcting the tool tip trajectory and tool tip radius compensation value. This collaborative compensation instruction is then injected into the CNC system in advance to drive each axis of the machine tool to perform forward compensation motion. In a preferred embodiment, the multi-sensor synchronization module includes a force sensor that is a high-frequency dynamic force sensor mounted on the spindle bearing housing and capable of measuring three-dimensional dynamic cutting force components; a vibration sensor that is a miniature piezoelectric vibration sensor integrated inside the tool holder; and a miniature coaxial vision module that is a macro imaging device embedded in the tool turret structure and capable of taking fixed-point images of the cutting edge during non-cutting intervals. The raw signal output by the force sensor is a three-dimensional dynamic force raw signal containing X-direction, Y-direction and Z-direction components that vary with time. The raw signal output by the vibration sensor is a vibration raw signal that varies with time. The raw signal output by the miniature coaxial vision module is a sequence of raw images of the tool cutting edge acquired at different image acquisition times.

[0006] In a preferred embodiment, the process of performing wavelet threshold denoising and Butterworth bandpass filtering on the raw signals from the force sensor, vibration sensor, and miniature coaxial vision module, respectively, specifically involves: The original three-dimensional dynamic force and vibration signals are processed using a denoising algorithm based on wavelet packet transform and an improved threshold function. The threshold function used is an adaptive threshold function. The adaptive threshold function dynamically adjusts the denoising threshold based on the square root of the ratio of the current signal's high-frequency subband energy to the historical average high-frequency subband energy. After wavelet threshold denoising, the original three-dimensional dynamic force and vibration signals are processed to obtain a preliminary denoised signal. This preliminary denoised signal is then filtered by a Butterworth bandpass filter. The cutoff frequency of this Butterworth bandpass filter is dynamically adjusted according to the real-time rotational speed of the machine tool spindle, thus obtaining the processed force signal and the processed vibration signal.

[0007] In a preferred embodiment, generating a multimodal synchronization data packet with a unified timestamp specifically includes: For the original image sequence of the tool cutting edge area acquired by the miniature coaxial vision module, image registration is first performed in the temporal domain to eliminate image offset caused by repeated positioning deviation of the turret. Then, the multi-scale Retinex image enhancement algorithm is applied to process the registered images to improve the visual contrast of the tool cutting edge area under complex lighting conditions with coolant or chip occlusion. Next, a method combining the Canny edge detection operator and morphological operations is used to initially extract the cutting edge contour line representing the geometry of the tool cutting edge and the binarized wear area mask that identifies suspicious wear areas from the enhanced images. The cutting edge contour line and the wear area mask together constitute the primary visual feature information, and the corresponding image acquisition time is marked for the primary visual feature information. For the processed force signal and the processed vibration signal, at each image acquisition time, the precise force signal value and vibration signal value corresponding to that image acquisition time are calculated using the cubic spline interpolation algorithm. Finally, the force signal value and vibration signal value corresponding to the same image acquisition time, after interpolation and alignment, as well as the cutting edge contour line and wear area mask extracted from the original image at that time, are encapsulated together into a multimodal synchronization data packet with a unified time identifier. The multimodal synchronization data packet contains the timestamp of the image acquisition time, the force signal value corresponding to the timestamp, the vibration signal value corresponding to the timestamp, the cutting edge contour line corresponding to the timestamp, and the wear area mask corresponding to the timestamp.

[0008] In a preferred embodiment, the specific process of analyzing multimodal synchronization data packets using a spatiotemporal attention mechanism in the feature extraction module is as follows: First, the processed force signal value, vibration signal value, cutting edge contour line, and wear area mask are deconstructed from the received multimodal synchronization data packet. Next, for the numerical force signal and the numerical vibration signal, time-domain statistical features, including peak value and root mean square value, and frequency-domain features, including the main frequency amplitude obtained by fast Fourier transform, are extracted to construct numerical feature vectors. For the cutting edge profile, calculate its geometric features, including curvature distribution and profile deviation, to construct a profile feature vector. For the mask of the worn area, calculate its morphological features, including area, centroid coordinates and elongation, to construct the mask feature vector; Finally, the numerical feature vector, contour feature vector, and mask feature vector are concatenated to form a multimodal initial feature vector that represents the comprehensive information of the tool and working conditions at the current moment.

[0009] In a preferred embodiment, the specific operation of extracting the low-dimensional wear state feature vector is as follows: The multimodal initial feature vector at the current moment, along with the multimodal initial feature vectors at the two adjacent historical moments, are organized into a feature sequence in chronological order. The feature sequence is input into a spatiotemporal attention layer. The spatiotemporal attention layer calculates modal attention weights for four different data sources (force signal, vibration signal, cutting edge contour line, and wear area mask) and temporal attention weights for different historical moments in the feature sequence through its internal learnable parameter matrix. The modal attention weights and temporal attention weights are interactively calculated through the learnable parameter matrix to obtain the spatiotemporal joint attention weight. Using the calculated spatiotemporal joint attention weights, the feature sequences are weighted and recalibrated to generate a focused context feature vector; Finally, the focused context feature vector is input into a deep coding network consisting of multiple fully connected layers. Through the nonlinear transformation and information compression of this deep coding network, the deep coding network maps and fuses the feature information from force signals, vibration signals, cutting edge contours and wear area masks into a unified and indivisible abstract representation, and outputs a low-dimensional wear state feature vector with a preset fixed dimension that integrates multimodal information to jointly characterize the micro-wear morphology of the tool.

[0010] In a preferred embodiment, the digital twin prediction module employs a joint state estimation algorithm based on unscented Kalman filtering to perform real-time correction of the high-fidelity digital twin model of tool wear using low-dimensional wear state feature vectors as observations. The specific operation is as follows: First, during the initialization of the digital twin prediction module, the core state variables of the high-fidelity digital twin model of tool wear are defined. The core state variables include the wear depth of multiple discretized micro-elements on the tool flank face, the contour parameters of the crescent-shaped depression on the rake face, and the instantaneous cutting interface parameters composed of equivalent cutting temperature and contact stress distribution. Initial values ​​are assigned to the core state variables and their corresponding estimation error covariance matrix. Subsequently, after receiving the low-dimensional wear state feature vector, joint state estimation is performed. This process includes a prediction step and an update step, specifically: In the prediction step, the state of the digital twin model after correction at the previous time step and its posterior estimation error covariance matrix are used to advance the physical laws contained in the high-fidelity digital twin model of tool wear through numerical integration, and the prior estimates of the core state variables at the current time step and their prior estimation error covariance matrix are calculated. In the update step, the received low-dimensional wear state feature vector is used as the actual observation value, and a nonlinear observation function is defined. This function simulates and generates a corresponding predicted feature vector based on any assumed state of the tool wear high-fidelity digital twin model. By calculating the residual between the actual observation value and the predicted feature vector generated by the nonlinear observation function from the current prior state, and combining the prior estimation error covariance matrix and the preset observation noise covariance matrix, the Kalman gain is calculated. The optimal posterior estimate of the core state variable after data correction at the current moment is obtained by adding the product of the prior estimate at the current moment and the Kalman gain multiplied by the difference between the actual observation value and the predicted feature vector corresponding to the observation value. Finally, the posterior estimation error covariance matrix of the core state variables at the current moment is calculated, thereby completing the real-time correction of the state of the digital twin model.

[0011] In a preferred embodiment, the process of predicting the spatial distribution of tool wear within a future time window specifically involves: After completing the real-time correction of the state of the digital twin model at the current moment, the optimal posterior estimate of the core state variables obtained at the current moment is used as the initial condition to drive the high-fidelity digital twin model of tool wear forward for numerical integration. By solving the initial value problem of the differential equation corresponding to the high-fidelity digital twin model of tool wear with the optimal posterior estimate as the initial condition, the predicted value sequence of the core state variable at a series of moments in the future time window is obtained; from this predicted value sequence, the predicted data of the wear depth of each discretized micro-element on the tool flank face is extracted. This predicted data constitutes a multi-dimensional array, where one dimension index corresponds to different discretized micro-element on the tool flank face to represent the spatial distribution, and the other dimension index corresponds to different future predicted moments to represent the temporal evolution; Finally, the multidimensional array composed of the tool flank wear depth prediction data, which characterizes the spatial distribution and temporal evolution of the tool, is encapsulated together with the corresponding future time series into structured tool wear spatial distribution prediction data and output.

[0012] In a preferred embodiment, the specific process of calculation by the multi-objective optimization decision-maker in the compensation decision and execution module is as follows: First, based on the predicted data of wear depth of each discretized micro-element on the tool flank face at the first predicted time point in the tool wear spatial distribution prediction data, and combined with the standard geometric model of the tool, an equivalent cutting edge model that incorporates the predicted non-uniform wear morphology is dynamically reconstructed. Next, using the equivalent cutting edge model, a virtual cutting simulation is performed along the target machining contour of the current workpiece. By calculating the deviation between the ideal tool path and the path corresponding to machining using the equivalent cutting edge model, a spatial contour error field is generated. Subsequently, a multi-objective optimization function is constructed with the joint optimization objectives of minimizing the spatial contour error field, minimizing the change in compensating motion acceleration, and minimizing the unevenness of predicted wear distribution on the cutting edge. The decision variables of the multi-objective optimization function are the sequence of machine tool CNC axis position compensation amounts at each discrete moment within the future set time window, and the sequence of tool tip radius compensation values ​​at each discrete moment within the future set time window. The constraints of the multi-objective optimization function include: the maximum allowable traverse speed and maximum acceleration limits of each CNC axis of the machine tool, the physically feasible range of tool tip radius compensation values, and the non-interference spatial geometric relationship between the geometry of the compensated tool and the workpiece and fixture. Under the constraints of the maximum allowable traverse speed and maximum acceleration limits of each CNC axis of the machine tool, the physically feasible range of tool tip radius compensation values, and the non-interference spatial geometric relationship between the geometry of the compensated tool and the workpiece and fixture, the multi-objective optimization function is solved to obtain an optimal compensation instruction sequence within a future set time window. This sequence contains the optimal axis position compensation amount and the optimal tool tip radius compensation value at each future time.

[0013] In a preferred embodiment, the specific process of generating the collaborative compensation instruction and injecting it into the CNC system in advance is as follows: First, the optimal axis position compensation values ​​corresponding to different CNC axes in the optimal compensation instruction sequence are superimposed onto the original CNC axis position commands corresponding to the target machining contour to generate a dynamically corrected tool space trajectory; at the same time, the optimal tool tip radius compensation value in the optimal compensation instruction sequence is converted into a tool radius compensation register update instruction stream that changes with time. Next, the generated tool space trajectory and the tool radius compensation register update instruction stream are respectively subjected to look-ahead smoothing filtering and then merged to generate the final smooth and executable collaborative compensation instruction. The collaborative compensation command is injected into the interpolator of the CNC system in advance through a high-speed data interface; During the execution of the collaborative compensation command, the compensation decision and execution module also establishes a closed-loop monitoring loop. This loop continuously receives the latest low-dimensional wear state feature vector from the feature extraction module and quickly compares the actual wear state represented by the latest low-dimensional wear state feature vector with the short-term tool wear spatial distribution prediction data output by the digital twin prediction module at the corresponding time. When the difference between the actual wear state and the short-term tool wear spatial distribution prediction data exceeds a preset deviation threshold, a local and rapid optimization recalculation is immediately triggered. The latest low-dimensional wear state feature vector is used as the new observation starting point to update the subsequent unexecuted tool wear spatial distribution prediction data. Based on the updated tool wear spatial distribution prediction data, the local optimal compensation command sequence is solved and generated again to replace and update the subsequent collaborative compensation commands to be injected.

[0014] The beneficial effects of this invention are as follows: This solution deeply integrates information from multiple sensors to intelligently perceive the non-uniform wear state of the cutting tool, and uses a high-fidelity digital twin model corrected by real-time data to predict the wear evolution trend. Based on this, it can automatically generate compensation instructions to coordinately adjust the tool's spatial trajectory and geometric parameters, achieving proactive and precise forward compensation. This method significantly improves the machining quality and dimensional consistency of high-precision turning of difficult-to-machine materials under complex working conditions, effectively reduces workpiece scrap and process interruption caused by tool wear, and realizes intelligent closed-loop maintenance of machining accuracy and optimized utilization of tool life. Attached Figure Description

[0015] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a block diagram of the system structure of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0018] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0019] Example 1 This embodiment provides, for example Figure 1-2 The high-precision CNC lathe turning tool automatic compensation system shown includes: a multi-sensor synchronization module, a feature extraction module, a digital twin prediction module, and a compensation decision and execution module, wherein; Multi-sensor synchronization module: When the machine tool starts to perform machining tasks, it collects raw signals from force sensor, vibration sensor and micro coaxial vision module, and performs wavelet threshold denoising and Butterworth bandpass filtering on the raw signals from force sensor, vibration sensor and micro coaxial vision module respectively to generate multi-modal synchronization data packets with unified timestamps. Feature extraction module: After the multi-sensor synchronization module generates multi-modal synchronization data packets, it receives the multi-modal synchronization data packets and uses the spatiotemporal attention mechanism to analyze the multi-modal synchronization data packets, extracting low-dimensional wear state feature vectors that characterize the wear band on the back face of the tool, the crescent-shaped depression on the front face, and the local micro-chipping state. Digital twin prediction module: After the feature extraction module outputs the low-dimensional wear state feature vector, it calls the preset high-fidelity digital twin model of tool wear, which includes the material removal mechanism and wear physics law, and uses the joint state estimation algorithm based on unscented Kalman filtering to use the low-dimensional wear state feature vector as the observation value to correct the high-fidelity digital twin model of tool wear in real time, thereby predicting the spatial distribution prediction data of tool wear within a future time window of a set duration. Compensation Decision and Execution Module: After the digital twin prediction module outputs the spatial distribution prediction data of tool wear, it combines the target machining contour of the current workpiece and calculates through a multi-objective optimization decision-maker to generate a collaborative compensation instruction for simultaneously correcting the tool tip trajectory and tool tip radius compensation value. This collaborative compensation instruction is then injected into the CNC system in advance to drive each axis of the machine tool to perform forward compensation motion.

[0020] In this embodiment, it is specifically noted that in the multi-sensor synchronization module, the force sensor is a high-frequency dynamic force sensor that is installed on the spindle bearing seat and can measure the three-dimensional dynamic cutting force components; the vibration sensor is a miniature piezoelectric vibration sensor integrated inside the tool holder; and the miniature coaxial vision module is a macro imaging device embedded in the tool turret structure that can perform fixed-point shooting of the cutting edge during non-cutting intervals. The raw signal output by the force sensor is a three-dimensional dynamic force raw signal containing X-direction, Y-direction and Z-direction components that vary with time. The raw signal output by the vibration sensor is a vibration raw signal that varies with time. The raw signal output by the micro coaxial vision module is a sequence of raw images of the tool cutting edge acquired at different image acquisition times. The specific process of performing wavelet threshold denoising and Butterworth bandpass filtering on the raw signals from the force sensor, vibration sensor, and miniature coaxial vision module is as follows: For the original three-dimensional dynamic force signal and vibration signal, a denoising algorithm based on wavelet packet transform and an improved threshold function is used for processing. The threshold function used is an adaptive threshold function. The adaptive threshold function dynamically adjusts the denoising threshold based on the square root of the ratio of the current signal's high-frequency sub-band energy to the historical average high-frequency sub-band energy. The adaptive threshold function is determined in the following way: First, a baseline threshold is calibrated based on the sensor's inherent noise level. The calibration method for the baseline threshold is as follows: under the no-cutting load idling state of the machine tool, the sensor signal is collected for a period of time, and the average value of the wavelet packet energy of the high-frequency sub-band corresponding to the cutting impact frequency band is calculated. 1.1 to 1.3 times the average value is set as the baseline threshold. This calibration method can effectively characterize the sensor's inherent noise level and provide a reliable baseline starting point for dynamic threshold adjustment. Secondly, calculate the wavelet packet energy of the signal in the high-frequency subband of the corresponding cutting impact frequency band within a time window centered on the current moment, and use it as the high-frequency subband energy at the current moment; thirdly, calculate the moving average of the wavelet packet energy of this high-frequency subband over a historical period, and use it as the historical average high-frequency subband energy; finally, multiply the baseline threshold by the square root of the ratio of the high-frequency subband energy at the current moment to the historical average high-frequency subband energy, and the result is the adaptive threshold at the current moment; The reasonable range for the ratio of the current high-frequency subband energy to the historical average high-frequency subband energy is set to 0.5 to 3.0. When intermittent cutting or machining of composite materials causes severe cutting impact, this ratio can be increased to above 2.0, thereby increasing the adaptive threshold accordingly. This effectively preserves the true transient characteristics of cutting and avoids the erroneous filtering of useful signals. During the stable cutting phase, this ratio may decrease to below 1.0, thereby reducing the adaptive threshold and filtering out more background noise, significantly improving the signal-to-noise ratio. This dynamic adjustment mechanism overcomes the shortcomings of fixed thresholds in adapting to complex conditions. The above method increases the high-frequency subband energy at the current moment when the cutting impact is severe, thereby increasing the calculated adaptive threshold to retain the true transient characteristics of the cutting process. Conversely, when the cutting is stable, the high-frequency subband energy decreases at the current moment, thereby decreasing the calculated adaptive threshold to filter out more background noise. This achieves refined signal-to-noise separation and improves the accuracy of subsequent feature extraction. The original three-dimensional dynamic force signal and vibration signal are processed by wavelet threshold denoising to obtain a preliminary denoised signal. This preliminary denoised signal is then filtered by a Butterworth bandpass filter, the cutoff frequency of which is determined according to the machine... The real-time rotational speed of the machine tool spindle is dynamically adjusted to suppress frequency band interference unrelated to the current machining state, thereby obtaining the processed force signal and the processed vibration signal. The lower cutoff frequency of the Butterworth bandpass filter is set to 0.8 times the fundamental frequency corresponding to the real-time rotational speed of the machine tool spindle, and the upper cutoff frequency is set to 100 times the fundamental frequency corresponding to the real-time rotational speed of the machine tool spindle. The upper cutoff frequency is adjusted synchronously with the spindle speed. This dynamic adjustment rule ensures that the filter passband always covers the characteristic frequency components directly related to cutting, while effectively filtering out low-frequency mechanical transmission interference and high-frequency electrical noise, providing a frequency-clean signal basis for subsequent feature extraction. Generate multimodal synchronization data packets with a unified timestamp, specifically including: For the original image sequence of the tool cutting edge area acquired by the miniature coaxial vision module, image registration is first performed in the temporal domain to eliminate image offset caused by repeated positioning deviation of the turret. Then, the multi-scale Retinex image enhancement algorithm is applied to process the registered images to improve the visual contrast of the tool cutting edge area under complex lighting conditions with coolant or chip occlusion. Next, a method combining the Canny edge detection operator and morphological operations is used to initially extract the cutting edge contour line representing the geometry of the tool cutting edge and the binarized wear area mask that identifies suspicious wear areas from the enhanced images. The cutting edge contour line and the wear area mask together constitute the primary visual feature information, and the corresponding image acquisition time is marked for the primary visual feature information. For the processed force and vibration signals, at each image acquisition moment, the precise force and vibration signal values ​​corresponding to that image acquisition moment are calculated using a cubic spline interpolation algorithm. The cubic spline interpolation algorithm ensures that the reconstructed signal curves at non-sampling moments have continuous first and second derivatives, thereby obtaining force and vibration signal values ​​that are physically and numerically aligned with the image acquisition moment. This solves the data asynchrony problem caused by differences in sensor sampling rates and discrete image capture, and provides a precise time alignment basis for subsequent multimodal information fusion. Finally, the force signal values ​​and vibration signal values ​​corresponding to the same image acquisition time, after interpolation and alignment, along with the cutting edge contour and wear area mask extracted from the original image at that time, are collectively encapsulated into a multimodal synchronization data package with a unified time identifier. The multimodal synchronization data package contains the timestamp of the image acquisition time, the force signal value corresponding to the timestamp, the vibration signal value corresponding to the timestamp, the cutting edge contour line corresponding to the timestamp, and the wear area mask corresponding to the timestamp. This encapsulation method defines a structured data object, ensuring that the data of the three heterogeneous modes of force, vibration, and vision are correlated under a strictly unified time reference. This multimodal synchronization data package serves as the unique and standardized input for the subsequent feature extraction module, completely eliminating the temporal misalignment problem in multi-sensor data fusion and laying a reliable data foundation for accurately perceiving the tool status.

[0021] In this embodiment, the specific process of analyzing multimodal synchronization data packets using the spatiotemporal attention mechanism in the feature extraction module is as follows: First, the processed force signal value, vibration signal value, cutting edge contour line, and wear area mask are deconstructed from the received multimodal synchronization data packet. Next, for the numerical force signal and vibration signal, time-domain statistical features, including peak value and root mean square value, and frequency-domain features, including the dominant frequency amplitude obtained by fast Fourier transform, are extracted to construct numerical feature vectors. The peak value is the maximum absolute value of the signal within an analysis time window, used to characterize the intensity of cutting impact; the root mean square value is the effective value of the signal within that time window, used to characterize the average cutting energy; the dominant frequency amplitude is the amplitude corresponding to the significant peak value in the spectrum related to the spindle rotation frequency and its harmonics, or the tool's natural frequency, after fast Fourier transform of the signal, used to characterize the periodic excitation or resonance characteristics related to the tool state. Extracting these features can convert continuous dynamic signals into a set of stable and quantifiable indicators. For the cutting edge profile, calculate its geometric features, including curvature distribution and profile deviation, to construct a profile feature vector. The curvature distribution is obtained by calculating the curvature of each point on the profile and statistically analyzing its histogram, which is used to describe the sharpness of the cutting edge and the shape changes caused by local wear. The profile deviation is obtained by comparing the currently extracted cutting edge profile with a preset standard new tool cutting edge profile and calculating the average Euclidean distance between corresponding points, which is used to directly quantify the geometric deformation caused by wear. For the wear area mask, its morphological features, including area, centroid coordinates, and elongation, are calculated to construct the mask feature vector; the area is the total number of true pixels in the mask, which directly reflects the two-dimensional projection size of the wear area; the centroid coordinates are the average value of the pixel coordinates in the wear area, indicating the concentrated location of wear occurrence; the elongation is obtained by calculating the aspect ratio of the minimum bounding rectangle of the mask, and is used to distinguish whether the wear is local point wear or strip wear that extends along the cutting edge; Finally, the numerical feature vector, contour feature vector, and mask feature vector are concatenated to form a multimodal initial feature vector representing the comprehensive information of the tool and working conditions at the current moment. The concatenation is completed in the following order: numerical feature vector corresponding to the force signal value, numerical feature vector corresponding to the vibration signal value, contour feature vector corresponding to the cutting edge contour line, and mask feature vector corresponding to the wear area mask. This fixed concatenation order ensures that the multimodal initial feature vectors generated at different times and under different tool conditions have a consistent data structure, providing a stable input format for subsequent time-series modeling and attention weight calculation, and avoiding model confusion caused by the randomness of feature arrangement. The specific operation for extracting the low-dimensional wear state feature vector is as follows: The multimodal initial feature vector at the current moment, along with the multimodal initial feature vectors of at least two adjacent historical moments, are organized into a feature sequence in chronological order. The number of historical moments can be set to 5 to 10, covering the duration of several cutting cycles completed by the tool, to ensure that the sequence can contain short-term trend information of wear evolution. The feature sequence is input into a spatiotemporal attention layer. This layer, through its internal learnable parameter matrix, simultaneously calculates modal attention weights for four different data sources: force signal, vibration signal, cutting edge contour, and wear area mask, as well as temporal attention weights for different historical moments in the feature sequence. The learnable parameter matrix then enables the modal and temporal attention weights to interact and calculate, resulting in a spatiotemporal joint attention weight. Specifically, the interaction calculation involves: first, linearly transforming the feature vector at each moment in the feature sequence into a query vector, key vector, and value vector using different learnable parameter matrices; then, calculating the similarity between the query vector at the current moment and the key vectors at all moments in the sequence. This similarity calculation incorporates modal difference information, and the resulting similarity score implicitly contains the spatiotemporal joint attention weight. This mechanism allows the model to make autonomous judgments; for example, when identifying local micro-collapses, it focuses more on the visual contour features of the most recent moment, while when evaluating uniform wear, it focuses more on the average force signal features over the entire time period. Using the calculated spatiotemporal joint attention weights, the feature sequences are weighted and recalibrated to generate a focused post-context feature vector that focuses on key data sources and key historical information; Finally, the focused context feature vector is input into a deep coding network consisting of multiple fully connected layers. Through nonlinear transformation and information compression, the deep coding network maps and fuses the feature information from force signals, vibration signals, cutting edge contours, and wear area masks into a unified and indivisible abstract representation, outputting a low-dimensional wear state feature vector with a preset fixed dimension that integrates multimodal information to jointly characterize the micro-wear morphology of the tool. The deep coding network can contain three fully connected layers, with the number of neurons in each layer decreasing progressively, and nonlinearity is introduced using the ReLU activation function. The preset fixed dimension can be set to an integer value between 32 and 128. The goal of training the deep coding network is to maximize the correlation between the output low-dimensional wear state feature vector and real wear measurements such as the width of the wear band on the tool's flank face and the depth of the crescent-shaped depression on the rake face. Through this compression and fusion, the vector can no longer clearly separate the contribution of a single mode, but forms a holistic encoding of the wear state, improving the robustness and representational ability of the feature expression.

[0022] In this embodiment, it is specifically necessary to explain the operation of the joint state estimation algorithm based on unscented Kalman filtering in the digital twin prediction module, which uses the low-dimensional wear state feature vector as an observation to perform real-time correction of the high-fidelity digital twin model of tool wear. First, during the initialization of the digital twin prediction module, the core state variables of the high-fidelity digital twin model for tool wear are defined. These core state variables include at least the wear depth of multiple discretized micro-elements on the tool's flank face, the contour parameters of the crescent-shaped depression on the rake face, and the instantaneous cutting interface parameters composed of the equivalent cutting temperature and contact stress distribution. Initial values ​​are assigned to the core state variables and their corresponding estimation error covariance matrix. The number of discretized micro-elements on the tool's flank face is determined based on the geometric length of the tool's cutting edge and the required spatial resolution; for example, the cutting edge can be divided into 50 to 100 micro-elements. The contour parameters of the crescent-shaped depression on the rake face can be parameterized using polynomial coefficients or B-spline control points. The equivalent cutting temperature and contact stress distribution are calculated based on real-time cutting parameters using a finite element analysis submodule embedded in the digital twin model or empirical formulas. The initial values ​​of the core state variables and the estimation error covariance matrix can be set based on the tool's standard geometric parameters, material properties, and calibration data of the new tool. Subsequently, after receiving the low-dimensional wear state feature vector, joint state estimation is performed. This process includes a prediction step and an update step, specifically: In the prediction step, using the corrected state of the digital twin model from the previous moment and its posterior estimation error covariance matrix, the physical laws inherent in the high-fidelity digital twin model of tool wear are derived through numerical integration. This allows for the calculation of the prior estimates of the core state variables and their prior estimation error covariance matrix at the current moment. The numerical integration method employs the fourth-order Runge-Kutta method, with the integration step size set according to the interpolation cycle of the CNC system and the dynamic characteristics of the cutting process. It is typically consistent with the position control cycle of the CNC system, for example, 1 to 10 milliseconds. This method ensures computational accuracy while meeting real-time requirements. In the update step, the received low-dimensional wear state feature vector is used as the actual observation value, and a nonlinear observation function is defined. This function can simulate and generate a corresponding predicted feature vector based on any assumed state of the tool wear high-fidelity digital twin model. By calculating the residual between the actual observation value and the predicted feature vector generated by the nonlinear observation function from the current prior state, and combining it with the prior estimation error covariance matrix and the preset observation noise covariance matrix, the Kalman gain is calculated. The optimal posterior estimate of the core state variable after data correction at the current moment is then obtained. The Kalman gain is obtained by multiplying the actual observation value by the product of the difference between the actual observation value and the predicted feature vector corresponding to the observation value, and then adding the products. The preset observation noise covariance matrix is ​​a diagonal matrix. The value of each element on the diagonal is determined by combining the calibration accuracy of each sensor channel (force, vibration, vision) that generates the low-dimensional wear state feature vector with the confidence of the feature extraction network. For example, it can be set to 5% to 10% of the maximum squared measurement error of each sensor channel under standard test conditions. This matrix is ​​used to quantify the uncertainty of the observation value and is a key parameter for balancing the weight of model prediction and observation data and accurately calculating the Kalman gain. Finally, the posterior estimation error covariance matrix of the core state variables at the current moment is calculated, thereby completing the real-time correction of the state of the digital twin model. The specific process for predicting the spatial distribution of tool wear within a future time window is as follows: After completing the real-time correction of the digital twin model state at the current moment, the optimal posterior estimate of the core state variables obtained at the current moment is used as the initial condition to drive the high-fidelity digital twin model of tool wear forward for numerical integration again. The integration duration is a time window with a future set duration. The future set duration time window needs to cover the time from the current moment to the time sufficient to execute a complete compensation decision and machine tool response, while taking into account the decay of prediction accuracy over time. This duration is usually set to 5 to 15 seconds, for example, 10 seconds. This is approximately the time for the CNC system to execute dozens to hundreds of program segments or complete several key machining features, ensuring accuracy coverage during continuous machining. By solving the initial value problem of the differential equation corresponding to the high-fidelity digital twin model of tool wear with the optimal posterior estimate as the initial condition, a sequence of predicted values ​​for the core state variables at a series of moments within a future time window is obtained. From this sequence of predicted values, the predicted data for the wear depth of each discretized micro-element on the tool flank face is extracted. This predicted data constitutes a multidimensional array, where one dimension index corresponds to different discretized micro-elements on the tool flank face to represent spatial distribution, and another dimension index corresponds to different future prediction moments to represent temporal evolution. The specific dimensions of the multidimensional array are determined by the number of discretized micro-elements and the number of prediction moments. For example, a 50 (micro-element) × 20 (prediction moment) array represents the prediction of the wear depth at 50 spatial locations at 20 equally spaced time points in the future (e.g., one point every 0.5 seconds, for a total of 10 seconds). This data structure completely encapsulates the distribution of wear morphology in the spatial dimension and its evolution trajectory in the temporal dimension. Finally, the multidimensional array composed of the tool flank wear depth prediction data, which characterizes the spatial distribution and temporal evolution of the tool, is encapsulated together with the corresponding future time series into structured tool wear spatial distribution prediction data and output. The structured tool wear spatial distribution prediction data includes a header information to record the data generation timestamp, prediction time window length, total number of discretized infinitesimals, and spatial coordinate index; and a data body, namely the multidimensional array. This structured format ensures that the next module (compensation decision and execution module) can accurately parse and utilize the spatial-temporal prediction information within it, providing direct and quantitative input for accurate compensation of multi-axis collaboration.

[0023] In this embodiment, it is necessary to specifically explain the calculation process performed by the multi-objective optimization decision-maker in the compensation decision and execution module as follows: First, based on the predicted wear depth of each discretized micro-element on the tool flank face at the first predicted time point in the tool wear spatial distribution prediction data, and combined with the tool's standard geometric model, an equivalent cutting edge model that incorporates the predicted non-uniform wear morphology is dynamically reconstructed. The dynamic reconstruction is achieved by offsetting the predicted wear depth data along the normal direction of the flank face contour of the standard tool geometric model. For each discretized micro-element, the coordinates of its corresponding standard contour point are moved along the direction of the tool face normal vector at that point by a distance equal to the predicted wear depth of that micro-element, thereby generating a three-dimensional point cloud or parametric surface model that characterizes the true cutting edge shape after non-uniform wear. Next, using the equivalent cutting edge model, a virtual cutting simulation is performed along the target machining contour of the current workpiece. By calculating the deviation between the ideal tool path and the path corresponding to machining using the equivalent cutting edge model, a spatial contour error field is generated. The spatial contour error field is used to quantify the dimensional and shape errors introduced by the predicted non-uniform wear at different spatial positions and time points of the workpiece. The virtual cutting simulation is performed in the kernel of computer-aided manufacturing software or a dedicated geometry engine. By discretizing the equivalent cutting edge model into a series of cutting micro-elements, and based on Z-map or voxelization methods, the material removal process of each micro-element on the virtual workpiece when moving along the target machining contour is calculated, and Boolean difference operation is performed with the material removal result produced by the same movement using the ideal tool model, so as to accurately calculate the spatial contour error field. This error field is a scalar field defined on the workpiece design surface, and its value represents the overcut or undercut at that point. Subsequently, a multi-objective optimization function is constructed with the joint optimization objectives of minimizing the spatial contour error field, minimizing the change in compensating motion acceleration, and minimizing the unevenness of predicted wear distribution on the cutting edge. The decision variables of the multi-objective optimization function are the sequence of machine tool CNC axis position compensation amounts at each discrete moment within the future set time window, and the sequence of tool tip radius compensation values ​​at each discrete moment within the future set time window. The objective of minimizing the spatial contour error field is specifically to minimize the weighted sum of squared error values ​​at all affected workpiece spatial locations and at all relevant future moments. The weight values ​​are configured according to the accuracy requirements of the workpiece contour and are differentiated based on the tolerance requirements of different regions of the workpiece. For example, for finishing sections with strict fit requirements, the weight is set to 1.0; for roughing sections with non-critical features, the weight can be set to 0.1 to 0.5. This configuration ensures that the optimization process prioritizes the machining accuracy of critical areas. The objective of minimizing the change in compensated motion acceleration is specifically to minimize the weighted sum of squares of the second derivative of the position compensation sequence with respect to time over all relevant future moments. The weighting coefficients are used to balance the motion smoothness between different CNC axes. The weighting coefficients are set according to the motion inertia and servo characteristics of each CNC axis. For axes with larger inertia (such as the Z-axis of a machine tool), the corresponding acceleration change penalty weight is usually set higher than that of axes with smaller inertia (such as the X-axis). For example, the Z-axis weight is 1.0 and the X-axis weight is 0.7, in order to suppress frequent acceleration and deceleration of axes with large inertia and improve motion smoothness and machine tool life. The objective of minimizing the unevenness of predicted wear distribution on the cutting edge is specifically to minimize the statistical variance of the predicted wear depth values ​​of each discretized infinitesimal element on the tool flank at the end of a future set time window. The objective function of minimizing the statistical variance aims to encourage the compensation strategy to guide the cutting load to be distributed more evenly along the cutting edge. This is achieved by influencing the cutting depth and contact stress in different cutting zones in the virtual cutting simulation, thereby extending the overall tool life during long-term machining and avoiding premature failure caused by excessive local wear. The constraints of the multi-objective optimization function include: the maximum allowable traverse speed and maximum acceleration limits for each CNC axis of the machine tool, the physically feasible range of the tool tip radius compensation value, and the non-interference spatial geometric relationship between the geometry of the compensated tool and the workpiece and fixture. The physically feasible range of the tool tip radius compensation value is determined based on the actual size of the tool and the compensation capability of the CNC system. For example, the allowable compensation range is usually -50% to +20% of the new tool radius value. The non-interference spatial geometric relationship constraint is verified by importing the simplified three-dimensional model of the tool, workpiece, and fixture into the kinematic collision detection algorithm to ensure that no collision occurs at any of the compensated tool positions. Under the constraints of the maximum allowable traverse speed and maximum acceleration limits of each CNC axis of the machine tool, the physically feasible range of tool tip radius compensation values, and the non-interference spatial geometric relationship between the geometry of the compensated tool and the workpiece and fixture, the multi-objective optimization function is solved to obtain an optimal compensation instruction sequence within a future set time window. This sequence contains the optimal axis position compensation amount and the optimal tool tip radius compensation value at each future time. The multi-objective optimization function is solved using a constrained sequential quadratic programming algorithm or a model predictive control framework. The solver iteratively calculates a set of compensation instruction sequences that minimize the comprehensive objective function based on the set objective function and constraints. This optimal compensation instruction sequence is a time-discrete instruction array. For example, for a future 10-second window, with 10-millisecond intervals, it contains 1000 optimal X-axis compensation amounts, Z-axis compensation amounts, and tool tip radius compensation values ​​at 1000 time points. The specific process of generating collaborative compensation instructions and injecting them into the CNC system in advance is as follows: First, the optimal axis position compensation amounts corresponding to different CNC axes in the optimal compensation instruction sequence are superimposed onto the original CNC axis position commands corresponding to the target machining contour, generating a dynamically corrected tool space trajectory. Simultaneously, the optimal tool tip radius compensation value in the optimal compensation instruction sequence is converted into a tool radius compensation register update instruction stream that changes over time. The superposition operation is completed within the coordinate system of the CNC system. First, the original CNC axis position commands (interpolation points after G-code parsing) are vector-added with the optimal position compensation amount at the corresponding time. At the same time, the tool tip radius compensation value instruction stream is converted into a timestamped tool offset table update instruction that the CNC system can recognize, for example, by using a specific format of M-code or direct memory mapping writing. Next, the generated tool space trajectory and tool radius compensation register update command stream are subjected to look-ahead smoothing filtering to eliminate high-frequency jitter components and merge to generate the final smooth and executable collaborative compensation command. The look-ahead smoothing filtering uses a fifth-order or seventh-order B-spline curve to fit the discrete compensation position points to generate a smooth trajectory with continuous second derivatives (acceleration). For the tool tip radius compensation command stream, a first-order low-pass filter is used for smoothing, and its cutoff frequency is set to half the reciprocal of the CNC system tool compensation update cycle. For example, if the update cycle is 2 milliseconds, the cutoff frequency is about 250 Hz. The collaborative compensation command is injected into the interpolator of the CNC system in advance via a high-speed data interface. The amount of advance injection needs to compensate for the instruction processing and execution delay of the CNC system itself, so as to drive each axis of the CNC lathe to perform forward compensation motion before the predicted wear affects the machining accuracy. The high-speed data interface is a real-time industrial Ethernet such as EtherCAT or PROFINETIRT. The amount of advance injection is obtained by accurately calibrating the end-to-end delay of the CNC system from instruction reception, interpolation calculation to servo response. This delay is usually 1 to 4 interpolation cycles. For example, if the interpolation cycle is 1 millisecond, the advance injection time is set to 3 milliseconds to ensure that the compensation command and the original machining command are accurately synchronized in time. During the execution of collaborative compensation instructions, the compensation decision and execution module also establishes a closed-loop monitoring loop. This loop continuously receives the latest low-dimensional wear state feature vector from the feature extraction module and quickly compares the actual wear state represented by this latest low-dimensional wear state feature vector with the short-term tool wear spatial distribution prediction data output by the digital twin prediction module at the corresponding time. When the difference between the actual wear state and the short-term tool wear spatial distribution prediction data exceeds a preset deviation threshold, a local, rapid optimization recalculation is immediately triggered. Using the latest low-dimensional wear state feature vector as the new observation starting point, the subsequent unexecuted tool wear spatial distribution prediction data is updated, and the locally optimal compensation instruction sequence is re-solved and generated based on the updated tool wear spatial distribution prediction data to replace and update the subsequent collaborative compensation instructions to be injected. The preset deviation threshold is determined through offline experiments or statistical analysis of historical machining data, and is usually set to 2 to 3 times the standard deviation of the normal prediction error distribution. For example, if the average error of the predicted wear depth is 5 micrometers and the standard deviation is 2 micrometers, the deviation threshold can be set to 6 micrometers. When the difference between the actual wear characteristics monitored in real time and the short-term predicted value exceeds this threshold, it indicates that the prediction model may become inaccurate due to sudden operating conditions (such as material hardening). At this time, the local fast optimization recalculation triggered only applies to the remaining unexecuted prediction window (such as the next 2 seconds). It uses a low-computational-complexity optimization algorithm (such as gradient descent) to quickly generate new compensation instructions and performs hot replacement through a high-speed data interface, thereby ensuring the robustness and adaptability of the system under abnormal conditions.

[0024] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0025] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0026] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0027] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0028] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0029] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0030] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. An automatic compensation system for turning tools on a high-precision CNC lathe, characterized in that, Specifically, it includes: The system includes a multi-sensor synchronization module, a feature extraction module, a digital twin prediction module, and a compensation decision and execution module, among which; Multi-sensor synchronization module: When the machine tool starts executing a machining task, it acquires raw signals from the force sensor, vibration sensor, and miniature coaxial vision module, and performs wavelet threshold denoising and Butterworth bandpass filtering on the raw signals from the force sensor, vibration sensor, and miniature coaxial vision module respectively. Specifically: The original three-dimensional dynamic force signal and vibration signal are processed by a denoising algorithm based on wavelet packet transform and improved threshold function, wherein the threshold function used is an adaptive threshold function. The adaptive threshold function dynamically adjusts the denoising threshold based on the square root of the ratio of the current signal's high-frequency subband energy to the historical average high-frequency subband energy. The three-dimensional dynamic force and vibration original signals are processed by wavelet threshold denoising to obtain a preliminary denoised signal. The preliminary denoised signal is then filtered by a Butterworth bandpass filter. The cutoff frequency of the Butterworth bandpass filter is dynamically adjusted according to the real-time rotational speed of the machine tool spindle, thereby obtaining the processed force signal and the processed vibration signal. Generate multimodal synchronization data packets with a unified timestamp, specifically including: For the original image sequence of the tool cutting edge area acquired by the miniature coaxial vision module, image registration is first performed in the temporal domain to eliminate image offset caused by repeated positioning deviation of the turret. Then, the multi-scale Retinex image enhancement algorithm is applied to process the registered images to improve the visual contrast of the tool cutting edge area under complex lighting conditions with coolant or chip occlusion. Next, a method combining the Canny edge detection operator and morphological operations is used to initially extract the cutting edge contour line representing the geometry of the tool cutting edge and the binarized wear area mask that identifies suspicious wear areas from the enhanced images. The cutting edge contour line and the wear area mask together constitute the primary visual feature information, and the corresponding image acquisition time is marked for the primary visual feature information. For the processed force signal and the processed vibration signal, at each image acquisition time, the precise force signal value and vibration signal value corresponding to that image acquisition time are calculated using the cubic spline interpolation algorithm. Finally, the force signal value and vibration signal value corresponding to the same image acquisition time, after interpolation and alignment, as well as the cutting edge contour line and wear area mask extracted from the original image at that time, are encapsulated together into a multimodal synchronization data packet with a unified time identifier. The multimodal synchronization data packet contains the timestamp of the image acquisition time, the force signal value corresponding to the timestamp, the vibration signal value corresponding to the timestamp, the cutting edge contour line corresponding to the timestamp, and the wear area mask corresponding to the timestamp. Feature extraction module: After the multi-sensor synchronization module generates multi-modal synchronization data packets, it receives the multi-modal synchronization data packets and analyzes them using a spatiotemporal attention mechanism. The analysis process is as follows: First, the processed force signal value, vibration signal value, cutting edge contour line, and wear area mask are deconstructed from the received multimodal synchronization data packet. Next, for the numerical force signal and the numerical vibration signal, time-domain statistical features, including peak value and root mean square value, and frequency-domain features, including the main frequency amplitude obtained by fast Fourier transform, are extracted to construct numerical feature vectors. For the cutting edge profile, calculate its geometric features, including curvature distribution and profile deviation, to construct a profile feature vector. For the mask of the worn area, calculate its morphological features, including area, centroid coordinates and elongation, to construct the mask feature vector; Finally, the numerical feature vector, contour feature vector, and mask feature vector are concatenated to form a multimodal initial feature vector that represents the comprehensive information of the tool and working conditions at the current moment. The low-dimensional wear state feature vectors characterizing the wear band on the flank face, the crescent-shaped depression on the rake face, and the local micro-chipping state of the tool are extracted. The specific operation is as follows: The multimodal initial feature vector at the current moment, along with the multimodal initial feature vectors at the two adjacent historical moments, are organized into a feature sequence in chronological order. The feature sequence is input into a spatiotemporal attention layer. The spatiotemporal attention layer calculates modal attention weights for four different data sources (force signal, vibration signal, cutting edge contour line, and wear area mask) and temporal attention weights for different historical moments in the feature sequence through its internal learnable parameter matrix. The modal attention weights and temporal attention weights are interactively calculated through the learnable parameter matrix to obtain the spatiotemporal joint attention weight. Using the calculated spatiotemporal joint attention weights, the feature sequences are weighted and recalibrated to generate a focused context feature vector; Finally, the focused context feature vector is input into a deep coding network consisting of multiple fully connected layers. Through the nonlinear transformation and information compression of this deep coding network, the deep coding network maps and fuses the feature information from force signals, vibration signals, cutting edge contours and wear area masks into a unified and indivisible abstract representation, and outputs a low-dimensional wear state feature vector with a preset fixed dimension that integrates multimodal information to jointly characterize the micro-wear morphology of the tool. Digital twin prediction module: After the feature extraction module outputs a low-dimensional wear state feature vector, it calls a preset high-fidelity digital twin model of tool wear that includes material removal mechanisms and wear physics. Then, it employs a joint state estimation algorithm based on unscented Kalman filtering to use the low-dimensional wear state feature vector as an observation to perform real-time correction on the high-fidelity digital twin model of tool wear. The specific operation is as follows: First, during the initialization of the digital twin prediction module, the core state variables of the high-fidelity digital twin model of tool wear are defined. The core state variables include the wear depth of multiple discretized micro-elements on the tool flank face, the contour parameters of the crescent-shaped depression on the rake face, and the instantaneous cutting interface parameters composed of equivalent cutting temperature and contact stress distribution. Initial values ​​are assigned to the core state variables and their corresponding estimation error covariance matrix. Subsequently, after receiving the low-dimensional wear state feature vector, joint state estimation is performed. This process includes a prediction step and an update step, specifically: In the prediction step, the state of the digital twin model after correction at the previous time step and its posterior estimation error covariance matrix are used to advance the physical laws contained in the high-fidelity digital twin model of tool wear through numerical integration, and the prior estimates of the core state variables at the current time step and their prior estimation error covariance matrix are calculated. In the update step, the received low-dimensional wear state feature vector is used as the actual observation value, and a nonlinear observation function is defined. This function simulates and generates a corresponding predicted feature vector based on any assumed state of the tool wear high-fidelity digital twin model. By calculating the residual between the actual observation value and the predicted feature vector generated by the nonlinear observation function from the current prior state, and combining the prior estimation error covariance matrix and the preset observation noise covariance matrix, the Kalman gain is calculated. The optimal posterior estimate of the core state variable after data correction at the current moment is obtained by adding the product of the prior estimate at the current moment and the Kalman gain multiplied by the difference between the actual observation value and the predicted feature vector corresponding to the observation value. Finally, the posterior estimation error covariance matrix of the core state variables at the current moment is calculated, thereby completing the real-time correction of the state of the digital twin model. Furthermore, the spatial distribution prediction data of tool wear within a future time window of a set duration is obtained. The prediction process is as follows: After completing the real-time correction of the state of the digital twin model at the current moment, the optimal posterior estimate of the core state variables obtained at the current moment is used as the initial condition to drive the high-fidelity digital twin model of tool wear forward for numerical integration. By solving the initial value problem of the differential equation corresponding to the high-fidelity digital twin model of tool wear with the optimal posterior estimate as the initial condition, the predicted value sequence of the core state variable at a series of moments in the future time window is obtained; from this predicted value sequence, the predicted data of the wear depth of each discretized micro-element on the tool flank face is extracted. This predicted data constitutes a multi-dimensional array, where one dimension index corresponds to different discretized micro-element on the tool flank face to represent the spatial distribution, and the other dimension index corresponds to different future predicted moments to represent the temporal evolution; Finally, the multidimensional array composed of the tool flank wear depth prediction data representing the spatial distribution and temporal evolution of the tool, together with the corresponding future time series, is encapsulated into structured tool wear spatial distribution prediction data and output. Compensation Decision and Execution Module: After the digital twin prediction module outputs the predicted data of tool wear spatial distribution, it combines the target machining contour of the current workpiece and performs calculations through a multi-objective optimization decision-maker. The specific calculation process is as follows: First, based on the predicted data of wear depth of each discretized micro-element on the tool flank face at the first predicted time point in the tool wear spatial distribution prediction data, and combined with the standard geometric model of the tool, an equivalent cutting edge model that incorporates the predicted non-uniform wear morphology is dynamically reconstructed. Next, using the equivalent cutting edge model, a virtual cutting simulation is performed along the target machining contour of the current workpiece. By calculating the deviation between the ideal tool path and the path corresponding to machining using the equivalent cutting edge model, a spatial contour error field is generated. Subsequently, a multi-objective optimization function is constructed with the joint optimization objectives of minimizing the spatial contour error field, minimizing the change in compensating motion acceleration, and minimizing the unevenness of predicted wear distribution on the cutting edge. The decision variables of the multi-objective optimization function are the sequence of machine tool CNC axis position compensation amounts at each discrete moment within the future set time window, and the sequence of tool tip radius compensation values ​​at each discrete moment within the future set time window. The constraints of the multi-objective optimization function include: the maximum allowable traverse speed and maximum acceleration limits of each CNC axis of the machine tool, the physically feasible range of tool tip radius compensation values, and the non-interference spatial geometric relationship between the geometry of the compensated tool and the workpiece and fixture. Under the constraints of the maximum allowable traverse speed and maximum acceleration limits of each CNC axis of the machine tool, the physically feasible range of tool tip radius compensation values, and the non-interference spatial geometric relationship between the geometry of the compensated tool and the workpiece and fixture, the multi-objective optimization function is solved to obtain an optimal compensation instruction sequence within a future set time window. This sequence contains the optimal axis position compensation amount and the optimal tool tip radius compensation value at each future time. A collaborative compensation command is generated to simultaneously correct the tool tip trajectory and tool tip radius compensation value, and this collaborative compensation command is injected into the CNC system in advance to drive each axis of the machine tool to perform forward compensation motion; the specific process of generating the collaborative compensation command and injecting it into the CNC system in advance is as follows: First, the optimal axis position compensation values ​​corresponding to different CNC axes in the optimal compensation instruction sequence are superimposed onto the original CNC axis position commands corresponding to the target machining contour to generate a dynamically corrected tool space trajectory; at the same time, the optimal tool tip radius compensation value in the optimal compensation instruction sequence is converted into a tool radius compensation register update instruction stream that changes with time. Next, the generated tool space trajectory and the tool radius compensation register update instruction stream are respectively subjected to look-ahead smoothing filtering and then merged to generate the final smooth and executable collaborative compensation instruction. The collaborative compensation command is injected into the interpolator of the CNC system in advance through a high-speed data interface; During the execution of the collaborative compensation command, the compensation decision and execution module also establishes a closed-loop monitoring loop. This loop continuously receives the latest low-dimensional wear state feature vector from the feature extraction module and quickly compares the actual wear state represented by the latest low-dimensional wear state feature vector with the short-term tool wear spatial distribution prediction data output by the digital twin prediction module at the corresponding time. When the difference between the actual wear state and the short-term tool wear spatial distribution prediction data exceeds a preset deviation threshold, a local and rapid optimization recalculation is immediately triggered. The latest low-dimensional wear state feature vector is used as the new observation starting point to update the subsequent unexecuted tool wear spatial distribution prediction data. Based on the updated tool wear spatial distribution prediction data, the local optimal compensation command sequence is solved and generated again to replace and update the subsequent collaborative compensation commands to be injected.

2. The high-precision CNC lathe turning tool automatic compensation system according to claim 1, characterized in that: In the multi-sensor synchronization module, the force sensor is a high-frequency dynamic force sensor that is installed on the spindle bearing seat and can measure the three-dimensional dynamic cutting force components; the vibration sensor is a miniature piezoelectric vibration sensor integrated inside the tool holder; and the miniature coaxial vision module is a macro imaging device embedded in the tool turret structure that can perform fixed-point shooting of the cutting edge during non-cutting intervals. The raw signal output by the force sensor is a three-dimensional dynamic force raw signal containing X-direction, Y-direction and Z-direction components that vary with time. The raw signal output by the vibration sensor is a vibration raw signal that varies with time. The raw signal output by the miniature coaxial vision module is a sequence of raw images of the tool cutting edge acquired at different image acquisition times.

Citation Information

Patent Citations

  • Video saliency object detection model and system based on cross attention mechanism

    CN112149459A

  • Cutter state monitoring method based on Kalman filtering fusion model

    CN117020753A

  • Diamond cutter path error compensation method based on cutter wear evolution

    CN121050355A

  • Numerical control machine tool wear monitoring and intelligent compensation control method based on deep learning

    CN121232703A

  • Cutting tool wear state identification and residual life prediction method based on digital twinning technology

    CN121722044A