Curved surface milling surface roughness prediction method based on dynamic and static data fusion
By using a dynamic and static data fusion method, and leveraging a bidirectional long short-term memory network and a self-attention layer to extract milling force data features, the problem of inaccurate surface roughness detection of complex curved parts in traditional methods is solved. This achieves high-precision surface roughness prediction and improves the efficiency and accuracy of part machining quality assessment.
Patent Information
- Application Number
- CN202511924153.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies struggle to accurately detect the surface roughness of complex curved parts, and traditional methods are costly and inefficient. Predictive models based on single static data have weak generalization capabilities and fail to reflect the impact of the dynamic milling process.
A method based on dynamic and static data fusion is adopted. The milling force data features are extracted through a bidirectional long short-term memory network and a self-attention layer. Combined with the static milling data, a surface roughness prediction model is constructed, and the surface roughness is predicted using dynamic and static data features.
It achieves high-precision prediction of surface roughness in curved milling, improves the generalization ability and accuracy of the prediction model, and is suitable for the machining quality assessment of complex curved surface parts.
Smart Images

Figure CN121706013A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of surface roughness prediction, and particularly relates to a surface roughness prediction method for curved surface milling based on dynamic and static data fusion. BACKGROUND
[0002] As one of important indexes of part quality, surface roughness seriously affects the assembly accuracy and service performance of the part. In milling processing, milling parameters have a significant influence on the surface roughness of the part, and excessive surface roughness can accelerate the wear of the part, thereby adversely affecting the overall performance and service life of the machine. Therefore, accurate measurement of the surface roughness can improve the processing quality of the part.
[0003] The prior art mainly adopts traditional methods such as direct measurement, comparative measurement and comprehensive measurement to detect the surface roughness. These traditional surface roughness detection methods have the disadvantages of high cost and low efficiency. In addition, many part surfaces have complex curved surface characteristics, which are more difficult to accurately detect the surface roughness.
[0004] For the prediction of surface roughness, it is mainly divided into two kinds of based on mechanical model and data mining. The prediction method based on mechanical model analyzes the mechanism and influencing factors of surface roughness formation under different processing technologies, establishes the corresponding mechanical model, so as to realize the prediction of surface roughness. However, the various idealized assumptions in these models may lead to errors, and there are also the disadvantages of large amount of calculation and low development efficiency. The prediction method based on data mining usually takes the process parameters and machine tool state as decision variables, analyzes and processes high-dimensional nonlinear factors affecting the surface roughness, and then obtains the roughness prediction equation by using polynomial fitting, but these decision variables are static data, which cannot reflect the influence of the milling dynamic process on the surface roughness. Therefore, the application provides a surface roughness prediction method for curved surface milling based on dynamic and static data fusion. SUMMARY
[0005] In view of the deficiencies of the prior art, the technical problem to be solved by the application is to provide a surface roughness prediction method for curved surface milling based on dynamic and static data fusion.
[0006] The application solves the technical problem by adopting the following technical scheme: A surface roughness prediction method for curved surface milling based on dynamic and static data fusion, characterized by comprising the following steps: First step: acquiring a three-axis milling force sequence to form a milling force time series data matrix; acquiring milling static data including spindle speed, feed speed, cutting depth, cutting width, rake angle, inclination angle and curvature radius to form a milling static data matrix; Second step: build a surface roughness prediction model, including a dynamic data feature extraction module, a static data feature extraction module and a prediction head; the milling force time series data matrix passes through the dynamic data feature extraction module to obtain dynamic data features; the milling static data matrix passes through the static data feature extraction module to obtain static data features; the prediction head uses the dynamic data features and the static data features to predict the surface roughness; The dynamic data feature extraction module comprises a bidirectional long short-term memory network and a self-attention layer; the milling force time series data matrix is input into the forward long short-term memory network in a forward order to obtain a forward hidden state; the milling force time series matrix is input into the backward long short-term memory network in a reverse order to obtain a backward hidden state; the forward hidden state and the backward hidden state are spliced and then linearly transformed and mapped to a target space to obtain milling force features; in the self-attention layer, the milling force features are linearly transformed to obtain a query vector, a key vector and a value vector; the query vector and the key vector pass through a softmax function to calculate an attention score matrix; the attention score matrix is multiplied by the value vector, and then compressed through a pooling operation to obtain dynamic data features; In the static data feature extraction module, the milling static data matrix is linearly transformed and mapped to a high-dimensional space, and then subjected to batch normalization and a ReLU activation function; then, the milling static data matrix is linearly transformed and mapped to a target space, and then subjected to a ReLU activation function to obtain static data features; Third step: training the surface roughness prediction model, and using the trained surface roughness prediction model for surface roughness prediction.
[0007] Further, in the prediction head, the dynamic data features and the static data features are spliced to obtain dynamic-static data fusion features; the dynamic-static data fusion features sequentially pass through a linear layer, a ReLU activation function, a deactivation layer, a linear layer, a ReLU activation function and a linear layer to obtain a surface roughness prediction value.
[0008] Compared with the prior art, the present application has the following advantages: The existing model generally uses single static and dynamic data to predict the surface roughness of a part, has weak generalization ability and ignores the fact that the surface roughness is determined by the initial process parameters and the process data in actual machining, while the milling force is a key parameter reflecting the milling process, so the present application realizes high-precision prediction of the surface roughness by considering the characteristics of surface milling and combining dynamic and static milling data. BRIEF DESCRIPTION OF DRAWINGS
[0009] Figure 1 is the overall flowchart of the present application; Figure 2 is a structure diagram of the surface roughness prediction model of the present application; Figure 3 The fitting curve of the surface roughness prediction value and the true value of the application; Figure 4 The performance comparison chart of different prediction models of the application; Figure 5 The ablation experiment results of the model of the application. DETAILED DESCRIPTION
[0010] The specific embodiments are described below with reference to the accompanying drawings, which are only used to further illustrate the technical solutions of the application and do not limit the protection scope of the application.
[0011] As shown in the figure, the application provides a surface roughness prediction method for curved surface milling based on dynamic and static data fusion, which includes the following steps: Figures 1-5 First step: Obtain milling dynamic data and static data, and construct a data set; The data set includes a plurality of samples, and each sample includes milling force time series data and milling static data. The milling force time series data includes x, y and z direction milling force sequences, which form a milling force time series data matrix , represents the sequence length, and 3 represents the matrix dimension, i.e. the milling force in three directions; the milling static data includes basic process parameters: spindle speed (n), feed speed (f), cutting depth (a p ), cutting width (a e ), tool posture parameters: rake angle (α), inclination angle (β), curved surface milling characteristic parameters: curvature radius (R), which form a milling static data matrix , and 7 represents the matrix dimension, i.e. the number of parameters.
[0012] In the process of five-axis curved surface milling, the tool will be at a certain angle with the workpiece surface to avoid direct contact, i.e. the rake angle and inclination angle of the tool need to be determined in milling. The difference between curved surface milling and plane milling lies in that the surface has different curvature characteristics, which will cause the engagement area between the milling cutter and the surface to change, and it is very complex to accurately describe the curved surface characteristics, therefore, the curvature radius of the milling path is used to describe the curved surface characteristics. The milling force is highly related to the surface roughness, and appropriate milling force can obtain better surface roughness.
[0013] Second step: Construct a surface roughness prediction model; Figure 2 As shown, the surface roughness prediction model comprises a dynamic data feature extraction module, a static data feature extraction module and a prediction head; the milling force time series data matrix passes through the dynamic data feature extraction module to obtain dynamic data features; the milling static data matrix passes through the static data feature extraction module to obtain static data features; and the prediction head predicts the surface roughness by using the dynamic data features and the static data features.
[0014] The dynamic data feature extraction module comprises a bidirectional long short-term memory network (BiLSTM) and a self-attention layer; the milling force time series data matrix is input into the forward long short-term memory network in a forward order to learn the time series dependency relationship from front to back to obtain a forward hidden state ; the milling force time series matrix is input into the backward long short-term memory network in a reverse order to learn the time series dependency relationship from back to front to obtain a backward hidden state ; the forward hidden state and the backward hidden state are spliced and then linearly transformed and mapped to a target space to obtain milling force features ; the BiLSTM extracts the time series dependency relationship from the front and back of the sequence at the same time, thereby obtaining more comprehensive overall information; (1) wherein, represents a linear transformation matrix, represents a bias vector, represents a splicing operation; Since the BiLSTM cannot completely remember all the effective information in the milling force, a self-attention mechanism is adopted to give different weights to information of different influence degrees, thereby performing more comprehensive feature extraction on the milling force data; in the self-attention layer, the milling force features are mapped to a query, key and value space through linear transformation to obtain a query vector , a key vector and a value vector ; (2) (3) (4) wherein, , and represent linear transformation matrices; The attention score matrix is calculated by the following formula : (5) wherein, represents a softmax function and plays a normalizing role; represents a transposition operation; The dimension of the key vector, used to scale the dot product result to prevent vanishing gradient. After multiplying the attention score matrix with the value vector and compressing through the pooling operation, the output of the self-attention layer, i.e., the dynamic data feature, is obtained . (6) In the formula, represents the pooling operation.
[0015] In the static data feature extraction module, the milling static data matrix is mapped to a high-dimensional space through a linear layer, and then passes through a batch normalization layer and a ReLU activation function; then, it is mapped to the target space through a linear layer, and then passes through a ReLU activation function to obtain the static data feature .
[0016] In the prediction head, the dynamic data feature and the static data feature are spliced to obtain the dynamic-static data fusion feature; the dynamic-static data fusion feature sequentially passes through a linear layer, a ReLU activation function, a deactivation layer, a linear layer, a ReLU activation function and a linear layer to obtain the surface roughness prediction value.
[0017] Step 3: Use the dataset to train the surface roughness prediction model, and use the trained surface roughness prediction model for surface roughness prediction.
[0018] Embodiment This embodiment uses a four-rotor chuck for center positioning on a JD-JR400T five-axis machine tool, employing a D6 carbide ball end mill to machine an aero-engine blade made of UNS630 material. During milling, a Kistler 9170b piezoelectric wireless rotary force gauge is used to collect milling force signals throughout the machining process under different tool postures, with the acquisition frequency set to 5000Hz. Since this is surface milling for finishing, the basic process parameters are set as follows: spindle speed 5000–7000 rpm, feed rate 500–700 mm / min, depth of cut 0.2 mm, and width of cut 0.3 mm. Considering the actual characteristics of five-axis milling, to avoid contact between the tool tip and the workpiece, the tool rake angle is set to 5°–20°, and the side rake angle to 10°–35°. Different surfaces have different curvatures, resulting in different radii of curvature along the machining path at different points. To address the common concave-convex surface features in aero-engine blades, multiple sets of experiments were designed for different curvatures under concave and convex surface conditions to obtain more milling data under various process parameters and tool attitudes. The curvature radii for the concave surfaces were -25mm, -50mm, and -100mm, while those for the convex surfaces were 25mm, 50mm, and 100mm. Since the milling force data includes a large number of non-milling signals (signals before tool entry and after tool retraction), a three-dimensional milling force sequence during the stable milling phase was extracted, with a sequence length of 5150. A total of 333 sets of data were collected in this embodiment; some experimental data are shown in Table 1.
[0019] Table 1. Partial experimental results under different milling data
[0020] Model training and prediction parameter settings: batch size of 32, learning period of 40, learning rate of 0.001, and Adam optimization is used to update model parameters through backpropagation.
[0021] like Figure 3 As shown, by selecting a portion of the data and performing curve fitting between the predicted and actual surface roughness values, the minimum error rate is only 2.42%.
[0022] To further evaluate the predictive capability of the present invention's prediction model, it is compared with commonly used prediction models (Support Vector Machine (SVR), Random Forest (RF), Decision Tree (Tree), Multilayer Perceptron (MLP), and Gaussian Process Regression (GPR)). Three evaluation metrics are introduced: Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and Mean Absolute Error (MAE). The evaluation results for each model are as follows: Figure 4As shown, the root mean square error and mean square error of the model in this invention are superior to existing models, while the mean absolute error is slightly lower than that of the GPR algorithm, indicating that the method of this invention can provide more accurate and robust surface roughness predictions. These findings not only highlight the advantages of the method of this invention in prediction accuracy, but also reveal its potential application value in practical processing scenarios where precision surface quality assessment is crucial.
[0023] To investigate the roles of different structures in the model, a series of ablation experiments were conducted. While keeping other internal parameters constant, partial structural removal was performed to reveal the impact of each component on the overall performance. The ablation experiment results are as follows: Figure 5 As shown, FullModel represents the complete model; NoBiLSTM indicates the removal of the BiLSTM network; NoAttention indicates the removal of the self-attention layer; and LSTM indicates the replacement of the BiLSTM network with an LSTM network. Figure 5 It can be seen that the complete model outperforms the comparison model in terms of mean squared error, mean absolute error, and root mean square error. Further analysis reveals the main factors contributing to the performance improvement: (1) The BiLSTM network enhances the capture of the dynamic characteristics and influence of milling force sequences by improving the weight update mechanism of the hidden layers. When the BiLSTM network is removed, the three index values of the model increase significantly, resulting in a significant decrease in prediction accuracy.
[0024] (2) The addition of the self-attention mechanism enables the model to characterize the interdependence of different points in the milling force sequence through weight allocation, while supporting parallel processing, which greatly enhances the model's ability to analyze the correlation between features in long-term span sequences.
[0025] Any aspects not covered in this invention are applicable to existing technologies.
Claims
1. A method for predicting surface roughness in curved surface milling based on dynamic and static data fusion, characterized in that, Includes the following steps: Step 1: Obtain the three-axis milling force sequence and form a milling force timing data matrix; obtain the milling static data including spindle speed, feed rate, depth of cut, width of cut, rake angle, side rake angle, and radius of curvature, and form a milling static data matrix; Step 2: Construct a surface roughness prediction model, including a dynamic data feature extraction module, a static data feature extraction module, and a prediction head; the milling force time series data matrix is processed by the dynamic data feature extraction module to obtain dynamic data features; the milling static data matrix is processed by the static data feature extraction module to obtain static data features; the prediction head uses the dynamic data features and static data features to predict surface roughness; The dynamic data feature extraction module includes a bidirectional long short-term memory network and a self-attention layer; the milling force time series data matrix is input into the forward long short-term memory network in forward order for processing to obtain the forward hidden state; the milling force time series matrix is input into the backward long short-term memory network in reverse order for processing to obtain the backward hidden state. The forward and backward hidden states are concatenated and then linearly transformed to map to the target space to obtain milling force features. In the self-attention layer, the milling force features are linearly transformed to obtain query vector, key vector, and value vector. The query vector and key vector are processed by the softmax function to calculate the attention score matrix. The attention score matrix is multiplied by the value vector and then compressed by pooling to obtain dynamic data features. In the static data feature extraction module, the milling static data matrix is mapped to a high-dimensional space through linear transformation, and then subjected to batch normalization and ReLU activation function; next, it is mapped to the target space through linear transformation, and then subjected to ReLU activation function to obtain static data features; Step 3: Train the surface roughness prediction model and use the trained model for surface roughness prediction.
2. The method for predicting surface roughness in curved surface milling based on dynamic and static data fusion according to claim 1, characterized in that, In the prediction head, dynamic data features and static data features are concatenated to obtain dynamic-static data fusion features. The dynamic-static data fusion features are then passed through a linear layer, a ReLU activation function, a deactivation layer, a linear layer, a ReLU activation function, and a linear layer in sequence to obtain the surface roughness prediction value.
