Numerical control machine tool efficient cutting method based on real-time surface roughness prediction
By building a deep learning model for real-time surface roughness prediction and machining parameters adjustment, the problems of inefficiency and insufficient accuracy of CNC machine tools in surface roughness measurement and cutting parameter setting are solved, and an efficient and stable machining process is achieved.
Patent Information
- Application Number
- CN202510406189.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-02
AI Technical Summary
Existing CNC machine tools have problems of inefficiency and insufficient accuracy in surface roughness measurement and cutting parameter setting, resulting in unstable processing quality and low production efficiency.
By collecting external sensor data of CNC machine tools and internal data of CNC system, data preprocessing and feature extraction are carried out, a surface roughness prediction model based on deep learning is built, surface roughness prediction is predicted in real time, and processing parameters are adjusted according to the prediction results to improve cutting efficiency.
Real-time prediction of surface roughness of CNC machine tool parts and intelligent adjustment of machining parameters is realized, processing efficiency and quality stability is improved, and manual intervention and measurement errors are reduced.
Smart Images

Figure CN119916739A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of CNC machine tool processing, and in particular relates to a CNC machine tool efficient cutting method based on real-time prediction of surface roughness. Background Art
[0002] In the current field of CNC machine tools, although there are many technologies dedicated to improving processing quality and efficiency, there are still significant shortcomings. 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 the measurement results are difficult to guarantee. Each measurement requires interrupting the processing process, which undoubtedly increases the production cycle and cost, and seriously hinders the continuity and efficiency of production. In terms of cutting parameter setting, most companies only select parameters based on past experience, lacking systematic and scientific methods for different material properties and diversified processing needs. This empirical approach cannot give full play to the performance advantages of CNC machine tools, and it is difficult to maximize processing efficiency while ensuring processing quality.
[0003] Some existing data-driven technologies have utilized the data collected by sensors to a certain extent, but they are still lacking in the depth and breadth of data processing and analysis. Some technologies only perform simple analysis on a single type of data, fail to fully explore the inherent connections between multi-source data, and cannot effectively capture the complex nonlinear relationships in the processing process, resulting in limited prediction accuracy and difficulty in fully and accurately reflecting the actual situation of the processing process. In addition, some surface roughness prediction models are only based on the influence of internal processing parameters of CNC machine tools on the results, and do not consider the vibration, cutting force and other interferences generated by the spindle during the actual processing process, lacking certain anti-interference capabilities in practical applications. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the above-mentioned background technology and propose an efficient cutting method for CNC machine tools based on real-time prediction of surface roughness. This method understands the surface roughness of CNC machine tool parts in real time based on the feedback of internal information of the CNC system and external sensor data during the actual processing process, so as to achieve the best cutting efficiency by adjusting the processing parameters, thereby improving the processing efficiency of the CNC machine tools while ensuring the qualified rate.
[0005] The improved technical solution of the present invention is: a CNC machine tool efficient cutting method based on real-time prediction of surface roughness, which is carried out in the following steps:
[0006] Step (i) collects the external sensor data of the CNC machine tool and the internal data of the CNC system, and stores them in the database according to the labels.
[0007] Step (ii) reads the external sensor data and the internal data of the CNC system collected in the database as a data set, and marks and classifies the data set according to the surface roughness of the parts.
[0008] Step (iii) removes abnormal values from the collected external sensor data by setting a threshold range, and performs filtering processing on different data types.
[0009] Step (iv) transforms the three-axis active and cutting force data of the processed external sensor data to generate an image and extracts the image feature sequence; extracts features from the remaining data except the processing time to obtain a numerical feature vector. The numerical feature vector is spliced and fused with the image feature sequence.
[0010] Step (five) builds a surface roughness prediction model, uses the features fused in step (four) as the input of the model, and the output of the model is the predicted surface roughness of the part, and trains the surface roughness prediction model.
[0011] Step (six) During the machining process, the real-time collected external sensor data and the internal data of the CNC system are input into the trained surface roughness prediction model after removing outliers, filtering and feature fusion processing, thereby realizing real-time prediction of surface roughness.
[0012] Step (VII) Constructing an efficient cutting knowledge base: When adjusting the processing parameters to increase the processing speed, adjust the parameters according to the set rules based on the real-time prediction value feedback of the surface roughness prediction model: set the surface roughness threshold range. If the prediction value exceeds the upper limit, the feed rate is reduced first. If the prediction value is lower than the lower limit, the feed rate is increased first. However, the cutting force needs to be monitored in real time. If the cutting force increases beyond the set threshold, the feed rate is stopped to ensure processing stability. After the processing is completed, the optimal processing parameters are stored in the efficient cutting knowledge base.
[0013] Step (eight) Before processing, search and match in the efficient cutting knowledge base, extract the optimal cutting parameter combination for similar parts processing, and set it to the machine tool control system as the initial parameter of this processing. During processing, reduce the variation range based on the rules of step (seven) to fine-tune the processing parameters. After processing is completed, organize and archive all the data in the processing process, compare and analyze with the existing data in the efficient cutting knowledge base, and use it as a reference for subsequent improvements to optimize the knowledge base.
[0014] Furthermore, the data in the step (i) is collected through secondary development software, and the internal data of the CNC system is collected through Ethernet communication, and the collected data specifically includes the spindle speed, spindle feed rate and processing time; the external sensor data is collected through serial port communication, and the collected data specifically includes the spindle X-axis vibration value, the spindle Y-axis vibration value, the spindle Z-axis vibration value, the spindle cutting force value, the spindle motor current and voltage value, and the spindle motor power.
[0015] Furthermore, in step (ii), the data collected in the database are exported as an Excel file, the data are separated according to the processing time of each part, and the parts are divided into multiple categories according to the surface roughness level requirements of the parts, and the Ra value range of the surface roughness parts to be classified is set respectively, and the collected data are divided into data sets based on this. And the data of different surface roughness are randomly divided into 80% as a training set, 10% as a test set, and 10% as a validation set.
[0016] Furthermore, in step (iii), statistical methods are used for the outliers in the data to calculate the mean and standard deviation of each type of data. A threshold range corresponding to each type of data is set, and the data points that exceed the threshold are determined as outliers. The data points determined as outliers are removed and filled with linear interpolation. 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 with linear interpolation.
[0017] Then, filtering is performed on different data types. A first-order low-pass filter is used to process the internal data of the CNC system, and the cutoff frequency is set to 1 / 10 of the adopted frequency. Kalman filtering is performed on the external sensor data.
[0018] Furthermore, in the step (iv), the spindle motor current and voltage values, spindle motor power, spindle speed and spindle feed rate processed in step (iii) are feature extracted 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 extracted through the short-time Fourier transform window function set to a rectangular window function, with a size of 39 and a step length of 26 to extract time-frequency features, and the above data are normalized and then converted into a Gram angular field map to extract local and global features, and the features extracted from the short-time Fourier transform map and the Gram angular field map of the obtained 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 spliced along the feature dimension and fused to form a complete input tensor.
[0019] Furthermore, in the step (five), the data fusion features obtained from the multi-source data through the first four steps are used as input, and the surface roughness of the predicted parts is used as the output to build a model. In the surface roughness prediction model, the input data fusion features are first spliced through the multi-head attention mechanism to connect the outputs of each head and then linearly transformed again to achieve the simultaneous capture of information in different subspaces. After the multi-head attention mechanism, a two-layer fully connected feedforward neural network is connected, and residual connections and layer normalization are applied to accelerate model convergence. 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. Appropriate hyperparameters are set, and the surface roughness prediction model is trained using the Adam optimization algorithm and the mean square error (MSE) loss function.
[0020] Furthermore, in step (VII), when adjusting the processing parameters to increase the processing speed, the parameters are adjusted according to the following rules based on the real-time prediction value feedback of the surface roughness prediction model: a surface roughness threshold range is set. If the prediction value exceeds the upper limit, it means that the processing quality may be reduced. At this time, the feed rate is reduced first, and the reduction amplitude each time is the current feed rate. , while appropriately reducing the spindle speed , in order to reduce cutting force and improve the surface quality of the machined surface. If the predicted value is lower than the lower limit, it means that there is room for improvement in machining efficiency. In this case, increase the feed rate , while monitoring the cutting force in real time. If the cutting force increases beyond the set threshold , then 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 to determine whether the surface roughness prediction value returns to a 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 material properties, shape and size of the parts, and the machining accuracy, and set the threshold range of the spindle speed and feed rate. When setting parameters for various types of parts with different surface roughness requirements, the orthogonal experimental design method is used to select representative parameter combinations 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, and the advantages and disadvantages of the parameter combination are evaluated based on the machining results, and the optimal parameter combination that can achieve efficient cutting and meet the surface roughness requirements under different conditions is selected. With the continuous accumulation and updating of machining data, the parameter settings in the knowledge base are further optimized and improved. On the premise of meeting the surface roughness requirements, the efficiency is judged according to the time it takes to complete the part processing, and compared with the processing efficiency of the corresponding parts in the knowledge base. If the surface roughness is the same and the efficiency is higher, its processing parameters will overwrite the previous record in the knowledge base. If the surface roughness is different, the records of how to set the processing parameters of the part at different processing times will be stored in the efficient cutting knowledge base.
[0021] Furthermore, before processing in step (eight): the material, shape, size and surface roughness requirements of the part to be processed are input into the system. The system searches and matches in the efficient cutting knowledge base based on this information, extracts the optimal cutting parameters for similar parts processing, and sets them to the machine tool control system as the initial parameters for this processing. During processing: according to the rules in step (seven), the surface roughness threshold range is set. If the predicted value exceeds the upper limit, the current feed rate is adjusted. Reduce feed rate by fine increments and reduce spindle speed in tandem If the predicted value is lower than the lower limit, increase the feed rate. , while monitoring the cutting force in real time. If the cutting force increases beyond the set threshold , then stop increasing the feed rate and increase the spindle speed , ensuring stable processing. Use this rule to fine-tune the processing parameters, and keep them consistent with the knowledge base as a whole. After processing: detect the actual processing quality of the parts, organize and archive all data during the processing, and compare and analyze with the existing data in the efficient cutting knowledge base. If this processing is more efficient or of better quality while ensuring quality, the parameter combination and related data will be stored in the knowledge base to update the optimal parameter range and adjustment strategy; if there is a problem or it does not meet expectations, the data will also be recorded as a reference for subsequent improvements to optimize the knowledge base.
[0022] Preferably, the surface roughness prediction model training parameters in step (V) are set as follows: the number of learning times is 100, the learning rate is 0.002, and the data size of each learning is 64 groups.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] Through multi-feature fusion, the multi-dimensional features of the data signal are extracted and input into the deep learning network. Secondly, the surface roughness prediction model obtained through deep learning neural network training can facilitate real-time monitoring of the processing status of parts; based on the results of real-time monitoring, the processing parameters are adjusted to obtain the best cutting method, and the specific processing parameters of the part are stored in the efficient cutting knowledge base; it can effectively improve the shortcomings of quality uncertainty in the production process of CNC machine tool parts and the need for manpower to carry out surface roughness detection after production is completed. The knowledge base can provide the best cutting parameters for the production of various parts, which has great benefits in improving production efficiency while ensuring a certain quality of parts. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic flow chart of the method of the present invention.
[0026] Figure 2 It is a data graph collected by the present invention.
[0027] Figure 3 It is the time-frequency characteristic diagram of the present invention.
[0028] Figure 4 It is the Gram angle field diagram of the present invention.
[0029] Figure 5 This is the feature fusion network diagram of the present invention.
[0030] Figure 6 It is a flow chart of real-time prediction and parameter adjustment of the present invention.
[0031] Figure 7 This is a diagram of the prediction model training results of the present invention. DETAILED DESCRIPTION
[0032] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0033] The present invention provides an efficient cutting method for CNC machine tools based on real-time prediction of surface roughness. Specifically, data acquisition software developed for CNC machine tools is used to realize the acquisition and storage of internal information of external sensors and CNC system machine tools; data preprocessing, multi-source data feature extraction and fusion, and prediction models are used to realize the prediction of part surface roughness; data is collected during part processing and input into a model for real-time prediction and adjustment of processing parameters, thereby improving cutting efficiency while ensuring a certain quality of parts, and storing the optimal parameters in a knowledge base.
[0034] The data preprocessing includes marking, classifying and dividing the data sets according to the surface roughness in step 2, and filtering the data in step 3.
[0035] The invention specifically comprises the following steps:
[0036] Step 1: Collect the external sensor data of the CNC machine tool and the internal data of the CNC system, and store them in the database according to the labels.
[0037] Step 2: Read the external sensor data 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 parts.
[0038] Step 3: Remove abnormal values from the collected external sensor data by setting a threshold range, and perform filtering processing on different data types.
[0039] Step 4: Transform the three-axis active and cutting force data of the processed external sensor data to generate an image and extract the image feature sequence; extract the features of the remaining data except the processing time to obtain a numerical feature vector. The numerical feature vector is spliced and fused with the image feature sequence.
[0040] Step 5: Build a surface roughness prediction model, use the features fused in step 4 as the input of the model, and 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, the real-time collected external sensor data and the internal data of the CNC 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.
[0042] Step 7, build an efficient cutting knowledge base: when adjusting the processing parameters to increase the processing speed, adjust the parameters according to the set rules based on the real-time prediction value feedback of the surface roughness prediction model: 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 processing stability. After completing the processing, store the optimal processing parameters in the efficient cutting knowledge base.
[0043] Step 8: Before processing, search and match in the efficient cutting knowledge base, extract the optimal cutting parameter combination for similar parts processing, and set it to the machine tool control system as the initial parameters for this processing. During processing, reduce the variation range based on the rules in step 7 to fine-tune the processing parameters. After processing is completed, organize and archive all the data in the processing process, and compare and analyze it with the existing data in the efficient cutting knowledge base as a reference for subsequent improvements to optimize the knowledge base.
[0044] Example:
[0045] The present invention is further described and demonstrated by the following examples. The following examples use PyTorch to implement model training.
[0046] Step 1: Collect the external sensor data of the CNC machine tool and the internal data of the CNC system machine tool, and store them in the database according to the labels.
[0047] The data collected in the above step 1 is collected through the secondary development software, and the internal data of the CNC system is collected through Ethernet communication. The collected data specifically includes the spindle speed, spindle feed rate and processing time; the external sensor data is collected through serial port communication, and the collected data specifically includes the spindle X-axis vibration value, spindle Y-axis vibration value, spindle Z-axis vibration value, spindle cutting force value, spindle motor current and voltage value, and spindle motor power.
[0048] Step 2: Read the external sensor data and internal data of the CNC system collected in the database, and mark and classify the data sets according to the surface roughness of the parts.
[0049] Read the external sensor data and internal data of the CNC system collected in the database and export them as Excel files (such as Figure 2 ), the data set is classified and divided according to the surface roughness of the parts, and the data with different surface roughness are randomly divided into 80% as a training set, 10% as a test set, and 10% as a validation set.
[0050] in: Figure 4Here, vib_x is the spindle X-axis vibration value, vib_y is the spindle Y-axis vibration value, vib_z is the spindle Z-axis vibration value, val_nm is the spindle cutting force value, val_I is the spindle motor current value, val_V is the spindle motor voltage value, val_P is the spindle motor power value, ActSpeed is the spindle actual speed, ActFeed is the spindle feed rate, and Acttime is the processing time.
[0051] Step 3: Remove abnormal values from the collected sensor data by setting a threshold range, and perform filtering processing on different data types.
[0052] For outliers in the data, statistical methods are used to calculate the mean and standard deviation of each type of data, set the threshold range corresponding to each type of data, and determine the data points that exceed the threshold as outliers. The data points determined as outliers are removed and filled with linear interpolation. 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 with linear interpolation.
[0053] Then, filtering is performed on different data types. A first-order low-pass filter is used to process the internal data of the CNC system, and the cutoff frequency is set to 1 / 10 of the adopted frequency. Kalman filtering is performed on the external sensor data.
[0054] Step 4: Transform the three-axis active and cutting force data of the processed external sensor data to generate an image and extract the image feature sequence; extract the features of the remaining data (excluding the processing time) to obtain a numerical feature vector. The numerical feature vector is spliced and fused with the image feature sequence.
[0055] The collected CNC machine tool spindle data and cutting force data are transformed by Fourier to obtain the time-frequency characteristic diagram (such as Figure 3 As shown in Figure 2), the local and global features are extracted by converting it into a Gram angular field map to obtain a Gram angular field map (as shown in Figure 2). Figure 4 As shown in ), extract the features of the remaining data to obtain a numerical feature vector. Finally, the numerical feature vector is concatenated and fused with the image feature sequence (as shown in Figure 5 as shown).
[0056] The above feature extraction is shown in the following formula, where: is a window function; is the original signal; For time; is the frequency.
[0057] Fourier Transform:
[0058] The above Gram angular field conversion steps are: normalize the original one-dimensional time series data x to (-1,1), convert the normalized value into polar coordinates, take the timestamp as the radius, and apply the arccos function to the normalized value to obtain the angle, that is, .
[0059] Gram Angle Sum Field (GASF) Matrix Elements The formula is:
[0060] Step 5: Build a surface roughness prediction model, use the features fused in step 4 as the input of the model, and the output of the model is the predicted surface roughness of the part, and train the surface roughness prediction model.
[0061] The data fusion features obtained from the multi-source data through the first four steps are used as input, and the model is built as the output of the predicted part surface roughness. In the surface roughness prediction model, the input data fusion features are first spliced through the multi-head attention mechanism to concatenate the outputs of each head and then linearly transformed again to achieve simultaneous capture of information in different subspaces. After the multi-head attention mechanism, a two-layer fully connected feedforward neural network is connected, and residual connections and layer normalization are applied to accelerate model convergence. 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. Appropriate hyperparameters are set, and the surface roughness prediction model is trained using the Adam optimization algorithm and the mean square error (MSE) loss function.
[0062] Patch Embedding: ;
[0063] Position Embedding: ;
[0064] Multi-head attention mechanism: ;
[0065] ;
[0066] ;
[0067] Feedforward Neural Network: ;
[0068] Residual Connection: ;
[0069] ;
[0070] Layer Normalization: ;
[0071] Where μ is the mean of the inputs over the feature dimension, σ is the variance, and ε is a small constant to prevent the denominator from being zero.
[0072] The above surface roughness prediction model is built as follows: First, the model is initialized, and the hyperparameters are set to Patch Size=16*16, Embedding Dimension is 384, Depth is 12, Number of Heads is 8, MLP Ratio is 4, Learning Rate is 0.002, Batch Size is 64, Weight Decay is 1e-5, Dropout Rate is 0.2, and the Adam optimizer is used. The feature fused data is input into the model, and then the loss function is calculated. The parameters are updated through back propagation and optimization algorithms to reduce the loss. During the training process, the model is regularly evaluated with the validation set to adjust the hyperparameters and model structure. The training process is repeated until the conditions are met, and finally a final evaluation is performed on the test set to determine the model performance. The results of the training are as follows: Figure 7 As shown, 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 processing and input it into the surface roughness prediction model after preprocessing, so as to predict the surface roughness of the part in real time.
[0074] During the machining process, the data including spindle X-axis vibration value, spindle Y-axis vibration value, spindle Z-axis vibration value, spindle cutting force value, spindle motor current and voltage value, spindle motor power, spindle speed, and spindle feed rate are first collected. Then the collected data is preprocessed, including removing outliers and filling missing values. The time-frequency features of the spindle three-axis vibration data and spindle cutting force data are extracted by short-time Fourier transform, and the above data are normalized and converted into Gram angle field map to extract local and global features. The extracted numerical feature vectors and image feature sequences are spliced along the feature dimension and fused to form a complete input tensor. The features after multi-source data fusion (i.e., input tensor) are input into the surface roughness prediction model. Through the calculation and analysis of the model, the surface roughness of the parts can be predicted in real time, providing a basis for parameter adjustment and quality control during the machining process.
[0075] Step 7: During the processing Figure 6Process, according to the feedback given by the real-time surface roughness prediction model, when it is necessary to adjust the processing parameters to improve the processing efficiency, adjust the parameters according to the following rules based on the real-time prediction value feedback of the surface roughness prediction model: set the surface roughness threshold range. If the prediction value exceeds the upper limit, it means that the processing quality may decline. At this time, the feed rate is reduced first, and the reduction amplitude is 5% of the current feed rate each time. At the same time, the spindle speed is reduced by 3% to reduce the cutting force and improve the surface quality of the machined surface. If the predicted value is lower than the lower limit, it means that there is room for improvement in processing 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 processing stability. After adjusting the parameters, continue to obtain the output of the prediction model, wait for 3 seconds, and judge whether the surface roughness prediction value returns to a reasonable range. If not, continue to fine-tune the parameters until the quality requirements are met. The results of continuous feedback from the model ensure that the quality of the parts is always within the qualified range. After the entire processing task is completed, the processing parameters that achieve the best balance between processing efficiency and part quality are screened out, and these optimal processing parameters are updated and stored in the knowledge base so that they can be referenced for subsequent processing tasks to further improve processing quality and efficiency.
[0076] When initially establishing an efficient cutting knowledge base, the material properties of the parts are taken into consideration. For materials with lower hardness, such as aluminum alloys, the parameters are set within a higher speed range (such as 1000-3000 RPM); while for materials with higher hardness, such as stainless steel or titanium alloys, the parameters are set within a lower speed range (such as 500-1500 RPM). Based on the shape and size of the parts, for shaft parts with smaller diameters, a relatively high speed can be set at 1500-2500 RPM; for larger-sized disc or box parts, due to the larger moment of inertia, the speed should be reduced accordingly and can be set at 800-1200 RPM.
[0077] From the perspective of machining accuracy, for parts with higher surface roughness requirements (such as Ra ≤ 0.8μm), the feed rate should be set smaller (such as 0.05 - 0.1mm / rev); for parts with relatively lower 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 various types of parts with different surface roughness requirements, the orthogonal experimental design method is used to select representative parameter combinations within the above parameter range for experiments. For each parameter combination, relevant data (such as cutting force, vibration, temperature, processing time, and actual surface roughness, etc.) are collected during the processing process, and the advantages and disadvantages of the parameter combination are evaluated based on the processing results. The optimal parameter combination that can achieve efficient cutting and meet the surface roughness requirements under different conditions is selected. With the continuous accumulation and updating of processing data, the parameter settings in the knowledge base are further optimized and improved.
[0081] Step 8: Before machining, input the material, shape, size and surface roughness requirements of the parts to be machined into the system. The system searches and matches the information in the efficient cutting knowledge base based on this information, extracts the optimal cutting parameters for similar parts, and sets them to the machine tool control system as the initial parameters for this machining. During machining, follow the rules in step (VII) to set the surface roughness threshold range. If the predicted value exceeds the upper limit, set the current feed rate to the upper limit. Reduce feed rate and spindle speed If the predicted value is lower than the lower limit, increase the feed rate. , while monitoring the cutting force in real time. If the cutting force increases beyond the set threshold , then stop increasing the feed rate and increase the spindle speed , ensuring stable processing. Use this rule to fine-tune the processing parameters, and keep them consistent with the knowledge base as a whole. After processing, check the actual processing quality of the parts, organize and archive all data during the processing, and compare and analyze with the existing data in the efficient cutting knowledge base. If this processing is more efficient or of better quality while ensuring quality, store this parameter combination and related data in the knowledge base to update the optimal parameter range and adjustment strategy; if problems occur or expectations are not met, also record the data as a reference for subsequent improvements to optimize the knowledge base.
[0082] On the other hand, the present invention provides an efficient cutting system for CNC 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, an efficient cutting knowledge base and a cutting processing module.
[0083] The data acquisition module collects the external sensor data of the CNC machine tool and the internal data of the CNC system, and stores them in the database according to the labels.
[0084] The data marking and classification module reads the external sensor data and the internal data of the numerical control system collected in the database as a data set, and marks and classifies the data set according to the surface roughness of the parts.
[0085] The data preprocessing module removes abnormal values from the collected external sensor data by setting a threshold range, and performs filtering processing on different data types.
[0086] The data fusion module transforms the three-axis active and cutting force data of the external sensor data processed by the data preprocessing module to generate an image and extract the image feature sequence; extracts the features of the remaining data except the processing time to obtain a numerical feature vector. The numerical feature vector is spliced and fused with the image feature sequence.
[0087] The surface roughness prediction module builds a surface roughness prediction model, takes 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 the surface roughness prediction model is trained through the data set.
[0088] During the machining process, the real-time collected external sensor data and the internal data of the CNC system are input into the trained surface roughness prediction model after removing outliers, filtering and feature fusion processing, thereby realizing real-time prediction of surface roughness.
[0089] The method for building the efficient cutting knowledge base is as follows: when adjusting the processing parameters to increase the processing speed, the processing parameters are adjusted according to the set rules based on the real-time prediction value feedback of the surface roughness prediction model: the surface roughness threshold range is set. If the prediction value exceeds the upper limit, the feed rate is reduced first. If the prediction value is lower than the lower limit, the feed rate is increased first, but the cutting force needs to be monitored in real time. If the cutting force increases by more than the set threshold, the feed rate is stopped to ensure processing stability. After the processing is completed, the optimal processing parameters are stored in the efficient cutting knowledge base.
[0090] The cutting processing module searches and matches in the efficient cutting knowledge base before processing, extracts the optimal cutting parameter combination for similar parts processing, and sets it to the machine tool control system as the initial parameters of this processing. During processing, the processing parameters are fine-tuned by reducing the variation range based on the processing parameter adjustment rules established in the efficient cutting knowledge base. After processing is completed, all data in the processing process are sorted and archived, and compared and analyzed with the existing data in the efficient cutting knowledge base as a reference for subsequent improvements to optimize the knowledge base.
[0091] The present invention collects external sensor data and CNC system processing data during the CNC machine tool processing process; then inputs the surface roughness prediction model based on deep learning after preprocessing such as outlier removal filtering, feature extraction and feature fusion, and predicts the surface roughness of parts in real time. The processing parameters are adjusted accordingly to improve efficiency, and the quality of parts is guaranteed by model feedback. After processing is completed, the optimal parameters are updated and stored in the knowledge base.
[0092] The above contents are further detailed descriptions of the present invention in combination with specific / preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, they can also make several substitutions or modifications to these described embodiments without departing from the concept of the present invention, and these substitutions or modifications should be regarded as belonging to the protection scope of the present invention.
[0093] Parts of the present invention that are not described in detail belong to the well-known technologies of those skilled 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 include: Step (i) collecting the external sensor data of the CNC machine tool and the internal data of the CNC system, and storing them in the database according to the labels; Step (ii) reading the external sensor data and the internal data of the numerical control system collected in the database as a data set, and marking and classifying the data set according to the surface roughness of the parts; Step (iii) removing abnormal values from the collected external sensor data by setting a threshold range, and performing filtering processing on different data types; Step (iv) transforming the three-axis active and cutting force data of the spindle in the processed external sensor data to generate an image and extracting an image feature sequence; extracting features from the remaining data except the processing time to obtain a numerical feature vector; splicing and fusing the numerical feature vector with the image feature sequence; Step (V) building a surface roughness prediction model, using the fused features as the input of the model, the output of the model is the predicted surface roughness of the part, and training the surface roughness prediction model; Step (six) 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 abnormal values, filtering and feature fusion processing, so as to realize the real-time prediction of surface roughness; Step (seven) constructing an efficient cutting knowledge base; Step (eight) before processing, searching and matching the optimal cutting parameter combination in the efficient cutting knowledge base; fine-tuning the processing parameters during processing; and optimizing the knowledge base after processing is completed.
2. The method for high-efficiency cutting of CNC machine tools based on real-time prediction of surface roughness according to claim 1, characterized in that: The data in the step (i) is collected through secondary development software, and the internal data of the CNC system is collected through Ethernet communication. The collected data specifically includes the spindle speed, spindle feed rate and processing time; the external sensor data is collected through serial port communication, and the collected data specifically includes the spindle X-axis vibration value, the spindle Y-axis vibration value, the spindle Z-axis vibration value, the spindle cutting force value, the spindle motor current and voltage value, and the spindle motor power.
3. The method for efficient cutting of CNC machine tools based on real-time prediction of surface roughness according to claim 2, characterized in that: In the step (ii), the data collected in the database are exported into an Excel file, the data are separated according to the processing time of each part, and the parts are divided into multiple categories according to the surface roughness level requirements of the parts. The Ra value range of the surface roughness parts to be classified is set respectively, and the collected data are divided into data sets based on this; and the data with different surface roughness are randomly divided into 80% as a training set, 10% as a test set, and 10% as a verification set.
4. The method for high-efficiency cutting of CNC machine tools based on real-time prediction of surface roughness according to claim 3, characterized in that: In the step (iii), a statistical method is used for the outliers in the data to calculate the mean and standard deviation of each type of data; a threshold range corresponding to each type of data is set, and the data points exceeding the threshold are determined as outliers. The data points determined as outliers are removed and filled by linear interpolation; Then, filtering processing is performed on different data types respectively. A first-order low-pass filter is used to process the internal data of the CNC system, and the cutoff frequency is set to 1 / 10 of the adopted frequency. Kalman filtering is performed on the external sensor data.
5. The method for high-efficiency cutting of CNC machine tools based on real-time prediction of surface roughness according to claim 4, characterized in that: In the step (iv), the spindle motor current and voltage values, spindle motor power, spindle speed and spindle feed rate processed in step (iii) are feature extracted as numerical feature vectors; the spindle three-axis vibration data and spindle cutting force data in the external sensor data are respectively extracted with the short-time Fourier transform window function set as a rectangular window function with a size of 39 and a step size of 26 to extract time-frequency features, and the above data are normalized and then converted into a Gram angular field map to extract local and global features, and the features extracted from the short-time Fourier transform map and the Gram angular field map of the two types of data are used as image feature sequences; the extracted numerical feature vectors and image feature sequences are spliced along the feature dimension and fused to form a complete input tensor.
6. The method for efficient cutting of CNC machine tools based on real-time prediction of surface roughness according to claim 1 or 5, characterized in that: In the step (V), the data fusion features obtained by the multi-source data through the first four steps are used as input, and the surface roughness of the predicted parts is used as the output to build a model; in the surface roughness prediction model, the input data fusion features are firstly spliced through the multi-head attention mechanism to output the outputs of each head and then linearly transformed again to achieve simultaneous capture of 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 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 were set, and the surface roughness prediction model was trained using the Adam optimization algorithm and mean square error loss function.
7. The method for efficient cutting of CNC machine tools based on real-time prediction of surface roughness according to claim 6, characterized in that: In the step (VII), when adjusting the processing parameters to increase the processing speed, the parameters are adjusted according to the following rules based on the real-time prediction value feedback of the surface roughness prediction model: a surface roughness threshold range is set. If the prediction value exceeds the upper limit, the feed rate is reduced at this time, and the reduction amplitude each time is the current feed rate. , while reducing the spindle speed ; If the predicted value is lower than the lower limit, increase the feed rate. , while monitoring the cutting force in real time. If the cutting force increases beyond the set threshold , then 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 to determine whether the surface roughness prediction value returns to a 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 material properties, shape and size of the parts, and machining accuracy, and set the threshold range of the spindle speed and feed rate; when setting parameters for various types of parts with different surface roughness requirements, use the orthogonal experimental design method to 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 based on the machining results, and screen out the parameters that meet the requirements under different conditions. The optimal parameter combination that can achieve efficient cutting and meet the surface roughness requirements under the condition of parts; the relevant data include cutting force, vibration, temperature, processing time and actual surface roughness; with the continuous accumulation and updating of processing data, the parameter settings in the knowledge base are further optimized and improved; on the premise of meeting the surface roughness requirements, the efficiency is judged according to the length of time to complete the part processing, and it is compared with the processing efficiency of the corresponding parts in the knowledge base. If the surface roughness is the same and the efficiency is higher, its processing parameters will overwrite the previous record in the knowledge base; if the surface roughness is different, the record of how to set the processing parameters of the part at different processing times is stored in the efficient cutting knowledge base.
8. The method for efficient cutting of CNC machine tools based on real-time prediction of surface roughness according to claim 7, characterized in that: In the step (eight), before processing: according to the material, shape, size and surface roughness requirements of the part to be processed, the matching is searched in the efficient cutting knowledge base, and the optimal cutting parameters for similar parts are extracted and set as the initial parameters of this processing to the machine tool control system; during processing: according to the rules in step (seven), the surface roughness threshold range is set, and if the predicted value exceeds the upper limit, the current feed rate is adjusted. Reduce feed rate by fine increments and reduce spindle speed in tandem ; If the predicted value is lower than the lower limit, increase the feed rate. , while monitoring the cutting force in real time. If the cutting force increases beyond the set threshold , then stop increasing the feed rate and increase the spindle speed , ensure stable processing; use this rule to fine-tune the processing parameters, and keep them consistent with the knowledge base as a whole; after processing: detect the actual processing quality of the parts, organize and archive all data in the processing process, and compare and analyze with the existing data in the efficient cutting knowledge base; if this processing is more efficient or of better quality while ensuring quality, then store this parameter combination and related data in the knowledge base to update the optimal parameter range and adjustment strategy; if problems occur or expectations are not met, also record the data as a reference for subsequent improvements to optimize the knowledge base.
9. The method for efficient cutting of CNC machine tools based on real-time prediction of surface roughness according to claim 6, characterized in that: The surface roughness prediction model training parameters in step (V) are set as follows: the number of learning times is 100, the learning rate is 0.002, and the data size of each learning is 64 groups.
Citation Information
Patent Citations
Intelligent analysis method for machining precision of numerical control machine tool
CN115237055A
Processing workpiece surface roughness prediction method and device and storage device
CN115964814A
Numerical control machining surface roughness prediction method
CN116186499A
Device for predicting surface roughness of machined part
CN116578832A
Multi-dimensional depth feature extraction and identification method of DAS signal
CN116818080A
Cited By
Flutter-considered high-speed milling surface roughness prediction method and system
CN120347590A
Knowledge base construction and application method and system for adaptive machining of numerical control machine tool
CN120470001A
A knowledge base construction and application method and system for adaptive machining of a numerical control machine tool
CN120470001B
Method for predicting surface roughness of weak-rigidity molded surface based on cutting force and cutting vibration
CN121018280A
Numerical control machine tool adjusting method and device, electronic equipment and computer readable medium
CN121433103A