An efficient cutting method for CNC machine tools based on real-time prediction of surface roughness
By collecting and processing multi-source data of CNC machine tools, building a surface roughness prediction model, and adjusting processing parameters in real time, it solves the problems of low surface roughness measurement efficiency and inconsistent parameter setting in CNC machine tools, and achieves efficient cutting and quality assurance.
Patent Information
- Application Number
- CN202510406189.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-04-02
AI Technical Summary
Existing CNC machine tools are inefficient and unstable in surface roughness measurement, and lack systematicity in cutting parameter setting, making it difficult to maximize processing efficiency while ensuring quality. The existing data processing and analysis have not fully explored the intrinsic connections between multi-source data, and cannot effectively capture the complex nonlinear relationships in the processing process.
By collecting external sensors and internal data of CNC machine tools, data marking, filtering, feature extraction and fusion are carried out, surface roughness prediction model is built, processing conditions are monitored in real time and parameters are adjusted, building an efficient cutting knowledge base, and processing parameters are optimized.
It realizes the reduction of quality uncertainty in the production process of CNC machine tool parts, improves production efficiency, reduces manpower inspection needs, provides the best cutting parameters, ensures the quality of parts while improving production efficiency.
Smart Images

Figure CN119916739B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of numerical control machine tool processing, and particularly relates to an efficient cutting method for numerical control machine tools based on real-time prediction of surface roughness. Background Art
[0002] In the current field of numerical control machine tools, although there are various technologies dedicated to improving processing quality and efficiency, there are still significant deficiencies. In terms of surface roughness measurement, manual operation is not only inefficient, but also due to individual differences and subjective factors of operators, the accuracy and stability of measurement results are difficult to guarantee. Each measurement requires interrupting the processing flow, which undoubtedly increases the production cycle and cost, and seriously hinders the continuity and efficiency of production. In terms of cutting parameter setting, most enterprises only select parameters based on past experience, lacking a systematic and scientific method for different material characteristics and diverse processing requirements. This empirical approach cannot fully utilize the performance advantages of numerical control machine tools and is difficult to maximize processing efficiency while ensuring processing quality.
[0003] Some existing data-driven technologies utilize the data collected by sensors to a certain extent, but there are still deficiencies in the depth and breadth of data processing and analysis. Some technologies only perform simple analysis on a single type of data, failing to fully explore the internal relationships between multi-source data, unable to effectively capture the complex non-linear relationships in the processing process, resulting in limited prediction accuracy and being difficult to comprehensively and accurately reflect the actual situation of the processing process. In addition, some surface roughness prediction models only consider the influence of internal processing parameters of numerical control machine tools on the results, without considering the interference such as vibration and cutting force generated by the spindle in the actual processing process, lacking anti-interference ability in practical applications. Summary of the Invention
[0004] The object of the present invention is to overcome the deficiencies of the above background art and propose an efficient cutting method for numerical control machine tools based on real-time prediction of surface roughness. This method can understand the surface roughness of the parts produced by numerical control machine tools in real time based on the internal information of the numerical control system and the feedback of external sensor data during the actual processing process, so as to be able to adjust the processing parameters to achieve the best cutting efficiency and improve the processing efficiency of numerical control machine tools while ensuring the qualification rate.
[0005] The technical solution provided by the present invention is as follows: An efficient cutting method for numerical control machine tools based on real-time prediction of surface roughness is carried out according to the following steps:
[0006] Step (1) Collect the data of external sensors of the numerical control machine tool and the internal data of the numerical control system, and store them in the database according to labels respectively.
[0007] Step (2): Read the externally-mounted sensor data and the internal data of the numerical control system collected in the database as a data set, and mark and classify the data set according to the surface roughness of the part.
[0008] Step (3): Remove outliers from the collected externally-mounted sensor data by setting a threshold range, and perform filtering processing for different data types respectively.
[0009] Step (4): Generate an image from the spindle three-axis active and cutting force data in the processed externally-mounted sensor data and extract the image feature sequence; perform feature extraction on the remaining data except the processing time to obtain a numerical feature vector. Concatenate and fuse the numerical feature vector and the image feature sequence.
[0010] Step (5): Build a surface roughness prediction model, use the features fused in Step (4) as the input of the model, the output of the model is the predicted surface roughness of the part, and train the surface roughness prediction model.
[0011] Step (6): During the machining process, input the externally-mounted sensor data and the internal data of the numerical control system collected in real time into the trained surface roughness prediction model after removing outliers, filtering, and feature fusion processing, so as to realize real-time prediction of surface roughness.
[0012] Step (7): Build an efficient cutting knowledge base: When adjusting the machining parameters to improve the machining speed, adjust the parameters according to the real-time prediction value feedback of the surface roughness prediction model according to the set rules: Set the surface roughness threshold range. If the prediction value exceeds the upper limit, give priority to reducing the feed rate. If the prediction value is lower than the lower limit, give priority to increasing the feed rate, but the cutting force needs to be monitored in real time. If the cutting force increases beyond the set threshold, stop increasing the feed rate to ensure machining stability. After the machining is completed, store the optimal machining parameters in the efficient cutting knowledge base.
[0013] Step (8): Before machining, retrieve and match in the efficient cutting knowledge base, extract the optimal cutting parameter combination for machining similar parts, and set it as the initial parameter of this machining to the machine tool control system. During machining, fine-tune the machining parameters by reducing the change range based on the rules in Step (7). After the machining is completed, sort and file all the data during the machining process, compare and analyze it with the existing data in the efficient cutting knowledge base, and use it as a reference for subsequent improvement to optimize the knowledge base.
[0014] Furthermore, the data in Step (1) is collected by a software developed through secondary development, the internal data of the numerical control system is collected through Ethernet communication, and the collected data specifically includes spindle speed, spindle feed rate, and machining time; the externally-mounted sensor data is collected through serial communication, and the collected data specifically includes the vibration values of the spindle X-axis, spindle Y-axis, spindle Z-axis, spindle cutting force value, spindle motor current and voltage values, and spindle motor power.
[0015] Further, in step (ii), the data collected in the database is exported as an excel file, the data is separated according to the processing time of each part, and the parts are divided into multiple categories according to the surface roughness grade requirements of the parts. The Ra value range of the surface roughness parts to be classified is set respectively, and the collected data is divided into data sets based on this. The data with different surface roughnesses is randomly divided into a training set at 80%, a test set at 10%, and a validation set at 10%.
[0016] Further, in step (iii), for the outliers in the data, statistical methods are used to calculate the mean and standard deviation of each type of data. The threshold range corresponding to each type of data is set, and the data points exceeding the range are determined as outliers. The data points determined as outliers are removed and filled using linear interpolation. For example, for the cutting force data, if the cutting force value at a certain moment deviates far from the normal fluctuation range, it is marked as an outlier and filled using linear interpolation.
[0017] Then, filtering processing is performed for different data types respectively. For the internal data of the numerical control system, a first-order low-pass filter is used for processing, and the cut-off frequency is set to 1 / 10 of the sampling frequency. For the external sensor data, Kalman filtering is performed.
[0018] Further, in step (iv), feature extraction is performed on the spindle motor current and voltage values, spindle motor power, spindle speed, and spindle feed rate processed in step (iii) as numerical feature vectors. The spindle three-axis vibration data (spindle X-axis vibration value, spindle Y-axis vibration value, spindle Z-axis vibration value) and spindle cutting force data (spindle cutting force value) in the external sensor data are respectively set as a rectangular window function through the short-time Fourier transform window function, with a size of 39 and a step size of 26 to extract time-frequency features. The above data is normalized, and then transformed into a Gram angular field diagram to extract local and global features. The features extracted from the short-time Fourier transform diagrams and Gram angular field diagrams of the two types of data are used as image feature sequences (the image feature sequence of the spindle three-axis vibration data and the image feature sequence of the spindle cutting force data are obtained respectively). The extracted numerical feature vectors and image feature sequences are concatenated along the feature dimension to fuse and form a complete input tensor.
[0019] Further, in step (v), the data fusion features obtained from the multi-source data through the first four steps are used as the input, and the prediction of the surface roughness of the part is used as the output to build a model. In the surface roughness prediction model, the input data fusion features first pass through the multi-head attention mechanism to splice the outputs of each head and perform a linear transformation again to simultaneously capture the information in different subspaces. After the multi-head attention mechanism, a two-layer fully connected feedforward neural network is connected, and residual connection and layer normalization are applied to accelerate the convergence of the model. After the feature extraction and transformation of the intermediate layer, the final output layer uses a single neuron to output the predicted surface roughness value with a linear activation function. Appropriate hyperparameters are set, and the Adam optimization algorithm and the mean square error (MSE) loss function are used to train the surface roughness prediction model.
[0020] Further, in step (vii), when adjusting the machining parameters to increase the machining speed, the parameters are adjusted according to the real-time predicted value feedback of the surface roughness prediction model according to the following rules: Set the surface roughness threshold range. If the predicted value exceeds the upper limit, it indicates that the machining quality may decrease. At this time, the feed rate is preferentially reduced, and the reduction amplitude each time is of the current feed rate, and at the same time, the spindle speed is appropriately reduced to reduce the cutting force and improve the machining surface quality. If the predicted value is lower than the lower limit, it means that there is room for improvement in machining efficiency. At this time, the feed rate is increased , and at the same time, the cutting force is monitored in real time. If the increase in the cutting force exceeds the set threshold , the increase in the feed rate is stopped, and the spindle speed is increased , ensure the machining stability. After adjusting the parameters, continuously obtain the output of the surface roughness prediction model to determine whether the predicted surface roughness value returns to a reasonable range. If not, continue to finely adjust the parameters until the quality requirements are met. When initially establishing the high-efficiency cutting knowledge base, consider the material properties, shape, size, and machining accuracy of the part, and set the threshold ranges of the spindle speed and feed rate. When setting parameters for different surface roughness requirements of various types of parts, use the orthogonal experimental design method to select representative parameter combinations within the above parameter ranges for experiments. For each parameter combination, collect relevant data during the machining process (such as cutting force, vibration, temperature, machining time, and actual surface roughness, etc.), evaluate the quality of the parameter combination based on the machining results, and screen out the optimal parameter combination that can achieve high-efficiency cutting and meet the surface roughness requirements under different conditions. With the continuous accumulation and update of machining data, further optimize and improve the parameter settings in the knowledge base. On the premise of meeting the surface roughness requirements, judge the efficiency according to the length of time required to complete the part machining, and compare it with the machining efficiency of the corresponding part in the knowledge base. If the surface roughness is the same and the efficiency is higher, overwrite the corresponding record in the knowledge base with its machining parameters. If the surface roughness is different, store the record of how to set the machining parameters for this part at different machining times in the high-efficiency cutting knowledge base.
[0021] Further, before machining in step (8): Input information such as the material, shape, size, and surface roughness requirements of the part to be machined into the system. The system retrieves and matches in the high-efficiency cutting knowledge base based on this information, extracts the optimal cutting parameters for machining similar parts, and sets them as the initial parameter settings for this machining to the machine tool control system. During machining: According to the rules in step (7), set the surface roughness threshold range. If the predicted value exceeds the upper limit, reduce the feed rate by the fine-tuning amplitude of the current feed rate, and simultaneously reduce the spindle speed cooperatively. . If the predicted value is lower than the lower limit, increase the feed rate at this time, and simultaneously monitor the cutting force in real time. If the increase in cutting force exceeds the set threshold , then stop increasing the feed rate and increase the spindle speed to ensure the machining stability. Fine-tune the machining parameters according to this rule and keep them consistent with those in the knowledge base as a whole. After machining: Detect the actual machining quality of the part, sort and file all the data during the machining process, and compare and analyze it with the existing data in the high-efficiency cutting knowledge base. If this machining is more efficient or has better quality on the premise of ensuring quality, store the current parameter combination and relevant data in the knowledge base to update the optimal parameter range and adjustment strategy; if there are problems or the expectations are not met, also record the data as a reference for subsequent improvement to optimize the knowledge base.
[0022] Preferably, the training parameters of the surface roughness prediction model in step (5) are set as follows: the number of learning times is 100, the learning rate is 0.002, and the size of the data for each learning is 64 groups.
[0023] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0024] By fusing multiple features to extract multi-dimensional features of data signals and input them into a deep learning network, and then the surface roughness prediction model obtained by training the deep learning neural network can facilitate the real-time monitoring of the machining status of parts; adjust the machining parameters based on the results of its real-time monitoring to obtain the best cutting method, and store the specific machining parameters of the part in the high-efficiency cutting knowledge base; effectively improve the disadvantages of uncertain quality during the production process of CNC machine tool parts and the need for manual surface roughness detection after production, and the knowledge base can provide the best cutting parameters for the production of various parts, which is of great benefit to improving production efficiency on the premise of ensuring a certain quality of the parts. Description of the Drawings
[0025] Figure 1 is a schematic flow chart of the method of the present invention.
[0026] Figure 2 is the data graph collected by the present invention.
[0027] Figure 3 is the time-frequency feature graph of the present invention.
[0028] Figure 4 is the Gram angular field graph of the present invention.
[0029] Figure 5 is the feature fusion network graph of the present invention.
[0030] Figure 6 is the flow chart of real-time prediction and parameter adjustment of the present invention.
[0031] Figure 7 is the training result graph of the prediction model of the present invention. Detailed Embodiments
[0032] The technical solution of the present invention will be further described in detail below with reference to the drawings and embodiments.
[0033] An efficient cutting method for numerically controlled machine tools based on real-time prediction of surface roughness provided by the present invention specifically realizes the acquisition and storage of external sensor and internal information of the numerical control system of the machine tool through data acquisition software developed for the type of numerically controlled machine tool; then realizes the prediction of the surface roughness of the part through data preprocessing, multi-source data feature extraction and fusion, and prediction model; during the part processing, the collected data is input into the model for real-time prediction and the processing parameters are adjusted, so as to improve the cutting efficiency on the premise of ensuring a certain quality of the part, and store the optimal parameters in the knowledge base.
[0034] The above data preprocessing includes the marking, classification and data set division of the data in step 2 according to the surface roughness, and the data filtering processing in step 3.
[0035] The invention specifically includes the following steps:
[0036] Step 1: Collect the data of the external sensors of the numerically controlled machine tool and the internal data of the numerical control system, and store them in the database separately according to the tags.
[0037] Step 2: Read the data of the external sensors and the internal data of the numerical control system collected in the database as a data set, and mark and classify the data set according to the surface roughness of the part.
[0038] Step 3: Remove the outliers from the collected data of the external sensors by setting a threshold range, and perform filtering processing for different data types respectively.
[0039] Step 4: Generate images from the main axis three-axis active and cutting force data in the processed external sensor data and extract image feature sequences; extract numerical feature vectors from the remaining data except the processing time. Concatenate and fuse the numerical feature vectors and the image feature sequences.
[0040] Step 5: Build a surface roughness prediction model, take the features fused in step 4 as the input of the model, the output of the model is the predicted surface roughness of the part, and train the surface roughness prediction model.
[0041] Step 6: During the processing, input the data of the external sensors and the internal data of the numerical control system collected in real time into the trained surface roughness prediction model after removing outliers, filtering and feature fusion processing, so as to realize the real-time prediction of the surface roughness.
[0042] Step 7: Build an efficient cutting knowledge base. When adjusting machining parameters to increase machining speed, adjust the parameters according to the real-time predicted values of the surface roughness prediction model according to the set rules: Set the surface roughness threshold range. If the predicted value exceeds the upper limit, the feed rate is preferentially reduced. If the predicted value is lower than the lower limit, the feed rate is preferentially increased. However, the cutting force needs to be monitored in real time. If the increase in cutting force exceeds the set threshold, stop increasing the feed rate to ensure machining stability. After the machining is completed, store the optimal machining parameters in the efficient cutting knowledge base.
[0043] Step 8: Retrieve and match in the efficient cutting knowledge base before machining, extract the optimal cutting parameter combination for machining similar parts, and set it as the initial parameter for this machining into the machine tool control system. During machining, fine-tune the machining parameters by reducing the change range based on the rules in Step 7. After the machining is completed, sort and file all the data during the machining process, compare and analyze it with the existing data in the efficient cutting knowledge base, and use it as a reference for subsequent improvement to optimize the knowledge base.
[0044] Embodiment:
[0045] The present invention is further illustrated and demonstrated by the following embodiments. The following embodiments use PyTorch to implement the training of the model.
[0046] Step 1: Collect the data of the external sensors of the numerically controlled machine tool and the internal data of the machine tool in the numerical control system, and store them in the database according to the labels respectively.
[0047] The data collected in the above Step 1 is collected through the secondary developed software, and the internal data of the numerical control system is collected through Ethernet communication. The collected data specifically includes the spindle speed, spindle feed rate, and machining time; the external sensor data is collected through serial communication, and the collected data specifically includes the vibration values of the spindle in the X-axis, Y-axis, and Z-axis, the spindle cutting force value, the current and voltage values of the spindle motor, and the spindle motor power.
[0048] Step 2: Read the external sensor data and the internal data of the numerical control system collected in the database, and mark and classify the data set according to the surface roughness of the parts.
[0049] Read the external sensor data and the internal data of the numerical control system collected in the database and export them as an excel file (such as Figure 2 ), classify and divide the data set according to the surface roughness of the parts, and randomly divide the data with different surface roughnesses into 80% as the training set, 10% as the test set, and 10% as the validation set.
[0050] Among them: Figure 4Among them, vib_x is the vibration value of the main shaft on the X-axis, vib_y is the vibration value of the main shaft on the Y-axis, vib_z is the vibration value of the main shaft on the Z-axis, val_nm is the cutting force value of the main shaft, val_I is the current value of the main shaft motor, val_V is the voltage value of the main shaft motor, val_P is the power value of the main shaft motor, ActSpeed is the actual speed of the main shaft, ActFeed is the feed rate of the main shaft, and Acttime is the processing time.
[0051] Step 3: Remove outliers from the collected sensor data by setting a threshold range, and perform filtering processing for different data types respectively.
[0052] For outliers in the data, use statistical methods to calculate the mean and standard deviation of each type of data, set the corresponding threshold range for each type of data, determine the data points that exceed the range as outliers, remove the determined outlier data points, and use linear interpolation to fill them. For example, for cutting force data, if the cutting force value at a certain moment deviates far from the normal fluctuation range, it is marked as an outlier and filled using linear interpolation.
[0053] Then, perform filtering processing for different data types respectively. For the internal data of the numerical control system, use a first-order low-pass filter for processing, and set the cut-off frequency to 1 / 10 of the sampling frequency. For external sensor data, perform Kalman filtering processing.
[0054] Step 4: Generate images from the processed main shaft three-axis vibration and cutting force data in the external sensor data and extract image feature sequences; extract numerical feature vectors from the remaining data (excluding processing time). Concatenate and fuse the numerical feature vectors and the image feature sequences.
[0055] Perform Fourier transform on the collected main shaft data and cutting force data of the numerical control machine tool to obtain a time-frequency feature map (as shown in Figure 3 ), extract local and global features by converting it into a Gramian angular field map to obtain a Gramian angular field map (as shown in Figure 4 ), extract numerical feature vectors from the remaining data. Finally, concatenate and fuse the numerical feature vectors and the image feature sequences (as shown in Figure 5 ).
[0056] The above feature extraction is shown in the following formula, where: is the window function; is the original signal; is the time; is the frequency.
[0057] Fourier transform:
[0058] The above Gramian angular field conversion steps are as follows: Normalize the original one-dimensional time series data x to (-1, 1), convert the normalized values to polar coordinates, take the time stamp as the radius, and apply the arccos function to the normalized values to obtain the angles, that is .
[0059] Elements of the Gramian angular sum and field (GASF) matrix The formula is:
[0060] Step 5: Build a surface roughness prediction model, use the features after fusion in Step 4 as the input of the model, the output of the model is the predicted surface roughness of the part, and train the surface roughness prediction model.
[0061] Use the data fusion features obtained from the multi-source data through the first four steps as the input, and build a model with the predicted surface roughness of the part as the output. In the surface roughness prediction model, the input data fusion features first pass through the multi-head attention mechanism to splice the outputs of each head and perform a linear transformation again to simultaneously capture information in different subspaces. After the multi-head attention mechanism, connect a two-layer fully connected feed-forward neural network, and apply residual connection and layer normalization to accelerate the convergence of the model. After feature extraction and transformation in the intermediate layer, the final output layer uses a single neuron to output the predicted surface roughness value with a linear activation function. Set appropriate hyperparameters, and use the Adam optimization algorithm and the mean squared error (MSE) loss function to train the surface roughness prediction model.
[0062] Patch Embedding: ;
[0063] Position Embedding: ;
[0064] Multi-head attention mechanism: ;
[0065] ;
[0066] ;
[0067] Feed-forward neural network: ;
[0068] Residual connection: ;
[0069] ;
[0070] Layer normalization: ;
[0071] where μ is the mean of the μ input in the feature dimension, σ is the variance, and ε is a very small constant used to prevent the denominator from being zero.
[0072] The above surface roughness prediction model is built as follows: First, initialize the model with hyperparameters set as Patch Size = 16*16, Embedding Dimension as 384, Depth as 12, Number of Heads as 8, MLP Ratio as 4, Learning Rate as 0.002, Batch Size as 64, Weight Decay as 1e-5, Dropout Rate as 0.2, and use the Adam optimizer. Input the data after feature fusion into the model, then calculate the loss function, and update the parameters through backpropagation and optimization algorithms to reduce the loss. During the training process, regularly evaluate the model with the validation set, and adjust the hyperparameters and model structure. Repeat the training process until the conditions are met, and finally conduct the final evaluation on the test set to determine the model performance. The results obtained from training are as Figure 7 shown, where the Training loss is 0.229, the Training accuracy is 92%, the Validation accuracy is 88%, and the RMSE Ioss is 0.478.
[0073] Step 6: Collect data during the machining process, preprocess it, and input it into the surface roughness prediction model to predict the surface roughness of the part in real time.
[0074] During the machining process, first collect data including the vibration values of the spindle in the X, Y, and Z axes, the spindle cutting force value, the current and voltage values of the spindle motor, the spindle motor power, the spindle speed, and the spindle feed rate data. Then preprocess the collected data, specifically including removing outliers, filling in missing values, extracting time-frequency features from the spindle three-axis vibration data and the spindle cutting force data respectively through short-time Fourier transform, normalizing the above data, and then transforming it into a Gram angular field diagram to extract local and global features. Concatenate the extracted numerical feature vectors and image feature sequences along the feature dimension and fuse them to form a complete input tensor. Input the features after fusing multi-source data (i.e., the input tensor) into the surface roughness prediction model. Through the calculation and analysis of the model, predict the surface roughness of the part in real time, providing a basis for parameter adjustment and quality control during the machining process.
[0075] Step 7: During the machining process as Figure 6Process. According to the feedback given by the real-time surface roughness prediction model, when it is necessary to adjust the machining parameters to improve the machining efficiency, the parameters are adjusted according to the real-time predicted value feedback of the surface roughness prediction model according to the following rules: Set the surface roughness threshold range. If the predicted value exceeds the upper limit, it indicates that the machining quality may decline. At this time, the feed rate is preferentially reduced by 5% of the current feed rate, and the spindle speed is reduced by 3% at the same time to reduce the cutting force and improve the machining surface quality. If the predicted value is lower than the lower limit, it means that there is room for improvement in machining efficiency. The feed rate can be increased by 3%, but the cutting force needs to be monitored in real time. If the cutting force increases by more than 10%, stop increasing the feed rate and increase the spindle speed by 2% to ensure machining stability. After adjusting the parameters, continuously obtain the output of the prediction model, wait for 3 seconds, and judge whether the surface roughness predicted value returns to the reasonable range. If not, continue to fine-tune the parameters until the quality requirements are met. Ensure that the part quality is always within the qualified range through the results continuously fed back by the model. After the entire machining task is completed, screen out the machining parameters that achieve the best balance between machining efficiency and part quality during this machining, update and store these optimal machining parameters in the knowledge base for subsequent machining tasks to refer to and further improve the machining quality and efficiency.
[0076] When initially establishing an efficient cutting knowledge base, considering the material properties of the part, for materials with lower hardness such as aluminum alloy, parameter settings are made within a relatively high rotational speed range (such as 1000 - 3000 RPM); while for materials with higher hardness such as stainless steel or titanium alloy, the rotational speed range is lower (such as 500 - 1500 RPM). According to the shape and size of the part, for shaft parts with a relatively small diameter, a relatively high rotational speed can be selected and set at 1500 - 2500 RPM; for disk or box parts with a larger size, due to the larger moment of inertia, the rotational speed should be correspondingly reduced and can be set at 800 - 1200 RPM.
[0077] From the perspective of machining accuracy, for parts with high surface roughness requirements (such as Ra ≤ 0.8μm), the feed rate should be set relatively small (such as 0.05 - 0.1mm / rev); for parts with relatively low surface roughness requirements (such as Ra ≤ 3.2μm), the feed rate can be appropriately increased (such as 0.15 - 0.3mm / rev).
[0078] Table 1
[0079]
[0080] When setting parameters for different surface roughness requirements of various types of parts, the orthogonal experimental design method is adopted, and representative parameter combinations are selected within the above parameter range for experiments. For each parameter combination, relevant data (such as cutting force, vibration, temperature, machining time, and actual surface roughness, etc.) are collected during the machining process. According to the machining results, the advantages and disadvantages of the parameter combinations are evaluated, and the optimal parameter combinations that can achieve efficient cutting and meet the surface roughness requirements under different conditions are screened out. With the continuous accumulation and update of machining data, the parameter settings in the knowledge base are further optimized and improved.
[0081] Step 8: Input information such as the material, shape, size, and surface roughness requirements of the part to be machined into the system before machining. The system retrieves and matches in the high-efficiency cutting knowledge base based on this information, extracts the optimal cutting parameters for machining similar parts, and sets them as the initial parameter settings for this machining into the machine tool control system. During machining, set the surface roughness threshold range according to the rules in step (seven). If the predicted value exceeds the upper limit, reduce the feed rate according to the current feed rate, and at the same time reduce the spindle speed. Reduce the feed rate and at the same time reduce the spindle speed If the predicted value is lower than the lower limit, increase the feed rate at this time At the same time, monitor the cutting force in real time. If the increase in cutting force exceeds the set threshold Then stop increasing the feed rate and increase the spindle speed To ensure stable machining. Fine-tune the machining parameters according to this rule, and keep them consistent with those in the knowledge base as a whole. After machining, detect the actual machining quality of the part, sort and file all the data during the machining process, and compare and analyze them with the existing data in the high-efficiency cutting knowledge base. If the efficiency of this machining is higher or the quality is better under the premise of ensuring quality, then store the parameter combination and related data of this time into the knowledge base to update the optimal parameter range and adjustment strategy; if there are problems or the expected results are not achieved, also record the data as a reference for subsequent improvement to optimize the knowledge base.
[0082] On the other hand, the present invention provides a high-efficiency cutting system for numerically controlled machine tools based on real-time prediction of surface roughness, including a database, a data acquisition module, a data marking and classification module, a data preprocessing module, a data fusion module, a surface roughness prediction module, a high-efficiency cutting knowledge base, and a cutting machining module.
[0083] The data acquisition module acquires the data of the external sensors of the numerically controlled machine tool and the internal data of the numerical control system, and stores them in the database separately according to the tags.
[0084] The data marking and classification module reads the external sensor data and the internal data of the numerical control system acquired in the database as a data set, and marks and classifies the data set according to the surface roughness of the part.
[0085] The data preprocessing module removes outliers from the collected external sensor data by setting a threshold range, and performs filtering processing for different data types respectively.
[0086] The data fusion module generates an image from the main shaft three-axis active and cutting force data in the external sensor data processed by the data preprocessing module and extracts an image feature sequence; performs feature extraction on the remaining data except the processing time to obtain a numerical feature vector. Splice and fuse the numerical feature vector and the image feature sequence.
[0087] The surface roughness prediction module builds a surface roughness prediction model, uses the features fused by the data fusion module as the input of the model, the output of the model is the predicted surface roughness of the part, and trains the surface roughness prediction model through a data set.
[0088] During the machining process, the real-time collected external sensor data and the internal data of the numerical control system are input into the trained surface roughness prediction model after removing outliers, filtering, and feature fusion processing, so as to realize real-time prediction of surface roughness.
[0089] The method for building the high-efficiency cutting knowledge base is as follows: when adjusting the machining parameters to improve the machining speed, according to the real-time prediction value feedback of the surface roughness prediction model, adjust the machining parameters according to the set rules: set the surface roughness threshold range, if the prediction value exceeds the upper limit, give priority to reducing the feed rate, if the prediction value is lower than the lower limit, give priority to increasing the feed rate, but it is necessary to monitor the cutting force in real time, if the cutting force increases beyond the set threshold, stop increasing the feed rate to ensure machining stability. After the machining is completed, store the optimal machining parameters in the high-efficiency cutting knowledge base.
[0090] The cutting machining module retrieves and matches in the high-efficiency cutting knowledge base before machining, extracts the optimal cutting parameter combination for machining similar parts, and sets it as the initial parameter for this machining to the machine tool control system. During machining, fine-tune the machining parameters by reducing the change range based on the machining parameter adjustment rules built in the high-efficiency cutting knowledge base. After the machining is completed, sort and file all the data in the machining process, compare and analyze it with the existing data in the high-efficiency cutting knowledge base, and use it as a reference for subsequent improvement to optimize the knowledge base.
[0091] The present invention collects external sensor data and numerical control system machining data during the machining process of a numerically controlled machine tool; then inputs them into a surface roughness prediction model based on deep learning after preprocessing such as removing outliers, filtering, feature extraction, and feature fusion to predict the surface roughness of the part in real time, adjusts the machining parameters accordingly to improve efficiency, and at the same time relies on model feedback to ensure the quality of the part. After the machining is completed, update and store the optimal parameters in the knowledge base.
[0092] The above content is a further detailed description of the present invention in combination with specific / preferred embodiments, and it cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, they can also make several substitutions or modifications to these described embodiments, and these substitution or modification methods should all be regarded as belonging to the protection scope of the present invention.
[0093] The parts not detailed in the present invention belong to the well-known technologies in the art.
Claims
1. An efficient cutting method for CNC machine tools based on real-time prediction of surface roughness, characterized in that, The steps are as follows: Step (1): Collect the data of the external sensors of the CNC machine tool and the internal data of the CNC system, and store them in the database separately according to the tags; The data is collected through the software developed by secondary development. The internal data of the CNC system is collected through Ethernet communication. The collected data specifically includes the spindle speed, spindle feed rate, and machining time. The data of the external sensors is collected through serial communication. The collected data specifically includes the vibration values of the spindle in the X, Y, and Z axes, the spindle cutting force value, the current and voltage values of the spindle motor, and the spindle motor power; Step (2): Read the data of the external sensors and the internal data of the CNC system collected in the database as a data set, and mark and classify the data set according to the surface roughness of the part; Step (3): Remove the outliers from the collected data of the external sensors by setting a threshold range, and perform filtering processing for different data types respectively; Step (4): Generate images and extract image feature sequences from the spindle three-axis vibration data and cutting force data in the processed external sensor data. Extract numerical feature vectors from the remaining data except the machining time. Concatenate and fuse the numerical feature vectors and the image feature sequences; Step (5): Build a surface roughness prediction model, use the fused features as the input of the model, the output of the model is the predicted surface roughness of the part, and train the surface roughness prediction model; Step (6): During the machining process, input the data of the external sensors and the internal data of the CNC system collected in real time after removing outliers, filtering, and feature fusion into the trained surface roughness prediction model, so as to realize the real-time prediction of the surface roughness; Step (7): Build an efficient cutting knowledge base; According to the real-time prediction value feedback of the surface roughness prediction model, adjust the feed rate and spindle speed, and monitor the cutting force in real time. Use the orthogonal experimental design method to screen the optimal parameter combination and build an efficient cutting knowledge base; Step (8): Retrieve and match the optimal cutting parameter combination in the efficient cutting knowledge base before machining. Fine-tune the machining parameters during machining. Optimize the knowledge base after machining; In step (4), feature extraction is performed on the spindle motor current and voltage value, spindle motor power, spindle speed, and spindle feed rate processed in step (3) as numerical feature vectors. The spindle three-axis vibration data and spindle cutting force data in the external sensor data are respectively set as a rectangular window function with a size of 39 and a step size of 26 through the short-time Fourier transform window function to extract time-frequency features, and the above data is normalized, and then transformed into a Gram angular field diagram to extract local and global features. The features extracted from the short-time Fourier transform diagrams and Gram angular field diagrams of the two types of data are used as image feature sequences. Concatenate the extracted numerical feature vectors and image feature sequences along the feature dimension to fuse and form a complete input tensor; In step (v), the data fusion features obtained from the multi-source data through the first four steps are used as the input, and a model is built with the prediction of the surface roughness of the part as the output. In the surface roughness prediction model, the input data fusion features first pass through the multi-head attention mechanism to splice the outputs of each head and perform a linear transformation again to simultaneously capture the information in different subspaces. After the multi-head attention mechanism, a two-layer fully connected feed-forward neural network is connected, and residual connection and layer normalization are applied to accelerate the convergence of the model. After the feature extraction and transformation of the intermediate layer, the final output layer uses a single neuron to output the predicted surface roughness value with a linear activation function. Appropriate hyperparameters are set, and the Adam optimization algorithm and the mean square error loss function are used to train the surface roughness prediction model.
2. The high-efficiency cutting method of a numerically controlled machine tool based on real-time prediction of surface roughness according to claim 1, wherein In step (ii), the data collected in the database is exported as an excel file, and the data is separated according to the processing time of each part. The parts are divided into multiple categories according to the surface roughness grade requirements of the parts, and the Ra value ranges of the parts with the surface roughness to be classified are set respectively. Based on this, the collected data is divided into datasets. The data with different surface roughnesses is randomly divided into a training set at 80%, a test set at 10%, and a validation set at 10%.
3. The high-efficiency cutting method for a numerically controlled machine tool based on real-time prediction of surface roughness according to claim 2, characterized in that, In step (iii), for the outliers in the data, statistical methods are used to calculate the mean and standard deviation of each type of data. The threshold range corresponding to each type of data is set, and the data points that exceed the range are determined as outliers. The determined outlier data points are removed and filled using linear interpolation. Then, filtering processing is performed for different data types respectively. For the internal data of the numerical control system, a first-order low-pass filter is used for processing, and the cut-off frequency is set to 1 / 10 of the sampling frequency. For the external sensor data, Kalman filtering is performed.
4. The high-efficiency cutting method of a numerically controlled machine tool based on real-time prediction of surface roughness according to claim 3, characterized in that, When adjusting the processing parameters to increase the processing speed in step (7), the parameters are adjusted according to the real-time prediction value feedback of the surface roughness prediction model according to the following rules: set the surface roughness threshold range. If the predicted value exceeds the upper limit, at this time, reduce the feed rate, and the reduction amplitude each time is of the current feed rate, and at the same time reduce the spindle speed ; If the predicted value is lower than the lower limit, increase the feed rate at this time , and at the same time, monitor the cutting force in real time. If the increase in the cutting force exceeds the set threshold , stop increasing the feed rate and increase the spindle speed , to ensure machining stability; after adjusting the parameters, continuously obtain the output of the surface roughness prediction model, and judge whether the predicted value of the surface roughness returns to the reasonable range. If not, continue to fine-tune the parameters until the quality requirements are met; when initially establishing an efficient cutting knowledge base, consider the part material characteristics, shape and size, and machining accuracy, and set the threshold range of the spindle speed and feed rate; when setting parameters for different surface roughness requirements of various types of parts, use the orthogonal experimental design method, and select representative parameter combinations within the above parameter range for experiments; for each parameter combination, collect relevant data during the machining process, evaluate the advantages and disadvantages of the parameter combination according to the machining results, and screen out the optimal parameter combination that can achieve efficient cutting and meet the surface roughness requirements under different conditions; the relevant data includes cutting force, vibration, temperature, machining time, and actual surface roughness; with the continuous accumulation and update of machining data, further optimize and improve the parameter settings in the knowledge base; on the premise of meeting the surface roughness requirements, judge its efficiency according to the length of time required to complete the part machining, and compare it with the machining efficiency of the corresponding part in the knowledge base. If the surface roughness is the same and the efficiency is higher, overwrite the record of the machining parameters in the knowledge base with the machining parameters of this part; if the surface roughness is different, store the record of how to set the machining parameters for this part at different machining times in the efficient cutting knowledge base.
5. The high-efficiency cutting method of a numerically controlled machine tool based on real-time prediction of surface roughness according to claim 4, characterized in that Before processing in step (VIII): According to the material, shape, size, and surface roughness requirements of the part to be processed, retrieve and match in the high-efficiency cutting knowledge base, extract the optimal cutting parameters for the processing of similar parts, and set them as the initial parameters for this processing in the machine tool control system; During processing: Set the surface roughness threshold range. If the predicted value exceeds the upper limit, reduce the feed rate by the fine amplitude of the current feed rate, and simultaneously reduce the spindle speed ; If the predicted value is lower than the lower limit, the feed rate is increased at this time , and the cutting force is monitored in real time. If the increase in the cutting force exceeds the set threshold , the increase in the feed rate is stopped, and the spindle speed is increased , ensuring stable machining; the machining parameters are finely adjusted according to this rule, and the overall is kept consistent with the knowledge base; after machining: the actual machining quality of the part is detected, all data during the machining process is sorted and archived, and compared and analyzed with the existing data in the high-efficiency cutting knowledge base; if the efficiency is higher or the quality is better under the premise of ensuring the quality in this machining, the parameter combination and related data of this time are stored in the knowledge base to update the optimal parameter range and adjustment strategy; if problems occur or the expectations are not met, the data is also recorded as a reference for subsequent improvement to optimize the knowledge base.
6. The high-efficiency cutting method of a numerically controlled machine tool based on real-time prediction of surface roughness according to claim 1, characterized in that The training parameters of the surface roughness prediction model in step (v) are set as follows: the number of learning times is 100, the learning rate is 0.002, and the data size for each learning is 64 groups.
Citation Information
Patent Citations
Numerical control machining surface roughness prediction method
CN116186499A
Multi-dimensional depth feature extraction and identification method of DAS signal
CN116818080A