Numerical control lathe cutting precision optimization method and system for metal part machining
By constructing a multimodal key feature set with timestamp alignment and combining finite element analysis and lookup table technology, the cutting feed direction deletion compensation amount is dynamically corrected, which solves the problem that small and medium-sized CNC lathes are difficult to achieve high accuracy, fast response and low cost in metal parts processing, and achieves optimization of cutting accuracy and cost reduction.
Patent Information
- Application Number
- CN202510572554.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-05-06
AI Technical Summary
Existing CNC lathes are difficult to meet the requirements of high precision, rapid response and low cost in metal parts processing, especially in the field of small and medium-sized lathes.
By constructing a multimodal key feature set with timestamp alignment, including the tool side key temperature distribution gradient, the absolute peak of key vibration of the lathe spindle, and the relative deviation rate of the cutting key feed, combined with finite element analysis and lookup table technology, an offline lookup table is generated, dynamically corrected the initial compensation amount of the cutting feed direction, and optimized cutting accuracy.
It achieves improving cutting accuracy in small and medium-sized CNC lathes, reducing hardware computing requirements and costs, and is suitable for the low latency and efficient machining needs of small and medium-sized lathes.
Smart Images

Figure CN120085607A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent control, and particularly to a method and system for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing. Background Art
[0002] Currently, in the field of high-precision numerically controlled lathe processing, long short-term memory networks (LSTMs) are generally used for processing error prediction and accuracy adjustment. However, this method has two significant technical bottlenecks: First, the LSTM model requires a large amount of training data to ensure prediction accuracy; Second, its complex network structure leads to a huge amount of calculation, requiring a high-performance computing platform for support, which significantly increases the equipment cost. In contrast, in the field of medium and small-sized numerically controlled lathes, which are the most widely used, due to limited hardware computing power, a simple judgment method based on the difference between the target cutting displacement and the actual machining displacement is usually used for accuracy adjustment, which results in the cutting accuracy being limited and seriously restricts the improvement of machining quality.
[0003] In summary, the commonly used cutting accuracy control methods for numerically controlled lathes at the present stage are difficult to meet the requirements of medium and small-sized numerically controlled lathes for high machining accuracy, fast response, and low cost during metal part processing, and there is an urgent need for a new lightweight, high-precision, and low-cost control strategy. Summary of the Invention
[0004] The present application provides a method and system for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing, which are used to solve the problem in the prior art that it is difficult to meet the requirements of medium and small-sized numerically controlled lathes for high precision, fast response, and low cost during metal part processing.
[0005] In view of the above problems, the present application provides a method and system for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing.
[0006] In a first aspect, the present application provides a method for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing, the method comprising: Constructing a multi-modal key feature set with time stamps aligned, the multi-modal key feature set being a feature data set obtained by extracting the features of the monitoring data in the cutting stable section, wherein the multi-modal key feature set includes the key temperature distribution gradient on the tool side, the key vibration absolute peak value of the lathe spindle, and the key relative deviation rate of the cutting feed; Inputting the key temperature distribution gradient on the tool side with time stamps into a tool compensation lookup table, and obtaining the initial compensation amount in the cutting feed direction with time stamps by looking up the table, wherein the tool compensation lookup table is an offline lookup table generated by combining finite element analysis and lookup table technology; Input the key temperature distribution gradient on the tool side and the absolute peak value of the key vibration of the lathe spindle into the machining state matrix to search for the corresponding historical cutting states. Among them, the machining state matrix is constructed by a two-dimensional decision table, with the horizontal axis being the absolute peak value of the key vibration of the historical lathe spindle and the vertical axis being the key temperature distribution gradient on the historical tool side. The corresponding historical cutting states are marked in each cell; Input the key temperature distribution gradient on the tool side, the absolute peak value of the key vibration of the lathe spindle, and the corresponding historical cutting states into the weight coefficient model to obtain the temperature compensation weight and vibration compensation weight for the current cutting state. Among them, the weight coefficient model assigns the reference weights of temperature and vibration through the expert method, dynamically corrects the reference weights using the importance of random forest features, and is constructed through data training; Sum the obtained temperature compensation weight and vibration compensation weight with the key temperature distribution gradient on the tool side and the absolute peak value of the key vibration of the lathe spindle respectively to obtain a dynamic correction factor, and correct the initial compensation amount in the cutting feed direction through the dynamic correction factor to obtain the cutting feed direction compensation amount with a timestamp; Obtain the target feed displacement sequence of the current metal workpiece and its timestamp, and calculate the compensation rate of the cutting feed direction compensation amount and the target feed displacement at the same timestamp; Compare the compensation rate with the relative deviation rate of the key cutting feed; If the comparison result is within the preset non-steady state region, trigger an alarm; If the comparison result is within the preset steady state region, dynamically correct the tool coordinate system through the cutting feed direction compensation amount to optimize the cutting accuracy.
[0007] In a second aspect, the present application provides a numerical control lathe cutting accuracy optimization system for metal workpiece machining, characterized in that the system includes: A multi-modal key feature set module for constructing a multi-modal key feature set with timestamp alignment. The multi-modal key feature set is a feature data set obtained by extracting the features of the cutting stable section monitoring data. Among them, the multi-modal key feature set includes the key temperature distribution gradient on the tool side, the absolute peak value of the key vibration of the lathe spindle, and the relative deviation rate of the key cutting feed; An initial compensation amount module for inputting the key temperature distribution gradient on the tool side with a timestamp into the tool compensation lookup table, and obtaining the initial compensation amount in the cutting feed direction with a timestamp by looking up the table. Among them, the tool compensation lookup table is an offline lookup table generated by combining finite element analysis and lookup table technology; The machining status matrix module is used to input the key temperature distribution gradient on the tool side and the absolute peak value of the key vibration of the lathe spindle into the machining status matrix, and search for the corresponding historical cutting status. Among them, the machining status matrix is constructed by a two-dimensional decision table. The horizontal axis is the absolute peak value of the key vibration of the historical lathe spindle, and the vertical axis is the key temperature distribution gradient on the historical tool side. The corresponding historical cutting status is marked in each cell; The weight coefficient model module is used to input the key temperature distribution gradient on the tool side, the absolute peak value of the key vibration of the lathe spindle, and the corresponding historical cutting status into the weight coefficient model to obtain the temperature compensation weight and vibration compensation weight for the current cutting status. Among them, the weight coefficient model assigns the reference weights of temperature and vibration by the expert method, dynamically corrects the reference weights using the feature importance of the random forest, and is constructed through data training; The compensation amount module is used to perform weighted summation of the obtained temperature compensation weight and vibration compensation weight with the key temperature distribution gradient on the tool side and the absolute peak value of the key vibration of the lathe spindle respectively to obtain a dynamic correction factor, and correct the initial compensation amount in the cutting feed direction through the dynamic correction factor to obtain the cutting feed direction compensation amount with a time stamp; The compensation rate acquisition module is used to acquire the target feed displacement sequence of the current metal workpiece and its time stamp, and calculate the compensation rate of the cutting feed direction compensation amount and the target feed displacement at the same time stamp; The cutting optimization module is used to compare the compensation rate with the relative deviation rate of the key cutting feed; If the comparison result is within the preset non-steady state region, an alarm is triggered; If the comparison result is within the preset steady state region, the tool coordinate system is dynamically corrected through the cutting feed direction compensation amount to optimize the cutting accuracy.
[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages: Construct a multi-modal key feature set aligned with timestamps, which are extracted from the cutting stability section monitoring data. Once these features show abnormalities during the machining process, they can quickly reflect changes in the cutting state and provide a basis for subsequent rapid adjustment; obtain the initial cutting feed direction compensation amount with timestamps through a lookup table, providing a basis for obtaining an accurate cutting feed direction compensation amount. The lookup table method can quickly obtain the corresponding initial compensation amount according to the input temperature distribution gradient without a complex real-time calculation process, improving the response speed; search for the corresponding historical cutting state from the machining state matrix. By associating the two key factors of temperature and vibration with the historical cutting state, it is possible to draw on machining experience in past similar states, which is beneficial to improving the current machining accuracy and increasing the response speed to changes in the machining state. Using the existing historical data to construct the machining state matrix does not require additional equipment or complex algorithms to re-analyze the cutting state, saving costs. From the weight coefficient model, obtain the temperature compensation weight and vibration compensation weight for the current cutting state. During the compensation process, it is possible to more accurately consider the influence of temperature and vibration on machining accuracy, thereby improving machining accuracy. The model is constructed through data training and can quickly calculate the compensation weight according to the input features, reacting promptly to changes in the cutting state and increasing the response speed. Using expert experience and existing data to construct the model does not require large-scale experiments or expensive monitoring equipment to determine the compensation weight, reducing costs; obtain a dynamic correction factor, and correct the initial cutting feed direction compensation amount through the dynamic correction factor to obtain the cutting feed direction compensation amount with timestamps. It does not require complex computing equipment or algorithms for correction and can be simply calculated using the determined weights and the obtained feature data, reducing costs. This dynamically corrected factor obtained by weighted summation can comprehensively consider the influence of temperature and vibration on the cutting feed direction compensation amount and more accurately correct the initial compensation amount. Calculate the compensation rate of the cutting feed direction compensation amount and the target feed displacement at the same timestamp, compare the compensation rate with the cutting key feed relative deviation rate, and optimize the cutting accuracy to accurately determine whether the machining process is in a stable state. Perform dynamic correction of the tool coordinate system in the steady state region, which can optimize the cutting accuracy according to the actual situation and improve the machining accuracy. While ensuring the cutting accuracy, the present invention significantly reduces the demand for hardware computing power, reduces costs, and is suitable for intelligent optimization of the cutting accuracy of medium and small-sized lathes. Description of the Drawings
[0009] Figure 1 This application provides a schematic flow chart of a method for optimizing the cutting accuracy of a numerically controlled lathe for metal part machining; Figure 2 This application provides a schematic diagram of a system for optimizing the cutting accuracy of a numerically controlled lathe for metal part machining.
[0010] Description of reference numerals: Multimodal key feature set module 11, initial compensation amount module 12, machining state matrix module 13, weight coefficient model module 14, compensation amount module 15, compensation rate acquisition module 16. Cutting optimization module 17. Specific implementation mode
[0011] The present application provides a numerical control lathe cutting accuracy optimization method and system for metal part machining. Next, the technical solutions in the present application will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. It should be understood that the present application is not limited by the example embodiments described herein. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application. In addition, it should be noted that for the convenience of description, only the parts related to the present application are shown in the accompanying drawings rather than all.
[0012] Embodiment 1, as Figure 1 shown, the present application provides a numerical control lathe cutting accuracy optimization method for metal part machining, and the method specifically includes the following steps: Construct a multimodal key feature set with time stamp alignment. The multimodal key feature set is a feature data set obtained by extracting the features of the cutting stable section monitoring data. Among them, the multimodal key feature set includes the key temperature distribution gradient on the tool side, the key vibration absolute peak value of the lathe spindle, and the key feed relative deviation rate of cutting.
[0013] Specifically, during the cutting process, the key temperature distribution gradient on the tool side quantifies the spatial inhomogeneity of the temperature field caused by cutting heat. This gradient distribution will trigger two types of key effects. The heat generated by cutting causes the tool to expand non-uniformly, changing the geometric pose of the cutting edge. At the same time, it causes the thermal elongation of the lathe spindle system, destroying the original tool setting reference. The thermal deformation reduces the spindle stiffness and the coupling of the cutting force excites abnormal vibration of the spindle, ultimately affecting the displacement in the cutting feed direction. The key vibration absolute peak value of the lathe spindle is the absolute maximum value of the vibration acceleration extracted through a rigid time domain feature window, which is a stethoscope for the stability of cutting processing and a direct quantitative index for the transient impact intensity of the cutting process, used to monitor cutting transient events in real time. The key feed relative deviation rate of cutting is a stethoscope for the cutting processing accuracy, directly reflecting the offset caused by thermal deformation / tool wear. The key vibration absolute peak value of the lathe spindle and the key feed relative deviation rate of cutting form an iron triangle with the key temperature gradient on the tool side, jointly guiding the process optimization of cutting processing.
[0014] Furthermore, constructing a multimodal key feature set with time stamp alignment includes: Deploy multimodal sensors on a lathe, preset respective sliding windows according to the acquisition frequencies of the multimodal sensors, collect the monitoring information of the lathe within each sliding window, and obtain a multimodal information sequence, where the multimodal information sequence includes a cutting feed displacement sequence, a tool-side temperature sequence, and a lathe spindle vibration sequence; According to the division of the cutting machining stage, extract the cutting feed displacement sequence, the tool-side temperature sequence, and the lathe spindle vibration sequence in the stable cutting stage, perform edge data preprocessing, and obtain a cutting key feed displacement sequence, a tool-side key temperature sequence, and a lathe spindle key vibration sequence with timestamps, where the cutting machining stage includes a feed-in stage, a stable cutting stage, and a feed-out stage; Taking the cutting key feed displacement sequence as a reference, align the tool-side key temperature sequence and the lathe spindle key vibration sequence with their timestamps to form a timestamp-aligned multimodal key sequence set; Extract the features of each modal key sequence in the timestamp-aligned multimodal key sequence set, including: Align the timestamp of the target feed displacement sequence with the timestamp of the cutting key feed displacement sequence in the multimodal key sequence set; Calculate the relative deviation of the data in the target feed displacement sequence from the corresponding data in the cutting key feed displacement sequence in the multimodal key sequence set point by point to obtain the cutting key feed relative deviation rate; Extract the temperature distribution gradient of the tool-side key temperature sequence in the multimodal key sequence set through the differential operation algorithm to obtain the tool-side temperature distribution gradient; Extract the absolute peak value of the lathe spindle key vibration sequence in the multimodal key sequence set through a rigid time-domain feature window to obtain the lathe spindle key vibration absolute peak value, where the window width is dynamically adapted to the spindle speed; Construct a timestamp-aligned multimodal key feature set with the extracted features of each modality.
[0015] Specifically, the tool-side temperature and the vibration of the lathe spindle are the core physical quantities affecting the cutting accuracy. The tool-side temperature needs to be measured non-contact. For example, multiple infrared temperature sensors can be installed near the surface of the tool along the tool direction to monitor the heat during the cutting process; vibration sensors, such as acceleration sensors, are installed on the lathe spindle to monitor the operating state of the spindle; tool displacement sensors, such as non-contact laser displacement sensors, can be installed at the tool holder to monitor the feed displacement of the tool. In the multi-modal sensor monitoring system, the setting of the sliding window needs to be based on the acquisition frequency of each sensor. The sensor sampling rate: vibration signal > displacement signal > temperature signal. The vibration monitoring information, displacement monitoring information, and tool-side temperature monitoring information of the cutting lathe are collected through their respective windows, and the collected information carries their respective timestamps. The cutting of the lathe tool is divided into the feed section, the stable cutting section, and the retraction section. There are sudden changes in acceleration and impact loads in the feed / retraction section, and the data signal-to-noise ratio is low. The stable section accounts for more than 70% of the processing time and is more suitable for analysis. The multi-modal sensors can be triggered for sampling through the EtherCAT distributed clock or the encoder Z pulse, so that the multi-modal sensor data is on the same time axis. The start and end times of the cutting stable section can be determined by parsing the CNC system G code, and the modal data of the cutting stable section can be directly extracted. Edge data preprocessing is performed on the sequence set of the extracted cutting stable section. The data preprocessing should retain the timestamps of each sequence, remove outliers, missing values, and normalize the data. After preprocessing, the timestamps of the sequence data are still retained for subsequent data analysis and processing. Since the sampling frequency of the displacement sensor is moderate, and the cutting key feed displacement sequence can most accurately reflect the cutting accuracy, the cutting key feed displacement sequence is selected as the reference, and the timestamps of the key temperature sequence on the tool side and the key vibration sequence of the lathe spindle are aligned with it. After the timestamps are aligned, feature extraction is performed on the cutting key feed displacement sequence, the key temperature sequence on the tool side, and the key vibration sequence of the lathe spindle respectively. Among them, the relative deviation rate of the cutting key feed is calculated. The core purpose is to quantify the instantaneous machining error and identify the risk of out-of-tolerance. Analyze the time-series characteristics of the deviation rate and optimize the cutting parameters. The calculation formula is as follows: ;
[0016] where Error%(t) is the relative deviation rate of the cutting key feed at time t, X 实际 (t) is the measured cutting feed displacement at time t, X 目标 (t) is the target feed displacement at time t. When X 目标(t) = 0 is marked as invalid data, where t is the timestamp. The target feed displacement of the current metal workpiece is obtained through two ways. For a new workpiece, the CAM system (Computer Aided Manufacturing system) generates theoretical motion instructions according to process parameters, and after post-processing, inputs them into the numerical control system; for an existing workpiece, the parsed motion data stored in the system is directly called. In the numerical control processing system, the precise alignment of the timestamps of the target feed displacement sequence and the measured cutting displacement sequence can be achieved by combining hardware clock synchronization and software interpolation. First, synchronize the clock of the numerical control system and the data acquisition device clock based on the IEEE 1588 Precision Time Protocol to ensure a unified time reference; then call the parsed motion instruction data (including theoretical positions and corresponding high-precision timestamps) pre-stored in the numerical control system, and at the same time read the measured displacement signal of the displacement sensor and its hardware trigger timestamp; resample the theoretical displacement sequence to the time axis of the measured sequence through a linear interpolation algorithm, and use a sliding window dynamic compensation calculation (the window width is usually 3 - 5 control cycles) to ensure the precise alignment of the timestamps of the target feed displacement sequence and the measured cutting displacement sequence during the relative deviation rate calculation. The calculated relative deviation rate of the critical cutting feed is sequence data and inherits the timestamp of the critical cutting feed displacement sequence. The differential operation algorithm calculates the temperature distribution gradient of the critical temperature sequence on the tool side. First, perform preprocessing on the obtained temperature sequence to align the timestamps to ensure the synchronization of data at each temperature measurement point, and then use the central difference method to calculate the spatial temperature gradient. For n temperature sensors installed on the tool side, its gradient calculation formula: ,
[0017] Among them, is the spatial temperature gradient vector on the tool side at time t, is the spacing between adjacent sensors, T i(t) is the measured value of the i-th temperature sensor at time t, where t is the timestamp. The timestamp of the tool-side temperature distribution gradient inherits that of the tool-side key temperature sequence. By setting a rigid time-domain feature window with a fixed duration and no overlap, the vibration signal of the lathe spindle is segmented. The maximum value of the absolute acceleration (i.e., the absolute peak) is calculated within each window, generating a peak sequence that is strictly aligned with the timestamp of the key vibration sequence of the lathe spindle, which is used to characterize the transient impact intensity during the cutting process. A rigid window means that the time span of the window is constant, and adjacent windows are connected end to end. The timestamp of the peak directly adopts the end moment of the window to ensure strict synchronization with the key vibration sequence of the lathe spindle. The rigid window works in coordination with the dynamically adapted spindle speed. First, a rigid window structure is established to ensure that each window is independently processed and the timestamp strictly inherits the end moment of the window. On this basis, the time length of the window will be dynamically adjusted according to the spindle speed: when the speed increases, the window duration is shortened in inverse proportion to ensure that each window always covers a fixed proportion of the spindle rotation period (usually 1 / 4 turn); when the speed decreases, the window is extended accordingly. This dynamic adjustment strictly maintains the rigid principle of no overlap between windows and taking the end moment of the window as the timestamp by calculating the number of window points in real time.
[0018] Furthermore, based on the cutting key feed displacement sequence, the tool-side key temperature sequence and the key vibration sequence of the lathe spindle are aligned with their timestamps to form a timestamp-aligned multi-modal key sequence set, including: Based on the length of the cutting key feed displacement sequence, the reference widths of the vibration window and the temperature window are preset respectively. The reference widths of the vibration and temperature windows are the maximum time offsets allowed for the key vibration sequence of the lathe spindle and the tool-side key temperature sequence relative to the length of the cutting key feed displacement sequence. According to the preset fixed downsampling rate R, the three sequences are downsampled layer by layer from the reference layer until the preset stop sampling threshold is reached, obtaining the coarsened cutting key feed displacement sequence, the coarsened key vibration sequence of the lathe spindle, and the coarsened tool-side key temperature sequence of multiple downsampling layers. Among them, according to the preset fixed downsampling rate, the scaling factor of each downsampling layer is calculated: Let the scaling factor of the reference layer be K 0 = 1, The scaling factor K of the first-level downsampling layer 1 = K 0 × R = R, The scaling factor K of the second-level downsampling layer 2 = K 1 × R = R 2 , …… The scaling factor K of the bottom-level downsampling layer i = K i-1 × R = R i; According to the scaling factor of each downsampling layer, calculate the vibration window width and temperature window width of each downsampling layer respectively. The vibration window width or temperature window width of each downsampling layer = the vibration window reference width or temperature window reference width × the scaling factor of this downsampling layer; At the bottom - level downsampling layer, calculate the Euclidean distance matrix of all point - pairs between the coarsened cutting key feed displacement sequence and the coarsened lathe spindle key vibration sequence of this layer. With the vibration window width of this layer as the path index offset constraint, based on the Euclidean distance matrix, perform dynamic programming recursion to generate the cumulative distance matrix of this layer. Trace back from the end point of the cumulative distance matrix of this layer, and within the vibration window width of this layer, select the set of path points in the direction with the smallest previous cumulative distance to obtain the final coarsened alignment path; According to the scaling factor K of the bottom - level downsampling layer i , perform linear interpolation on each pair of adjacent path point sets in the coarsened alignment path of the bottom - level downsampling layer to generate K i - 1 interpolation points. Insert the interpolation points between each pair of adjacent path point sets in the coarsened alignment path to obtain the initial alignment path of the level one higher than the bottom - level sampling layer, which provides the starting point for the refined alignment path of the higher level. Locate the time stamps corresponding to each interpolation point on the time axes of the coarsened cutting key feed displacement sequence and the coarsened lathe spindle key vibration sequence of the higher level respectively. With the vibration window width of this layer as the search area and the time stamp corresponding to each interpolation point as the center of the search area, extract two subsequences of the two coarsened sequences within this search area to form a candidate matching pair. The set of candidate matching pairs generated by all interpolation points forms a candidate path area. With the vibration window width of this layer as the path index offset constraint, continue dynamic programming recursion within the candidate path area to generate the cumulative distance matrix of this layer. Trace back from the end point of the cumulative distance matrix of this layer, and within the vibration window width of this layer, select the direction with the smallest previous cumulative distance to obtain the refined alignment path of this layer; And so on, refine the alignment path layer by layer until the reference layer. Take the refined alignment path obtained at the reference layer as the optimal path to obtain the displacement - vibration optimal path; According to the displacement - vibration optimal path, map the time stamps of the lathe spindle key vibration sequence to the time stamps of the cutting key feed displacement sequence by linear interpolation method to generate the lathe spindle key vibration sequence aligned with the time stamps of the cutting key feed displacement sequence; Similarly, generate the tool - side key temperature sequence aligned with the time stamps of the cutting key feed displacement sequence; The cutting key feed displacement sequence, the lathe spindle key vibration sequence, and the tool - side key temperature sequence with aligned time stamps form a multi - modal key sequence set with aligned time stamps.
[0019] Specifically, a multi-level pyramid matching algorithm using dynamic time warping (DTW) is adopted. Based on the preprocessed cutting key feed displacement sequence, the timestamps of the tool-side key temperature sequence and the lathe spindle key vibration sequence are aligned with its timestamp. The sequence length is the time span of data points. Due to time offsets caused by sensor delays or physical process lags, when defining the reference width of the vibration window, the maximum acoustic offset time is the maximum lag / lead time allowed for the vibration signal relative to the displacement, such as ±5 ms. When defining the reference width of the temperature window, the maximum offset time is the maximum lag time allowed for the temperature signal, such as +200 ms, and usually there is no lead. A preset fixed downsampling rate is used. The downsampling rate is the reduction multiple of the sampling rate of each layer relative to the previous layer. For example, R = 2 means that the number of points in each layer is halved. The three sequences are downsampled layer by layer from the reference layer until the preset stop sampling threshold is reached. The stop sampling threshold can be the minimum number of points in the displacement sequence, such as the number of points ≤ 20.
[0020] At the bottom downsampling level, which is the coarsest level of the data, first calculate the complete Euclidean distance matrix between the coarsest cutting feed displacement sequence and the coarsest lathe spindle vibration sequence. Each value in this matrix represents the distance between the corresponding data points in the two sequences. During the dynamic programming path search process, for each time point in the displacement sequence, only the data points in the vibration sequence with a time offset not exceeding the vibration window width of this layer are allowed to be matched. On the premise of satisfying this time constraint, the dynamic programming algorithm calculates the cumulative distance matrix through recursion and finally finds the optimal time alignment path. In the dynamic time warping (DTW) algorithm, the recurrence formula of the cumulative distance matrix is as follows: ;
[0021] Among them, C[i, j] represents the minimum cumulative distance from the starting point to the current point (i, j), D[i, j] represents the Euclidean distance of the current point, C[i - 1, j] is the point directly aligned from the previous point of the coarsened cutting feed displacement sequence to the current point on the coarsened lathe spindle vibration sequence, C[i, j - 1] is the point directly aligned from the previous point of the coarsened lathe spindle vibration sequence to the current point on the coarsened cutting feed displacement sequence, and C[i - 1, j - 1] is the strict alignment of the two sequences, that is, the two sequences advance synchronously by one time step. Dynamic programming ensures finding the path with the minimum cumulative distance. By reverse-selecting the adjacent point with the minimum cumulative distance from the end point of the cumulative matrix and gradually backtracking to the starting point, the coarsened alignment path is obtained. The alignment path of the low-sampling layer reflects the global trend and is mapped to the high-sampling layer as an initial estimate through interpolation, restricting the global search to the local candidate area. Interpolation ensures a smooth transition of the path between levels and prevents jump-like deviations. The alignment path is gradually optimized, and finally the optimal path is determined at the reference layer. After obtaining the optimal displacement-vibration alignment path through dynamic time warping, it is necessary to map the time stamps of the lathe spindle vibration sequence to the time axis of the cutting feed displacement sequence to determine the correspondence between each data point in the vibration sequence and the time stamps of the displacement sequence; for any target time stamp in the displacement sequence, if there is an exact matching point in the vibration sequence, the value of this point is directly used, and if there is no exact matching point, linear interpolation is used for calculation: find the two adjacent data points in the vibration sequence before and after the target time stamp, and calculate the vibration value at the target time stamp according to the values and time intervals of these two points. Through this method, all data points of the vibration sequence will be reallocated to the equally spaced time stamps of the displacement sequence, and finally a vibration data sequence that is strictly time-synchronized with the displacement sequence is generated, ensuring sample-level alignment between the two under a unified time reference. This process not only retains the dynamic characteristics of the vibration signal but also eliminates the time deviation caused by sampling rate differences or sensor delays. Similarly, a tool-side key temperature sequence with time stamp alignment is generated.
[0022] Input the tool-side key temperature distribution gradient carrying time stamps into the tool compensation lookup table, and obtain the initial compensation amount in the cutting feed direction carrying time stamps by looking up this table. Among them, the tool compensation lookup table is an offline lookup table generated by combining finite element analysis and lookup table technology.
[0023] Specifically, the tool temperature distribution gradient directly affects the thermal deformation amount and the cutting edge position, and is one of the key parameters for compensation. By pre-calculating the deformation amounts under different temperature gradients through finite element analysis and generating an offline lookup table, real-time complex calculations can be avoided, the real-time query speed is fast, and it is suitable for the low-latency requirements of small and medium-sized lathes. Especially for small and medium-sized lathes that generally process metal parts in batches, when the same tool repeatedly processes similar workpieces, the offline lookup table has high reusability, reducing the cost of numerical control equipment.
[0024] Further, the initial compensation amount of the cutting feed direction is obtained as follows: Perform K-means clustering analysis on the historical key temperature distribution gradient on the tool side and the historical absolute peak value of the key vibration of the lathe spindle that are aligned in time stamp, and extract typical historical cutting states; For each type of typical historical cutting state, simulate the change of the cutting feed direction under different historical key temperature distribution gradients on the tool side through finite element simulation, and output the initial compensation amount of the cutting feed direction; Store the obtained historical temperature gradient - initial compensation amount as a two-dimensional look-up table to obtain a tool compensation look-up table; Traverse the tool compensation look-up table with the key temperature distribution gradient on the tool side. If there is no corresponding historical temperature gradient in the look-up table, perform linear interpolation calculation on the key temperature distribution gradient on the tool side, and then query the initial compensation amount of the adjacent point in the look-up table; Bind the time stamp of the key temperature distribution gradient on the tool side to the output initial compensation amount of the cutting feed direction, and output the initial compensation amount of the cutting feed direction with a time stamp.
[0025] Specifically, integrate historical data to ensure that the historical key temperature distribution gradient on the tool side and the historical absolute peak value of the key vibration of the lathe spindle are synchronized in time. Classify historical working conditions through K-means clustering analysis, identify representative cutting states, construct a simulation model, establish a finite element model of the tool-workpiece-machine tool, consider the thermal-mechanical coupling effect, input the temperature gradient of the clustering center as the thermal load, and the vibration peak value as the dynamic disturbance. Run the simulation model. For each type of cutting state, traverse the range of the historical key temperature distribution gradient on the tool side, and simulate the tool deformation amount under different temperature gradients, and convert it into a feed direction compensation amount, such as compensation amount = deformation amount × correction coefficient. Establish a fast query relationship from the temperature gradient to the compensation amount, with the primary key being the historical key temperature distribution gradient on the tool side, arranged in ascending order of the temperature gradient to accelerate the search for adjacent points during interpolation, and the value being the initial compensation amount. The index uses a binary search tree. Input the key temperature distribution gradient on the tool side with a time stamp into the look-up table for query. If there is a corresponding temperature gradient, directly output the corresponding compensation amount. If not, find two adjacent points to calculate the interpolation compensation amount. Bind the time stamp corresponding to the data entered into the look-up table in the key temperature distribution gradient sequence on the tool side to the initial compensation amount output after the data query.
[0026] Input the key temperature distribution gradient on the tool side and the historical absolute peak value of the key vibration of the lathe spindle into the machining state matrix to search for the corresponding historical cutting state. Among them, the machining state matrix is constructed by a two-dimensional decision table, with the horizontal axis being the historical absolute peak value of the key vibration of the lathe spindle and the vertical axis being the historical key temperature distribution gradient on the tool side, and the corresponding historical cutting state is marked in each cell.
[0027] Specifically, the machining state matrix is a two-dimensional decision table based on historical data. The horizontal axis of the matrix is the discretized interval of the absolute peak value of the key vibration of the lathe spindle (such as 0 - 10 m / s², 10 - 20 m / s², etc.), and the vertical axis is the discretized interval of the key temperature distribution gradient on the tool side (such as 20 - 30 °C / mm, 30 - 40 °C / mm, etc.). Each matrix cell stores the historical cutting state classification (such as "stable cutting", "slight chatter", "thermal deformation warning", etc.) corresponding to the combination of vibration and temperature. When the current temperature gradient and vibration peak value are input in real time, the matching cell is located in the matrix through coordinate mapping (such as the bisection method or interpolation), and the historical cutting state marked in this cell is extracted for subsequent guidance of the compensation amount decision.
[0028] Furthermore, the machining state matrix includes: Obtain the historical data of the stable cutting section of the lathe, and extract the historical key temperature distribution gradient on the tool side and the historical absolute peak value of the key vibration of the lathe spindle that are aligned with the time stamp. Among them, the historical key temperature distribution gradient on the tool side and the historical absolute peak value of the key vibration of the lathe spindle cover the characteristics during the historical normal operation and the historical abnormal operation of the lathe; Preset a fixed step size for the historical key temperature distribution gradient on the tool side, and divide the historical key temperature distribution gradient on the tool side into the vertical axis of the two-dimensional decision table according to the fixed step size; Preset a fixed step size for the historical absolute peak value of the key vibration of the lathe spindle, and divide the historical absolute peak value of the key vibration of the lathe spindle into the horizontal axis of the two-dimensional decision table according to the fixed step size; Extract the historical cutting state related to the above two historical characteristics from the historical data of the stable cutting section of the lathe, and mark the historical cutting state in the corresponding cell of the two-dimensional decision table.
[0029] Specifically, extract the historical key temperature distribution gradient on the tool side and the historical absolute peak value of the key vibration of the lathe spindle with time stamps aligned from the historical data in the stable cutting section of the lathe, covering normal and abnormal working conditions. Divide the temperature gradient into discrete intervals (such as 20 - 25 °C / mm, 25 - 30 °C / mm, etc.) at a fixed step (such as 5 °C / mm), and divide the vibration peak value into discrete intervals (such as 0 - 2 m / s², 2 - 4 m / s², etc.) at a fixed step (such as 2 m / s²). The setting is based on first statistically calculating the range and standard deviation of the historical temperature gradient / vibration peak value to ensure that the discretized intervals cover the data range, and then setting the step according to the process sensitivity. If a change in the temperature gradient of ±5 °C / mm significantly affects the cutting quality, the step is set to 5 °C / mm. Then, the adjacent intervals are connected end to end to avoid "unassigned" data. For the historical cutting state annotation, according to the cutting state corresponding to each temperature - vibration combination in the historical data, mark it in the corresponding cell of the two - dimensional decision table, and count the cutting states corresponding to all historical data falling into the same cell, and select the high - frequency state (such as 80% of the data being "normal cutting") as the annotation result of this cell.
[0030] Input the key temperature distribution gradient on the tool side, the absolute peak value of the key vibration of the lathe spindle, and the corresponding historical cutting state into the weight coefficient model to obtain the temperature compensation weight and vibration compensation weight for the current cutting state. Among them, the weight coefficient model assigns the reference weights of temperature and vibration through the expert method, and dynamically corrects the reference weights using the importance of random forest features, and is constructed and formed through data training.
[0031] Specifically, first preset the reference compensation weights of the temperature gradient and vibration peak value based on expert experience (such as temperature accounting for 60% and vibration accounting for 40%). Subsequently, introduce the random forest algorithm to analyze the actual influence degree of the two types of features in the historical data on the cutting state, and dynamically correct the reference weights through feature importance analysis (such as when the importance of vibration increases under abnormal working conditions, its weight can be adjusted to 55%). The finally generated weight coefficient model can output the adaptive temperature compensation weight and vibration compensation weight according to the real - time input data, realizing the precise matching of the compensation strategy and the current processing state.
[0032] Furthermore, the weight coefficient model includes: Construct a historical operating state data set. Each historical operating state subset includes a pair of historical key temperature distribution gradients on the tool side and historical absolute peak values of the key vibration of the lathe spindle divided at a fixed step, as well as the corresponding historical cutting state. The historical operating state data set is divided into a training set and a validation set; Assign the corresponding temperature reference weight and vibration reference weight to a pair of historical key temperature distribution gradients on the tool side and historical absolute peak values of the key vibration of the lathe spindle divided at a fixed step in each historical operating state subset through the expert method; Randomly extract a subset of historical operating states from the training set as training samples, and generate training subsets for multiple decision trees; When each tree is split, with the goal of minimizing the variance of the temperature reference weight and the vibration reference weight, randomly select features from the historical tool-side key temperature distribution gradient, the historical lathe spindle key vibration absolute peak value, and the historical cutting state in the training samples to calculate the optimal splitting point, and generate new leaf nodes; For the newly generated leaf nodes, randomly extract samples from the training set samples again, randomly select features in the samples to calculate the optimal splitting point, and so on, recursively split until the preset stopping condition is reached, and complete the construction of the weight coefficient model; After the construction of the weight coefficient model, for each leaf node in each tree, count the temperature reference weight and the vibration reference weight corresponding to all training samples falling inside the node, and calculate the mean values of the temperature reference weight and the vibration reference weight of all training samples within the leaf node respectively as the prediction result of the node, calculate the mean value of the prediction results of all leaf nodes of each tree, and obtain the prediction result of each tree. The prediction result of each tree includes the temperature initial weight and the vibration initial weight; Calculate the mean value of the prediction results of all trees, perform normalization processing, and output the temperature weight and the vibration weight; Verify the constructed weight coefficient model through the validation set.
[0033] Specifically, the initial reference weight is set by expert experience to ensure that the initial state of the model conforms to physical cognition; the decision tree splitting target is directly aimed at minimizing the weight variance, so that the splitting process of each tree is essentially to find the feature combination that can most stably allocate weights; sample random extraction + feature random selection avoid overfitting and improve the generalization ability of the model; the leaf node mean value → single tree mean value → forest mean value gradually converges to the optimal weight, and the normalization processing ensures that the sum of the weights is 1, which conforms to the compensation amount distribution logic. The role of the historical cutting state in the random forest training is that when the decision tree is split, it is necessary to evaluate the discrimination ability of the features (temperature / vibration) on the cutting state. For example, if a certain temperature-vibration combination frequently corresponds to an abnormal state, the splitting will preferentially select this feature combination, thereby indirectly affecting the weight allocation; the cutting state distribution of the samples within the leaf node determines the weight adjustment direction. For example, if most of the samples in a node are in an abnormal state and the vibration values generally exceed the standard, the vibration weight output by this node will be higher than the reference value; the cutting state is used as a supervision signal to ensure that the weight adjustment is consistent with the actual processing requirements. When calculating the optimal splitting point, both the information gain or the Gini coefficient rely on the cutting state label to evaluate the feature importance, and ultimately affect the weight allocation strategy.
[0034] The obtained temperature compensation weight and vibration compensation weight are respectively weighted and summed with the key temperature distribution gradient on the tool side and the key vibration absolute peak value of the lathe spindle to obtain a dynamic correction factor, and the initial compensation amount in the cutting feed direction is corrected by the dynamic correction factor to obtain the cutting feed direction compensation amount with a timestamp.
[0035] Specifically, by respectively weighting and summing the temperature compensation weight and the vibration compensation weight with the current temperature distribution gradient on the tool side and the spindle vibration peak value, a dynamic correction factor can be generated, which can effectively reflect the comprehensive influence degree of temperature and vibration on the cutting feed displacement under the current machining state. The adjustment of the initial compensation amount by the dynamic correction factor not only retains the basic compensation value given by the finite element simulation, but also adaptively optimizes it through real-time working condition data. The finally output cutting feed direction compensation amount with a timestamp not only inherits the acquisition time information of the temperature data, but also realizes precise compensation under the coupling action of multiple physical quantities through the weight distribution mechanism. This method of combining offline simulation with online monitoring not only considers the steady-state characteristics of tool thermal deformation, but also takes into account the instantaneous influence of dynamic factors such as vibration, enabling the compensation amount to be intelligently adjusted as the machining state changes. At the same time, the retention of the timestamp provides a timing reference for process traceability and subsequent analysis.
[0036] Furthermore, obtaining the cutting feed direction compensation amount with a timestamp includes: Obtain the initial compensation amount ΔX in the cutting feed direction with a timestamp initial ; Obtain the temperature compensation weight W temp and the vibration compensation weight W vib ; Introduce the unit conversion coefficient β of the key temperature distribution gradient on the tool side 1 , and the unit conversion coefficient β vib of the key vibration absolute peak value A 2 of the lathe spindle; The dynamic correction factor Fcorr = Wtemp · (β1 ) + Wvib · (β2 Avib); Calibrate the system response coefficient γ, and γ is used to match the control accuracy of the system; The cutting feed direction compensation amount ΔXfinal = ΔXinitial + γ · Fcorr; Bind the timestamp of the initial compensation amount in the cutting feed direction to the cutting feed direction compensation amount to obtain the cutting feed direction compensation amount with a timestamp.
[0037] Specifically, convert the temperature gradient (°C / mm) and vibration peak value (g) into physical quantities with the same unit as the compensation amount (mm) to ensure the mathematical rationality of the weighted sum. β 1 →Thermal deformation compensation component, β 2 A vib →Vibration suppression compensation component, β 1 β can be obtained based on the thermal expansion coefficient α ( / °C) of the tool material and the effective cutting length L (mm). 1 ≈α·L; β 2 It is obtained through the transfer function of the machine tool structure or experimental calibration. During the calibration, the system response coefficient γ, which is the gain coefficient connecting the dynamic correction factor and the final compensation amount, is a physical characteristic parameter objectively measured from the actual system through a stepped excitation experiment, rather than arbitrarily set by humans. In the calibration process, first, a known compensation command (such as ΔX_command = 0.01 mm) is injected into the numerical control system, and at the same time, the actual displacement change amount (ΔX_actual) of the tool is measured by a displacement sensor. Subsequently, the ratio γ = ΔX_actual / ΔX_command is calculated. This ratio directly reflects the response efficiency of the machine tool feed system to the compensation command, and its value is jointly determined by physical factors such as the stiffness of the mechanical transmission chain, servo control characteristics, and cutting load. The experiment needs to be repeated under different working conditions (no load, finish machining, heavy cutting), and random errors are eliminated through statistical averaging or curve fitting. The finally obtained γ value is essentially a quantitative characterization of the system's dynamic characteristics, used to convert the theoretically calculated dynamic correction factor (Fcorr) into an effective compensation amount that matches the actual physical system, ensuring that the compensation control is neither too aggressive to cause oscillation nor too conservative to leave residual errors. This method of calibration based on measured data makes γ the key bridge connecting the control algorithm and the physical system, and its accuracy directly determines the actual effect of the compensation system. The timestamp of the initial compensation amount in the cutting feed direction inherits the timestamp of the key temperature distribution gradient on the tool side, and binds the timestamp of the initial compensation amount in the cutting feed direction to the compensation amount in the cutting feed direction to prepare for subsequent data analysis.
[0038] Obtain the target feed displacement sequence of the current metal workpiece and its timestamp, and calculate the compensation rate between the compensation amount in the cutting feed direction and the target feed displacement at the same timestamp.
[0039] Specifically, the timestamp of the cutting feed direction compensation amount comes from the timestamp of the initial cutting feed direction compensation amount. The timestamp of the initial cutting feed direction compensation amount inherits the timestamp of the key temperature distribution gradient on the tool side. The timestamp of the key temperature distribution gradient on the tool side inherits the timestamp of the cutting key feed displacement sequence. The timestamp of the cutting key feed displacement sequence is aligned with the timestamp of the cutting key feed displacement sequence. The source of the target feed displacement sequence of the current metal workpiece and its timestamp, as well as the method of aligning the timestamp of the target feed displacement sequence with the data timestamp of the cutting key feed displacement sequence in the multimodal key sequence set, have been described in detail when calculating the relative deviation rate of the cutting key feed. This will not be repeated here. Through the above analysis, it can be known that the alignment of the timestamp of the target feed displacement sequence with the data timestamp of the cutting key feed displacement sequence in the multimodal key sequence set indicates the alignment of the timestamp of the target feed displacement sequence with the timestamp of the cutting feed direction compensation amount. Calculate the compensation rate of the cutting feed direction compensation amount and the target feed displacement at the same timestamp. The formula is: , where, if the value of the target feed displacement at time t timestamp is 0, it needs to be marked as invalid data. Calculate the compensation rate of the cutting feed direction compensation amount and the target feed displacement at the same timestamp. According to the calculation result of the compensation rate, the cutting parameters can be adjusted in real time and the error can be compensated in real time.
[0040] Compare the compensation rate with the relative deviation rate of the cutting key feed, If the comparison result is within the preset non-steady state region, an alarm is triggered; If the comparison result is within the preset steady state region, start the corresponding soft preemption mechanism. At the soft preemption layer, dynamically correct the tool coordinate system through the cutting feed direction compensation amount to optimize the cutting accuracy.
[0041] Specifically, the compensation rate reflects the relationship between the compensation amount in the cutting feed direction and the target feed displacement, and the relative deviation rate of the cutting key feed reflects the degree of deviation between the actual key feed and the ideal key feed. Comparing the two can directly monitor the degree of conformity between the actual processing and the expected processing during the cutting process, which is a quantitative monitoring method for the processing accuracy. The steady-state area refers to the situation in which the comparison result between the compensation rate and the relative deviation rate of the cutting key feed is in a normal and reasonable range during the cutting process. In actual processing, it is difficult to achieve a completely unchanged processing state. These fluctuations will not have a significant negative impact on the processing accuracy, quality and efficiency. In the soft layer of the system, the tool coordinate system can be dynamically corrected according to the compensation amount in the cutting feed direction to eliminate the influence of the error on the cutting feed direction and optimize the cutting accuracy. The non-steady-state area refers to the situation in which the comparison result between the compensation rate and the relative deviation rate of the cutting key feed exceeds the normal range. This indicates that an abnormal situation has occurred during the processing, such as sudden aggravation of tool wear, deformation of the workpiece due to excessive cutting force, and failure of a component of the processing system (such as the spindle motor). The fault needs to be handled in time.
[0042] Embodiment 2 is based on the same inventive concept as the CNC lathe cutting accuracy optimization method for metal parts processing in the above embodiment. Figure 2 As shown, the present application provides a CNC lathe cutting accuracy optimization method system for metal parts processing, the system comprising: A multimodal key feature set module 11 is used to construct a multimodal key feature set with time stamp alignment, wherein the multimodal key feature set is a feature data set obtained by extracting the features of the cutting stable segment monitoring data, wherein the multimodal key feature set includes the key temperature distribution gradient on the tool side, the key vibration absolute peak value of the lathe spindle, and the key cutting feed relative deviation rate; An initial compensation module 12 is used to input the key temperature distribution gradient of the tool side with a timestamp into a tool compensation lookup table, and look up the table to obtain an initial compensation amount of the cutting feed direction with a timestamp, wherein the tool compensation lookup table is an offline lookup table generated by combining finite element analysis and lookup table technology; The processing state matrix module 13 is used to input the key temperature distribution gradient of the tool side and the key vibration absolute peak value of the lathe spindle into the processing state matrix, and search for the corresponding historical cutting state, wherein the processing state matrix is constructed by a two-dimensional decision table, the horizontal axis is the historical lathe spindle key vibration absolute peak value, the vertical axis is the historical tool side key temperature distribution gradient, and the corresponding historical cutting state is marked in each unit; The weight coefficient model module 14 is configured to input the key temperature distribution gradient on the tool side, the absolute peak value of the key vibration of the lathe spindle, and the corresponding historical cutting state into the weight coefficient model to obtain the temperature compensation weight and the vibration compensation weight for the current cutting state. Among them, the weight coefficient model allocates the reference weights of temperature and vibration through the expert method, dynamically corrects the reference weights using the importance of random forest features, and is constructed through data training; The compensation amount module 15 is configured to perform weighted summation of the obtained temperature compensation weight and vibration compensation weight with the key temperature distribution gradient on the tool side and the absolute peak value of the key vibration of the lathe spindle respectively to obtain a dynamic correction factor, and correct the initial compensation amount in the cutting feed direction through the dynamic correction factor to obtain the cutting feed direction compensation amount with a time stamp; The compensation rate acquisition module 16 is configured to acquire the target feed displacement sequence of the current metal workpiece and its time stamp, and calculate the compensation rate of the cutting feed direction compensation amount and the target feed displacement at the same time stamp; The cutting optimization module 17 is configured to compare the compensation rate with the relative deviation rate of the key cutting feed; If the comparison result is within the preset non-steady state region, an alarm is triggered; If the comparison result is within the preset steady state region, the tool coordinate system is dynamically corrected through the cutting feed direction compensation amount to optimize the cutting accuracy.
[0043] Through the foregoing detailed description of the method for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing in this specification, those skilled in the art can clearly know the system for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing in this embodiment. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method part.
[0044] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A CNC lathe cutting accuracy optimization method for metal parts processing, characterized in that: Methods include: Construct a timestamp-aligned multimodal key feature set, which is a feature data set obtained by extracting the features of the cutting stable segment monitoring data. The multimodal key feature set includes the key temperature distribution gradient on the tool side, the key vibration absolute peak of the lathe spindle, and the key cutting feed relative deviation rate. Inputting the key temperature distribution gradient of the tool side with the timestamp into the tool compensation lookup table, and looking up the table to obtain the initial compensation amount of the cutting feed direction with the timestamp, wherein the tool compensation lookup table is an offline lookup table generated by combining finite element analysis and lookup table technology; The key temperature distribution gradient on the tool side and the absolute peak value of the key vibration of the lathe spindle are input into the processing state matrix to search for the corresponding historical cutting state, wherein the processing state matrix is constructed by a two-dimensional decision table, the horizontal axis is the historical absolute peak value of the key vibration of the lathe spindle, the vertical axis is the historical key temperature distribution gradient on the tool side, and the corresponding historical cutting state is marked in each unit; The key temperature distribution gradient on the tool side, the key vibration absolute peak of the lathe spindle and the corresponding historical cutting state are input into the weight coefficient model to obtain the temperature compensation weight and vibration compensation weight of the current cutting state. The weight coefficient model allocates the benchmark weights of temperature and vibration through the expert method, and dynamically corrects the benchmark weights using the importance of random forest features, and is constructed through data training. The obtained temperature compensation weight and vibration compensation weight are weighted and summed with the key temperature distribution gradient on the tool side and the key vibration absolute peak of the lathe spindle respectively to obtain a dynamic correction factor, and the initial compensation amount in the cutting feed direction is corrected by the dynamic correction factor to obtain the cutting feed direction compensation amount with a timestamp; Obtain the target feed displacement sequence and its timestamp of the current metal workpiece, and calculate the compensation amount of the cutting feed direction and the compensation rate of the target feed displacement at the same timestamp; Compare the compensation rate with the relative deviation rate of the cutting key feed, If the comparison result is in the preset non-steady-state area, an alarm is triggered; If the comparison result is in the preset steady-state area, the tool coordinate system is dynamically corrected by the compensation amount in the cutting feed direction to optimize the cutting accuracy.
2. The method for optimizing the cutting accuracy of a CNC lathe for metal parts processing according to claim 1, characterized in that: Construct a multimodal key feature set for timestamp alignment, including: Deploy multimodal sensors on the lathe, preset respective sliding windows according to the acquisition frequency of the multimodal sensors, collect monitoring information of the lathe in each sliding window, and obtain a multimodal information sequence, which includes a cutting feed displacement sequence, a tool side temperature sequence, and a lathe spindle vibration sequence; According to the division of cutting process stages, the cutting feed displacement sequence, tool side temperature sequence and lathe spindle vibration sequence of the stable cutting segment are extracted, and the edge data preprocessing is performed to obtain the cutting key feed displacement sequence, tool side key temperature sequence and lathe spindle key vibration sequence with time stamps. Among them, the cutting process stage includes the feed segment, stable cutting segment and retract segment. Based on the cutting key feed displacement sequence, the key temperature sequence of the tool side and the key vibration sequence of the lathe spindle are aligned with their timestamps to form a multi-modal key sequence set with timestamp alignment. Extract the features of each modality key sequence in the timestamp-aligned multimodal key sequence set, including: aligning the timestamp of the target feed displacement sequence with the timestamp of the cutting key feed displacement sequence in the multi-modal key sequence set; The relative deviation between the data in the target feed displacement sequence and the corresponding data in the cutting key feed displacement sequence in the multi-modal key sequence set is calculated point by point to obtain the relative deviation rate of the cutting key feed; The temperature distribution gradient of the key temperature sequence on the tool side in the multi-modal key sequence set is extracted by differential operation, and the temperature distribution gradient on the tool side is obtained; The absolute peak value of the lathe spindle key vibration sequence in the multi-modal key sequence set is extracted through a rigid time domain feature window to obtain the absolute peak value of the lathe spindle key vibration, wherein the window width dynamically adapts to the spindle speed; The extracted features of each modality are used to form a multimodal key feature set for timestamp alignment.
3. The method for optimizing the cutting accuracy of a CNC lathe for metal parts processing according to claim 2, characterized in that: Based on the cutting key feed displacement sequence, the key temperature sequence of the tool side and the key vibration sequence of the lathe spindle are aligned with their timestamps to form a multi-modal key sequence set with timestamp alignment, including: Based on the length of the cutting key feed displacement sequence, the vibration window reference width and the temperature window reference width are preset respectively. The vibration and temperature reference window widths are the maximum time offsets allowed for the lathe spindle key vibration sequence and the tool side key temperature sequence relative to the length of the cutting key feed displacement sequence. According to the preset fixed downsampling rate R, the three sequences are downsampled layer by layer from the reference layer until the preset stop sampling threshold is reached, and the roughening cutting key feed displacement sequence, the roughening lathe spindle key vibration sequence and the roughening tool side key temperature sequence of the multi-level downsampling layer are obtained. According to the preset fixed downsampling rate, the scaling factor of each downsampling layer is calculated: Assume the scaling factor of the base layer K0 = 1, The scaling factor of the first downsampling layer is K1=K0×R=R, The scaling factor of the second downsampling layer is K2 = K1 × R = R 2 , …… The scaling factor K of the bottom downsampling layer i =K i-1 ×R=R i ; According to the scaling factor of each downsampling layer, the vibration window width and the temperature window width of each downsampling layer are calculated respectively, and the vibration window width or the temperature window width of each downsampling layer = the vibration window reference width or the temperature window reference width × the scaling factor of the downsampling layer; At the bottom-level downsampling layer, the Euclidean distance matrix of all point pairs between the key feed displacement sequence of the rough cutting and the key vibration sequence of the rough lathe spindle is calculated. The vibration window width of the layer is used as the path index offset constraint. Based on the dynamic programming recursion of the Euclidean distance matrix, the cumulative distance matrix of the layer is generated. The end point of the cumulative distance matrix of the layer is traced back, and the direction path point set with the smallest cumulative distance of the previous order is selected within the vibration window width of the layer to obtain the final coarsening alignment path. According to the scaling factor K of the bottom downsampling layer i , linearly interpolate each pair of adjacent path point sets in the coarsened alignment path of the bottom-level downsampling layer to generate K i -1 interpolation point, insert the interpolation point between each pair of adjacent path point sets in the coarsening alignment path, obtain an initial alignment path one level higher than the bottom sampling layer, provide a starting point for the next-level refined alignment path, locate the timestamp corresponding to each interpolation point on the time axis of the next-level coarsening cutting key feed displacement sequence and the coarsening lathe spindle key vibration sequence, respectively, take the vibration window width of the layer as the search area, and the timestamp corresponding to each interpolation point as the center of the search area, extract two subsequences of the two coarsening sequences located in the search area to form a candidate matching pair, and the candidate matching pair set generated by all interpolation points forms a candidate path area, take the vibration window width of the layer as the path index offset constraint, continue dynamic programming recursion in the candidate path area, generate the cumulative distance matrix of the layer in the candidate path area, trace back from the end point of the cumulative distance matrix of the layer, select the direction with the smallest cumulative distance of the previous sequence within the vibration window width of the layer, and obtain the refined alignment path of the layer; In this way, the alignment path is refined layer by layer until the reference layer is reached, and the refined alignment path obtained at the reference layer is used as the optimal path to obtain the displacement-vibration optimal path; According to the displacement-vibration optimal path, the timestamp of the lathe spindle key vibration sequence is mapped to the timestamp of the cutting key feed displacement sequence by linear interpolation method, so as to generate the lathe spindle key vibration sequence aligned with the timestamp of the cutting key feed displacement sequence; Similarly, the tool side key temperature sequence aligned with the cutting key feed displacement sequence timestamp is generated; The cutting key feed displacement sequence, lathe spindle key vibration sequence and tool side key temperature sequence with time stamp alignment are combined to form a multi-modal key sequence set with time stamp alignment.
4. The method for optimizing the cutting accuracy of a CNC lathe for metal parts processing according to claim 1, characterized in that: Processing status matrix, including: Obtain historical data of the stable cutting section of the lathe, and extract the historical tool-side key temperature distribution gradient and the historical lathe spindle key vibration absolute peak value aligned with the timestamp, wherein the historical tool-side key temperature distribution gradient and the historical lathe spindle key vibration absolute peak value cover the characteristics of the lathe during historical normal operation and historical abnormal operation; Preset a fixed step length of the key temperature distribution gradient on the tool side in history, and divide the key temperature distribution gradient on the tool side in history into the vertical axis of the two-dimensional decision table according to the fixed step length; Preset a fixed step length of absolute peak values of historical lathe spindle key vibrations, and divide the absolute peak values of historical lathe spindle key vibrations into the horizontal axis of the two-dimensional decision table according to the fixed step length; The historical cutting states related to the above two historical features are extracted from the historical data of the stable cutting segment of the lathe, and the historical cutting states are marked in the corresponding cells of the two-dimensional decision table.
5. The method for optimizing the cutting accuracy of a CNC lathe for metal parts processing according to claim 4, characterized in that: Weight coefficient model, including: Construct a historical operation status dataset, each historical operation status subset includes a pair of historical tool side key temperature distribution gradients and historical lathe spindle key vibration absolute peaks divided by a fixed step size, as well as the corresponding historical cutting states, and the historical operation status dataset is divided into a training set and a validation set; By using the expert method, a pair of historical tool side key temperature distribution gradient and historical lathe spindle key vibration absolute peak value divided by a fixed step length are assigned corresponding temperature reference weight and vibration reference weight in each historical operation state subset; Randomly extract a subset of historical operating states from the training set as training samples to generate training subsets for multiple decision trees; When each tree splits, the goal is to minimize the variance of the temperature benchmark weight and the vibration benchmark weight. Features are randomly selected from the historical tool-side key temperature distribution gradient, the historical lathe spindle key vibration absolute peak value and the historical cutting state in the training sample to calculate the optimal split point and generate a new leaf node. For the newly generated leaf nodes, randomly extract samples from the training set samples again, randomly select the features in the samples to calculate the optimal split point, and so on, recursively split until the preset stop condition is reached, and the weight coefficient model is constructed; After the weight coefficient model is constructed, each leaf node in each tree counts the temperature reference weight and vibration reference weight corresponding to all training samples falling within the node, and calculates the mean of the temperature reference weight and vibration reference weight of all training samples in the leaf node respectively as the prediction result of the node, and calculates the mean of the prediction results of all leaf nodes of each tree to obtain the prediction result of each tree, and the prediction result of each tree includes the temperature initial weight and the vibration initial weight; Calculate the mean of all tree prediction results, perform normalization, and output temperature weight and vibration weight; The constructed weight coefficient model is verified through the validation set.
6. The method for optimizing the cutting accuracy of a CNC lathe for metal parts processing according to claim 1, characterized in that: Get the cutting feed direction compensation with time stamp, including: Get the initial compensation amount ΔX in the cutting feed direction initial and its timestamp; Get the temperature compensation weight W temp and vibration compensation weight W vib ; Introducing the critical temperature distribution gradient on the tool side Unit conversion factor β1, absolute peak value of key vibration of lathe spindle A vib Unit conversion coefficient β2; Dynamic correction factor F corr =W temp · (β1 )+W vib ·(β2A vib ); Calibrate the system response coefficient γ, which is used to match the control accuracy of the system; Cutting feed direction compensation ΔXfinal=ΔXinitial+γ·Fcorr; The timestamp of the initial compensation amount in the cutting feed direction is bound to the compensation amount in the cutting feed direction, so as to obtain the compensation amount in the cutting feed direction with the timestamp.
7. The method for optimizing the cutting accuracy of a CNC lathe for metal parts processing according to claim 4, characterized in that: The initial compensation amount of the cutting feed direction with the timestamp is obtained as follows: Perform K-means cluster analysis on the key temperature distribution gradients on the tool side and the key vibration absolute peaks of the lathe spindle aligned with the timestamps to extract the typical historical cutting state; For each typical historical cutting state, the change of cutting feed direction under different historical tool side key temperature distribution gradients is simulated by finite element simulation, and the initial compensation amount of cutting feed direction is output; The obtained historical temperature gradient-initial compensation amount is stored as a two-dimensional lookup table to obtain a tool compensation lookup table; The key temperature distribution gradient on the tool side is traversed through the tool compensation lookup table. If there is no corresponding historical temperature gradient in the lookup table, the key temperature distribution gradient on the tool side is linearly interpolated and the initial compensation amount of the cutting feed direction of the adjacent point is queried in the lookup table. The timestamp of the key temperature distribution gradient on the tool side is bound to the output initial compensation amount in the cutting feed direction, and the initial compensation amount in the cutting feed direction with the timestamp is output.
8. The CNC lathe cutting accuracy optimization system for metal parts processing is characterized by: The system comprises: A multimodal key feature set module is used to construct a multimodal key feature set with timestamp alignment. The multimodal key feature set is a feature data set obtained by extracting the features of the cutting stable segment monitoring data. The multimodal key feature set includes the key temperature distribution gradient on the tool side, the key vibration absolute peak value of the lathe spindle, and the key cutting feed relative deviation rate. An initial compensation module is used to input the key temperature distribution gradient of the tool side with a timestamp into a tool compensation lookup table, and look up the table to obtain the initial compensation amount of the cutting feed direction with a timestamp, wherein the tool compensation lookup table is an offline lookup table generated by combining finite element analysis and lookup table technology; The processing state matrix module is used to input the key temperature distribution gradient on the tool side and the key vibration absolute peak value of the lathe spindle into the processing state matrix, and search for the corresponding historical cutting state, wherein the processing state matrix is constructed by a two-dimensional decision table, the horizontal axis is the historical lathe spindle key vibration absolute peak value, the vertical axis is the historical tool side key temperature distribution gradient, and the corresponding historical cutting state is marked in each unit; The weight coefficient model module is used to input the key temperature distribution gradient on the tool side, the key vibration absolute peak of the lathe spindle and the corresponding historical cutting state into the weight coefficient model to obtain the temperature compensation weight and vibration compensation weight of the current cutting state. The weight coefficient model allocates the benchmark weights of temperature and vibration through the expert method, dynamically corrects the benchmark weights using the importance of random forest features, and is constructed through data training; The compensation module is used to weight the obtained temperature compensation weight and vibration compensation weight with the key temperature distribution gradient on the tool side and the absolute peak value of the key vibration of the lathe spindle to obtain a dynamic correction factor, and correct the initial compensation amount in the cutting feed direction by the dynamic correction factor to obtain the cutting feed direction compensation amount with a timestamp; The compensation rate acquisition module is used to obtain the target feed displacement sequence and its timestamp of the current metal processing part, and calculate the compensation amount of the cutting feed direction and the compensation rate of the target feed displacement at the same timestamp; Cutting optimization module, used to compare the compensation rate and the relative deviation rate of cutting key feed, If the comparison result is in the preset non-steady-state area, an alarm is triggered; If the comparison result is in the preset steady-state area, the tool coordinate system is dynamically corrected by the compensation amount in the cutting feed direction to optimize the cutting accuracy.
Citation Information
Patent Citations
Cooperative control method and system of numerical control machine tool
CN118567294A
Control method, device and equipment of five-axis high-precision numerical control machine tool and storage medium
CN119472507A
Intelligent control method and system of numerical control machine tool for aviation titanium alloy structural part machining
CN119556639A
Tracing method for production quality of sea cucumber total nutrient extract based on whole-process tracking
CN119624259A
Automatic control method and system for milling cutter machining
CN119806039A
Cited By
Intelligent tool setting control method and system
CN120742785A
Turning tool control method and lathe
CN120755719A
Precision control method and system for double-spindle turning
CN120779860A
Deep hole drilling numerical control correction method and system based on force sense feedback
CN120839115A
Automatic feeding and discharging operation control system
CN121020196A