Numerical Control Lathe Cutting Precision Optimization Method and System for Metal Part Processing
By constructing a multimodal key feature set and weight coefficient model with timestamp alignment, combined with finite element analysis and lookup table technology, the cutting accuracy of small and medium-sized CNC lathes is optimized, and the problems of small and medium-sized CNC lathes in high precision, fast response and low cost are solved, and efficient cutting accuracy control is achieved.
Patent Information
- Application Number
- CN202510572554.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-05-06
AI Technical Summary
The prior art is difficult to achieve high-precision, fast response and low-cost cutting accuracy control on small and medium-sized CNC lathes, especially due to limited computing capabilities and large training data requirements, the processing quality is limited.
A multimodal key feature set with timestamp alignment is constructed, combined with finite element analysis and lookup table technology, the cutting feed direction is optimized through the weight coefficient model and dynamic correction factor, and the multimodal sensor monitoring data is used for accuracy optimization.
It improves the machining accuracy and response speed of small and medium-sized CNC lathes, reduces the hardware computing power requirements and costs, and is suitable for intelligent optimization of cutting accuracy of small and medium-sized lathes.
Smart Images

Figure CN120085607B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent control technology, and particularly relates 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 (LSTM) are generally used for processing error prediction and accuracy adjustment. However, this method has two significant technical bottlenecks: firstly, the LSTM model requires a large amount of training data to ensure prediction accuracy; secondly, its complex network structure leads to a huge amount of calculations and requires 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 with the widest application, due to limited hardware computing power, usually only a simple judgment method based on the difference between the target cutting displacement and the actual machining displacement is used for accuracy adjustment, which results in the cutting machining accuracy being restricted 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 high machining accuracy, fast response, and low cost during the metal part processing of medium and small-sized numerically controlled lathes, and there is an urgent need for a new control strategy that is lightweight, high-precision, and low-cost. Summary of the Invention
[0004] This application provides a method and system for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing, which is used to solve the problem in the prior art that it is difficult to meet the requirements of high precision, fast response, and low cost during the metal part processing of medium and small-sized numerically controlled lathes.
[0005] In view of the above problems, this 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, this application provides a method for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing, and the method includes:
[0007] Construct a multi-modal key feature set with time stamps aligned. The multi-modal key feature set is a feature data set obtained by extracting the characteristics of the monitoring data in the cutting stable section. Among them, 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 feed relative deviation rate of the cutting.
[0008] Input the key temperature distribution gradient on the tool side with time stamps into the tool compensation lookup table, and obtain the initial compensation amount in the cutting feed direction with time stamps by looking up this table. The tool compensation lookup table is an offline lookup table generated by combining finite element analysis and lookup table technology.
[0009] 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. 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 states are marked in each cell;
[0010] 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 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;
[0011] 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 of the cutting feed direction through the dynamic correction factor to obtain the cutting feed direction compensation amount with a time stamp;
[0012] Obtain 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;
[0013] Compare the compensation rate with the relative deviation rate of the key cutting feed;
[0014] If the comparison result is within the preset non-steady state region, trigger an alarm;
[0015] 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.
[0016] In a second aspect, the present application provides a cutting accuracy optimization system for a numerically controlled lathe for metal part machining, characterized in that the system includes:
[0017] A multi-modal key feature set module for constructing a time stamp-aligned multi-modal key feature set. 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;
[0018] An initial compensation amount module for inputting the key temperature distribution gradient on the tool side with a time stamp into the tool compensation lookup table, and obtaining the initial compensation amount of the cutting feed direction with a time stamp 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;
[0019] 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, 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 status is marked in each cell;
[0020] 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 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;
[0021] 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;
[0022] 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;
[0023] The cutting optimization module is used to compare the compensation rate with the relative deviation rate of the key cutting feed;
[0024] If the comparison result is within the preset non-steady state region, an alarm is triggered;
[0025] 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.
[0026] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0027] Construct a multi-modal key feature set aligned with timestamps, which are extracted from the monitoring data of the cutting stable section. 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 compensation amount of the cutting feed direction with timestamps through a lookup table, which provides 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 enhancing 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, which can more accurately consider the influence of temperature and vibration on machining accuracy during the compensation process, 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 improving 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 compensation amount of the cutting feed direction 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 obtained correction factor through 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 relative deviation rate of the key cutting feed, 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 small and medium-sized lathes. Description of the Drawings
[0028] Figure 1 This application provides a schematic flowchart of a method for optimizing the cutting accuracy of a numerically controlled lathe for metal part machining;
[0029] 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.
[0030] Description of the attached drawing 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. Detailed implementation manners
[0031] This application provides a method and system for optimizing the cutting accuracy of a numerically controlled lathe for metal part machining. Hereinafter, the technical solutions in this 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 this application, rather than all the embodiments of this application. It should be understood that this application is not limited by the example embodiments described herein. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of this application. Additionally, it should be noted that for the sake of description, only the parts related to this application are shown in the accompanying drawings rather than all of them.
[0032] Embodiment 1, as Figure 1 shown, this application provides a method for optimizing the cutting accuracy of a numerically controlled lathe for metal part machining, and the method specifically includes the following steps:
[0033] 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 relative deviation rate of the cutting key feed.
[0034] 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 non-uniform expansion of the tool, changing the geometric pose of the cutting edge, and at the same time causing 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 machining and a direct quantification index of the transient impact intensity during the cutting process, used to monitor cutting transient events in real time. The relative deviation rate of the cutting key feed is a stethoscope for the cutting machining accuracy, directly reflecting the offset caused by thermal deformation / tool wear. The key vibration absolute peak value of the lathe spindle and the relative deviation rate of the cutting key feed form an iron triangle with the key temperature gradient on the tool side, jointly guiding the process optimization of cutting machining.
[0035] Furthermore, constructing a multimodal key feature set with time stamp alignment includes:
[0036] Deploy multimodal sensors on a lathe, preset respective sliding windows according to the acquisition frequencies of the multimodal sensors, and collect the monitoring information of the lathe within each sliding window to obtain a multimodal information sequence, which includes a cutting feed displacement sequence, a tool-side temperature sequence, and a lathe spindle vibration sequence;
[0037] 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, and perform edge data preprocessing to 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;
[0038] 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;
[0039] Extract the features of each modal key sequence in the timestamp-aligned multimodal key sequence set, including:
[0040] 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;
[0041] 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;
[0042] 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;
[0043] 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;
[0044] Construct a timestamp-aligned multimodal key feature set with the extracted features of each modality.
[0045] 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 rates are: 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 respectively, 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 acceleration mutations 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 trigger 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 G code of the numerical control system, 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 and missing values, and standardize 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 key cutting feed displacement sequence can most accurately reflect the cutting accuracy, the key cutting feed displacement sequence is selected as the reference, and the timestamps of the key tool-side temperature sequence and the key lathe spindle vibration sequence are aligned with it. After the timestamps are aligned, feature extraction is performed on the key cutting feed displacement sequence, the key tool-side temperature sequence, and the key lathe spindle vibration sequence respectively. Among them, the relative deviation rate of the key cutting 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:
[0046] ;
[0047] where Error%(t) is the relative deviation rate of the key cutting 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 clocks of the numerical control system and the data acquisition device 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 onto 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 when calculating the relative deviation rate. 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 of timestamp alignment on the obtained temperature sequence 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:
[0048] ,
[0049] where, is the temperature spatial 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 value) is calculated within each window, generating a peak value 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 value directly adopts the end time 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 time of the window. On this basis, the time length of the window is 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 time of the window as the timestamp by calculating the number of window points in real time.
[0050] 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:
[0051] 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.
[0052] 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 in multiple downsampling layers. Among them, according to the preset fixed downsampling rate, the scaling factor of each downsampling layer is calculated:
[0053] Let the scaling factor K0 of the reference layer be 1.
[0054] The scaling factor K1 of the first-level downsampling layer is K0×R = R.
[0055] The scaling factor K2 of the second-level downsampling layer is K1×R = R 2 ,
[0056] ……
[0057] The scaling factor K of the bottom-level downsampling layer i=K i-1 ×R = R i ;
[0058] 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;
[0059] 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 dynamic programming recurrence of the Euclidean distance matrix, generate the cumulative distance matrix of this layer. Trace back from the end point of the cumulative distance matrix of this layer, and select the set of path points in the direction with the smallest previous cumulative distance within the vibration window width of this layer to obtain the final coarsened alignment path;
[0060] 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, providing 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 the dynamic programming recurrence 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 select the direction with the smallest previous cumulative distance within the vibration window width of this layer to obtain the refined alignment path of this layer;
[0061] 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;
[0062] 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;
[0063] Similarly, generate the tool - side key temperature sequence aligned with the time stamps of the cutting key feed displacement sequence;
[0064] Construct a timestamp-aligned multi-modal key sequence set from the timestamp-aligned cutting key feed displacement sequence, the lathe spindle key vibration sequence, and the tool side key temperature sequence.
[0065] Specifically, adopt the multi-level pyramid matching algorithm of dynamic time warping (DTW). Taking the preprocessed cutting key feed displacement sequence as the benchmark, align the timestamps of the tool side key temperature sequence and the lathe spindle key vibration sequence with its timestamp. The sequence length is the time span of data points. Due to time offset caused by sensor delay or physical process lag, 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 ±5ms. 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 +200ms, usually not leading. Preset a fixed downsampling rate. The downsampling rate is the reduction multiple of the sampling rate of each layer relative to the upper layer. For example, R = 2 means that the number of points in each layer is halved. Downsample the three sequences 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.
[0066] At the bottom layer of the downsampling hierarchy, that 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 allow it to match the data points in the vibration sequence whose time offset does not exceed the vibration window width of this layer. 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:
[0067] ;
[0068] 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, both sequences advance one time step synchronously. Dynamic programming ensures finding the path with the minimum cumulative distance. By selecting the adjacent point with the minimum cumulative distance backward 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, which 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 corresponding relationship 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 before and after the target time stamp in the vibration sequence, and calculate the vibration value at the target time stamp proportionally 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 of the two under the 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.
[0069] Input the tool-side key temperature distribution gradient carrying time stamps into the tool compensation lookup table, and look up the table to obtain the initial compensation amount in the cutting feed direction carrying time stamps. Among them, the tool compensation lookup table is an offline lookup table generated by combining finite element analysis and lookup table technology.
[0070] 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, which 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.
[0071] Further, the initial compensation amount of the cutting feed direction is obtained as follows:
[0072] Perform K-means clustering analysis on the historical key temperature distribution gradient on the tool side and the absolute peak value of the historical key vibration of the lathe spindle that are aligned in time stamp, and extract typical historical cutting states;
[0073] 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;
[0074] Store the obtained historical temperature gradient - initial compensation amount as a two-dimensional look-up table to obtain the tool compensation look-up table;
[0075] 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, after linearly interpolating and calculating the key temperature distribution gradient on the tool side, query the initial compensation amount of the adjacent point in the look-up table;
[0076] 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 the time stamp.
[0077] Specifically, integrate historical data to ensure that the historical key temperature distribution gradient on the tool side and the absolute peak value of the historical 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 thermo-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, which is converted into the 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 the 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 for query in the key temperature distribution gradient sequence on the tool side to the initial compensation amount output after the query of this data.
[0078] Input the critical temperature distribution gradient on the tool side and the absolute peak value of the critical vibration of the lathe spindle into the machining state matrix, and 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 critical vibration of the historical lathe spindle and the vertical axis being the critical temperature distribution gradient on the historical tool side. The corresponding historical cutting states are marked in each cell.
[0079] Specifically, the machining state matrix is a two-dimensional decision table based on historical data. Its horizontal axis is the discretization interval of the absolute peak value of the critical vibration of the lathe spindle (such as 0 - 10 m / s², 10 - 20 m / s², etc.), and the vertical axis is the discretization interval of the critical temperature distribution gradient on the tool side (such as 20 - 30 °C / mm, 30 - 40 °C / mm, etc.). Each matrix cell stores the classification of the historical cutting state corresponding to the combination of vibration and temperature (such as "stable cutting", "slight chatter", "thermal deformation warning", etc.). 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 guiding the subsequent compensation amount decision.
[0080] Furthermore, the machining state matrix includes:
[0081] Obtain the historical data of the stable cutting section of the lathe, and extract the historical critical temperature distribution gradient on the tool side and the absolute peak value of the historical critical vibration of the lathe spindle that are aligned with the time stamps. Among them, the historical critical temperature distribution gradient on the tool side and the absolute peak value of the historical critical vibration of the lathe spindle cover the characteristics during the normal operation and abnormal operation of the lathe's history.
[0082] Preset a fixed step size for the historical critical temperature distribution gradient on the tool side, and divide the historical critical temperature distribution gradient on the tool side according to the fixed step size and fill it into the vertical axis of the two-dimensional decision table.
[0083] Preset a fixed step size for the absolute peak value of the historical critical vibration of the lathe spindle, and divide the absolute peak value of the historical critical vibration of the lathe spindle according to the fixed step size and fill it into the horizontal axis of the two-dimensional decision table.
[0084] Extract the historical cutting states related to the above two historical characteristics from the historical data of the stable cutting section of the lathe, and mark the historical cutting states in the corresponding cells of the two-dimensional decision table.
[0085] 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 timestamp alignment 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 basis is to first calculate 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 set the step according to the process sensitivity. If a change of ±5 °C / mm in the temperature gradient significantly affects the cutting quality, the step is set to 5 °C / mm. Then, the adjacent intervals are connected end to end to avoid "unattributed" 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 is "normal cutting") as the annotation result of this cell.
[0086] 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.
[0087] 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.
[0088] Furthermore, the weight coefficient model includes:
[0089] 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;
[0090] Assign corresponding temperature reference weights and vibration reference weights to the key temperature distribution gradients of the historical tool side and the absolute peak values of the key vibrations of the historical lathe spindle, which are divided by a fixed step size, in each historical operating state subset through the expert method;
[0091] Randomly select historical operating state subsets from the training set as training samples to generate training subsets for multiple decision trees;
[0092] When each tree is split, aiming at minimizing the variances of the temperature reference weights and vibration reference weights, randomly select features from the key temperature distribution gradients of the historical tool side, the absolute peak values of the key vibrations of the historical lathe spindle, and the historical cutting states in the training samples to calculate the optimal splitting point and generate new leaf nodes;
[0093] For the newly generated leaf nodes, randomly select 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 to complete the construction of the weight coefficient model;
[0094] After the construction of the weight coefficient model, each leaf node in each tree counts the temperature reference weights and vibration reference weights corresponding to all training samples falling within the node, calculates the mean values of the temperature reference weights and vibration reference weights of all training samples within the leaf node respectively as the prediction result of the node, calculates the mean value of the prediction results of all leaf nodes of each tree, and obtains the prediction result of each tree. The prediction result of each tree includes the initial temperature weight and the initial vibration weight;
[0095] Calculate the mean value of the prediction results of all trees, perform normalization processing, and output the temperature weight and the vibration weight;
[0096] Verify the constructed weight coefficient model through the validation set.
[0097] Specifically, the initial benchmark weights are set by expert experience to ensure that the initial state of the model conforms to physical cognition; the decision tree splitting objective directly targets the minimization of weight variance, making the splitting process of each tree essentially a search for the feature combination that can most stably allocate weights; random sampling of samples + random selection of features avoid overfitting and improve the generalization ability of the model; the leaf node mean → single tree mean → forest mean gradually converges to the optimal weight, and the normalization process ensures that the sum of weights is 1, which conforms to the compensation amount allocation logic. The role of the historical cutting state in the random forest training is that when splitting the decision tree, the discrimination ability of the features (temperature / vibration) for the cutting state needs to be evaluated. For example, if a certain temperature-vibration combination frequently corresponds to an abnormal state, then the splitting will preferentially select this feature combination, thus indirectly affecting the weight allocation; the cutting state distribution of the samples within the leaf node determines the weight adjustment direction. If most of the samples at a certain node are in an abnormal state and the vibration values generally exceed the standard, then the vibration weight output by this node will be higher than the benchmark value; the cutting state serves as a supervision signal to ensure that the weight adjustment is consistent with the actual machining requirements. When calculating the optimal splitting point, both the information gain and the Gini coefficient rely on the cutting state label to evaluate the feature importance, ultimately affecting the weight allocation strategy.
[0098] 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 of the cutting feed direction is corrected by the dynamic correction factor to obtain the cutting feed direction compensation amount with a timestamp.
[0099] 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 allocation 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 benchmark for process traceability and subsequent analysis.
[0100] Furthermore, obtaining the cutting feed direction compensation amount with a timestamp includes:
[0101] Obtain the initial compensation amount ΔX of the cutting feed direction with a timestamp initial ;
[0102] Obtain the temperature compensation weight Wtemp and the vibration compensation weight W vib ;
[0103] Introduce the unit conversion coefficient β1 of the key temperature distribution gradient on the tool side, and the absolute peak value A of the key vibration of the lathe spindle of the unit conversion coefficient β2; vib ;
[0104] The dynamic correction factor Fcorr = Wtemp · (β1 ) + Wvib·(β2 Avib);
[0105] Calibrate the system response coefficient γ, and γ is used to match the control accuracy of the system;
[0106] The cutting feed direction compensation amount ΔXfinal = ΔXinitial + γ·Fcorr;
[0107] Bind the time stamp of the initial cutting feed direction compensation amount to the cutting feed direction compensation amount to obtain the cutting feed direction compensation amount with a time stamp.
[0108] 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 summation. β1 → thermal deformation compensation component, β2A vib → vibration suppression compensation component, β1 can be obtained according to the thermal expansion coefficient of the tool material α ( / °C) and the effective cutting length L (mm), and β1 ≈ α·L; β2 is obtained through the machine tool structure transfer function or experimental calibration. Calibrating the system response coefficient γ, which is the gain coefficient connecting the dynamic correction factor and the final compensation amount. Design a stepped excitation experiment. The system response coefficient γ is a physical characteristic parameter objectively measured from the actual system through the stepped excitation experiment, rather than arbitrarily set by humans. During the calibration process, first inject a known compensation command (such as ΔX_command = 0.01 mm) into the numerical control system, and at the same time measure the actual displacement change (ΔX_actual) of the tool through a displacement sensor. Then calculate the ratio γ = ΔX_actual / ΔX_command. 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 calibrating based on measured data makes γ a 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. Bind 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.
[0109] Obtain the target feed displacement sequence of the current metal workpiece and its timestamp, and calculate the compensation rate between the cutting feed direction compensation amount and the target feed displacement at the same timestamp.
[0110] Specifically, the timestamp of the cutting feed direction compensation amount comes from the timestamp of the initial compensation amount in the cutting feed direction. 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. 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, and 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 multi-modal key sequence set have been described in detail when calculating the relative deviation rate of the cutting key feed. Here, it will not be repeated. 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 multi-modal 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 between the cutting feed direction compensation amount and the target feed displacement at the same timestamp. The formula:
[0111] ,
[0112] Among them, if the target feed displacement value at time stamp t 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 time stamp. 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.
[0113] Compare the compensation rate with the relative deviation rate of the critical cutting feed.
[0114] If the comparison result is within the preset non-steady state region, an alarm is triggered.
[0115] If the comparison result is within the preset steady state region, start the soft preemption corresponding mechanism. At the soft preemption layer, dynamically correct the tool coordinate system through the cutting feed direction compensation amount to optimize the cutting accuracy.
[0116] Specifically, the compensation rate reflects the relationship between the cutting feed direction compensation amount and the target feed displacement, and the relative deviation rate of the critical cutting feed reflects the deviation degree between the actual critical feed and the ideal critical feed. Comparing the two can directly monitor the compliance between the actual machining and the expected machining during the cutting process, which is a quantitative monitoring method for machining accuracy. The steady state region refers to the range where the comparison result of the compensation rate and the relative deviation rate of the critical cutting feed is within a normal and reasonable range during the cutting process. In actual machining, it is very difficult to achieve a completely unchanged machining state. These fluctuations will not have an obvious negative impact on machining accuracy, quality and efficiency. At the soft preemption layer of the system, the tool coordinate system can be dynamically corrected according to the cutting feed direction compensation amount to eliminate the influence of errors on the cutting feed direction and optimize the cutting accuracy. The non-steady state region refers to the range where the comparison result of the compensation rate and the relative deviation rate of the critical cutting feed exceeds the normal range. This indicates that abnormal situations occur during the machining process, such as sudden increase in tool wear, excessive cutting force causing workpiece deformation, and failure of a certain component (such as the spindle motor) of the machining system. The fault needs to be processed in time.
[0117] Embodiment 2, based on the same inventive concept as the numerical control lathe cutting accuracy optimization method for metal part machining in the foregoing embodiment, as Figure 2 shown, the present application provides a numerical control lathe cutting accuracy optimization method system for metal part machining, and the system includes:
[0118] The multi-modal key feature set module 11 is used to construct a multi-modal key feature set with time stamp 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 critical cutting feed.
[0119] The initial compensation amount module 12 is configured to input the tool-side key temperature distribution gradient carrying a time stamp into a tool compensation look-up table, and look up the table to obtain the initial compensation amount in the cutting feed direction carrying the time stamp. The tool compensation look-up table is an offline look-up table generated by combining finite element analysis and look-up table technology;
[0120] The machining state matrix module 13 is configured to input the tool-side key temperature distribution gradient and the absolute peak value of the key vibration of the lathe spindle into the machining state matrix, and search for the corresponding historical cutting state. 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 tool-side key temperature distribution gradient, and the corresponding historical cutting state is marked in each cell;
[0121] The weight coefficient model module 14 is configured to input the tool-side key temperature distribution gradient, 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. The weight coefficient model allocates the reference weights of temperature and vibration by the expert method, dynamically corrects the reference weights using the importance of random forest features, and is constructed through data training;
[0122] The compensation amount module 15 is configured to perform weighted summation of the obtained temperature compensation weight and vibration compensation weight with the tool-side key temperature distribution gradient 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 compensation amount in the cutting feed direction with a time stamp;
[0123] 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;
[0124] The cutting optimization module 17 is configured to compare the compensation rate with the relative deviation rate of the key cutting feed;
[0125] If the comparison result is within a preset non-steady state region, an alarm is triggered;
[0126] If the comparison result is within a preset steady state region, the tool coordinate system is dynamically corrected through the cutting feed direction compensation amount to optimize the cutting accuracy.
[0127] Through the foregoing detailed description of the method for optimizing the cutting accuracy of a numerically controlled lathe for metal workpiece machining 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 workpiece machining 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.
[0128] The foregoing description of the disclosed embodiments enables those skilled in the art to practice or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing, characterized in that, The method includes: Constructing a multi-modal key feature set aligned with timestamps, where the multi-modal key feature set is a feature data set obtained by extracting the features of the cutting stable section monitoring data. 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 relative deviation rate of the cutting key feed; Inputting the key temperature distribution gradient on the tool side with timestamps into the tool compensation lookup table, and obtaining the initial compensation amount of the cutting feed direction with timestamps by looking up this table. The tool compensation lookup table is an offline lookup table generated by combining finite element analysis and lookup table technology; Inputting the key temperature distribution gradient on the tool side and the key vibration absolute peak value of the lathe spindle into the machining state matrix, and searching for the corresponding historical cutting state. The machining state matrix is constructed by a two-dimensional decision table, with the horizontal axis being the key vibration absolute peak value of the historical lathe spindle and the vertical axis being the key temperature distribution gradient on the historical tool side, and the corresponding historical cutting states are marked in each cell; Inputting the key temperature distribution gradient on the tool side, the key vibration absolute peak value of the lathe spindle, and the corresponding historical cutting state into the weight coefficient model, and obtaining the temperature compensation weight and vibration compensation weight of the current cutting state. The weight coefficient model assigns the reference weights of temperature and vibration by the expert method, dynamically corrects the reference weights using the importance of random forest features, and is constructed through data training; Respectively weighted-summing the obtained temperature compensation weight and vibration compensation weight 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 correcting the initial compensation amount of the cutting feed direction by the dynamic correction factor to obtain the cutting feed direction compensation amount with timestamps; Obtaining the target feed displacement sequence of the current metal workpiece and its timestamp, and calculating the compensation rate of the cutting feed direction compensation amount and the target feed displacement at the same timestamp; Comparing 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, triggering an alarm; If the comparison result is in the preset steady state area, dynamically correcting the tool coordinate system by the cutting feed direction compensation amount to optimize the cutting accuracy.
2. The numerical control lathe cutting precision optimization method for metal part processing according to claim 1, wherein Constructing a multi-modal key feature set aligned with timestamps, including: Deploying multi-modal sensors on the lathe, presetting their respective sliding windows according to the acquisition frequency of the multi-modal sensors, and acquiring the monitoring information of the lathe within each sliding window to obtain a multi-modal information sequence. The multi-modal 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 processing stage, extracting the cutting feed displacement sequence, the tool side temperature sequence, and the lathe spindle vibration sequence of the stable cutting section, and performing edge data preprocessing to obtain the cutting key feed displacement sequence, the tool side key temperature sequence, and the lathe spindle key vibration sequence with timestamps. The cutting processing stage includes a feed section, a stable cutting section, and a retraction section; Taking the cutting key feed displacement sequence as a reference, aligning the tool side key temperature sequence and the lathe spindle key vibration sequence with their timestamps to form a multi-modal key sequence set aligned with timestamps; Extract the features of each modal key sequence in the multimodal key sequence set aligned with the timestamp, 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 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 the rigid time domain feature window to obtain the absolute peak value of the lathe spindle key vibration, where the window width is dynamically adapted to the spindle speed; Construct a multimodal key feature set aligned with the timestamp using the extracted features of each modality.
3. The method for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing according to claim 2, wherein, Taking the cutting key feed displacement sequence as the reference, align the tool side key temperature sequence and the lathe spindle key vibration sequence with their timestamps to form a multimodal key sequence set aligned with the timestamp, including: Based on the length of the cutting key feed displacement sequence, preset the vibration window reference width and the temperature window reference width 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, downsample the three sequences layer by layer from the reference layer until the preset stop sampling threshold is reached to obtain the coarsened cutting key feed displacement sequence, the coarsened lathe spindle key vibration sequence, and the coarsened tool side key temperature sequence of the multi-level downsampling layer. Among them, according to the preset fixed downsampling rate, calculate the scaling factor of each downsampling layer: Let the scaling factor K0 of the reference layer be 1, The scaling factor K1 of the first-level downsampling layer is K0×R = R, The scaling factor K2 of the second - level downsampling layer is K2 = K1×R = R 2 , …… Scaling factor K of the lowest-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 the 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 at this layer. Using the vibration window width of this layer as the path index offset constraint, based on the dynamic programming recurrence of the Euclidean distance matrix, generate the cumulative distance matrix of this layer. Trace back from the end point of the cumulative distance matrix of this layer, and select the set of forward cumulative distance minimum direction path points within the vibration window width of this layer 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 coarsening 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 coarsening alignment path to obtain an initial alignment path one level higher than the bottom-level sampling layer, which provides a starting point for the higher-level refined alignment path. Locate the timestamps corresponding to each interpolation point on the time axes of the higher-level coarsening cutting key feed displacement sequence and the coarsening lathe spindle key vibration sequence respectively. Using the vibration window width of this 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 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 region. Using the vibration window width of this layer as the path index offset constraint, continue the dynamic programming recursion within the candidate path region to generate the cumulative distance matrix of this layer within the candidate path region. Trace back from the end point of the cumulative distance matrix of this layer and select the direction with the smallest previous cumulative distance within the vibration window width of this layer to obtain the refined alignment path of this layer; And so on, refine the alignment path layer by layer until the reference layer, and use 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 timestamp of the lathe spindle key vibration sequence to the timestamp of the cutting key feed displacement sequence through linear interpolation to generate the lathe spindle key vibration sequence aligned with the timestamp of the cutting key feed displacement sequence; Similarly, generate a key tool-side temperature sequence aligned with the time stamps of the key cutting feed displacement sequence; The cutting key feed displacement sequence, the key lathe spindle vibration sequence, and the key tool-side temperature sequence with aligned time stamps form a multi-modal key sequence set with aligned time stamps.
4. The numerical control lathe cutting precision optimization method for metal part machining according to claim 1, characterized in that, The machining state matrix includes: Obtain the historical data of the stable cutting section of the lathe, and extract the historical key tool-side temperature distribution gradient and the historical key lathe spindle vibration absolute peak value with aligned time stamps. Among them, the historical key tool-side temperature distribution gradient and the historical key lathe spindle vibration absolute peak value cover the characteristics during the normal historical operation and the abnormal historical operation of the lathe; Preset a fixed step size for the historical key tool-side temperature distribution gradient, and divide the historical key tool-side temperature distribution gradient into the vertical axis of the two-dimensional decision table according to the fixed step size; Preset a fixed step size for the historical key lathe spindle vibration absolute peak value, and divide the historical key lathe spindle vibration absolute peak value 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.
5. The numerical control lathe cutting precision optimization method for metal part processing according to claim 4, characterized in that The weight coefficient model includes: Construct a historical operating state data set. Each historical operating state subset includes a pair of historical key tool-side temperature distribution gradients and historical key lathe spindle vibration absolute peak values divided by a fixed step size, 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 corresponding temperature reference weights and vibration reference weights to a pair of historical key tool-side temperature distribution gradients and historical key lathe spindle vibration absolute peak values divided by a fixed step size in each historical operating state subset through the expert method; Randomly select historical operating state subsets from the training set as training samples to generate training subsets of 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 key tool-side temperature distribution gradient, the historical key lathe spindle 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 select 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 stop condition is reached to 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 weights and vibration reference weights corresponding to all training samples falling within the node, and calculate the mean values of the temperature reference weights and vibration reference weights 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 to obtain the prediction result of each tree. The prediction result of each tree includes the initial temperature weight and the initial vibration 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.
6. The method for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing according to claim 1, wherein Obtain the cutting feed direction compensation amount with time stamps, including: Obtain the initial compensation amount ΔX of the cutting feed direction initial and its timestamp; Obtain the temperature compensation weight W temp and the vibration compensation weight W vib ; Introduce the key temperature distribution gradient on the tool side The unit conversion coefficient β1, and the absolute peak value A of the key vibration of the lathe spindle vib The unit conversion coefficient β2; Dynamic correction factor F corr =W temp · (β1 )+W vib ·(β2A vib ); Calibrate the system response coefficient γ, where γ 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 cutting feed direction compensation amount to the cutting feed direction compensation amount to obtain the cutting feed direction compensation amount with a timestamp.
7. The method for optimizing the cutting accuracy of a numerically controlled lathe for metal part processing according to claim 4, wherein, Obtain the initial cutting feed direction compensation amount with a timestamp, and the method is as follows: Perform K-means clustering analysis on the historical tool-side key temperature distribution gradient and the historical lathe spindle key vibration absolute peak value with aligned timestamps, 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 tool-side key temperature distribution gradients through finite element simulation, and output the initial cutting feed direction compensation amount; Store the obtained historical temperature gradient - initial compensation amount as a two-dimensional lookup table to obtain the tool compensation lookup table; Traverse the tool compensation lookup table with the tool-side key temperature distribution gradient. If there is no corresponding historical temperature gradient in the lookup table, perform linear interpolation calculation on the tool-side key temperature distribution gradient, and then query the initial cutting feed direction compensation amount of the adjacent point in the lookup table; Bind the timestamp of the tool-side key temperature distribution gradient to the output initial cutting feed direction compensation amount, and output the initial cutting feed direction compensation amount with a timestamp.
8. A numerical control lathe cutting accuracy optimization system for metal part processing, characterized in that, The system includes: A multi-modal key feature set module, which is used to construct a multi-modal key feature set with aligned timestamps. The multi-modal key feature set is a feature data set obtained by extracting the features of the cutting stability section monitoring data. Among them, the multi-modal key feature set includes the tool-side key temperature distribution gradient, the lathe spindle key vibration absolute peak value, and the cutting key feed relative deviation rate; An initial compensation amount module, which is used to input the tool-side key temperature distribution gradient with a timestamp into the tool compensation lookup table, and look up the table to obtain the initial cutting feed direction compensation amount with a timestamp. Among them, the tool compensation lookup table is an offline lookup table generated by combining finite element analysis and lookup table technology; A processing state matrix module, which is used to input the tool-side key temperature distribution gradient and the lathe spindle key vibration absolute peak value into the processing state matrix, and search for the corresponding historical cutting state. Among them, 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 cell; A weight coefficient model module, which is used to input the tool-side key temperature distribution gradient, the lathe spindle key vibration absolute peak value, 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. 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 importance of random forest features, 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 key vibration absolute peak value 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.
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