Milling force prediction system based on mechanism-data hybrid drive model

By combining LSTM networks and fully connected neural networks, and introducing residual connections and self-attention mechanisms, the milling force prediction system solves the problem of insufficient prediction accuracy and efficiency of traditional models under complex working conditions. It achieves efficient and stable milling force prediction and is suitable for real-time machining monitoring and process optimization.

CN121960157APending Publication Date: 2026-05-01FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUZHOU UNIV
Filing Date
2026-01-15
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional mechanical milling force models have limited applicability under complex cutting conditions, the calculation process is cumbersome and environmental factors are difficult to fully consider, data-driven models have insufficient prediction stability and generalization ability under small sample conditions, and existing mechanism-data hybrid driven models have low training efficiency and are difficult to converge.

Method used

A mechanism-data hybrid driven model is adopted, which combines LSTM network and fully connected neural network, and introduces residual connection and self-attention mechanism to build a milling force prediction system. The residual connection prevents gradient vanishing and the self-attention enhances the attention to key inputs, thereby improving prediction accuracy and training efficiency.

Benefits of technology

It achieves rapid learning convergence with small samples, improves robust prediction under complex working conditions, enhances the accuracy and training efficiency of milling force prediction, and is suitable for real-time machining status monitoring, adaptive process optimization, and digital twins and simulations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121960157A_ABST
    Figure CN121960157A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of milling force prediction, and discloses a milling force prediction system based on a mechanism-data hybrid drive model, which combines an LSTM (Long Short Term Memory) network and a full-connection neural network to construct a milling force prediction model of a deep learning network main body containing residual connection and a Self-Attention mechanism. The model architecture specifically comprises an input layer, an LSTM time sequence feature extraction layer, residual connection, a Self-Attention feature enhancement layer and a full-connection neural network FCN prediction layer. By adopting the milling force prediction system, the attention mechanism effectively enhances the attention of the model on key input by dynamically distributing different weights, so that the prediction precision is improved; the problems of gradient disappearance and gradient explosion are relieved by using residual structure jump connection; the LSTM can effectively capture the long-time dependency relationship in the long-time sequence, and the training efficiency of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

A Milling Force Prediction System Based on Mechanism-Data Hybrid Driving Model Technical Field

[0001] This invention relates to the field of milling force prediction technology, and in particular to a milling force prediction system based on a mechanism-data hybrid driving model. Background Technology

[0002] Traditional mechanical milling force models have limited applicability under complex cutting conditions, and the calculation of the undeformed chip thickness (IUCT) is quite cumbersome, leading to reduced prediction efficiency. Furthermore, many environmental factors in actual machining are difficult to fully consider, affecting the model's accuracy. However, thanks to advancements in computer technology and improvements in numerical computation theory, finite element method-based milling force prediction methods have significantly improved in accuracy and applicability. Nevertheless, they still suffer from high computational resource consumption and strong dependence on material constitutive models.

[0003] As machine learning begins to emerge in the field of CNC machining, data-driven models have shown excellent predictive potential by learning the features of machining data. However, their training process heavily relies on high-quality, large-scale datasets, and acquiring such data usually requires a lot of time and economic costs. Therefore, it is difficult to maintain high-precision predictions when experimental data is limited.

[0004] Therefore, many scholars have cleverly integrated the strengths of both models into a mechanism-data hybrid driven model, which has gradually become a research hotspot. However, although existing research has partially alleviated the problems of over-reliance on mechanism modeling and insufficient data by introducing data-driven strategies, it still has shortcomings: differences in model structure lead to low training efficiency and difficulty in convergence; performance heavily depends on large-scale data and lacks the ability to learn quickly with small samples; and when dealing with new working conditions or extreme parameters, the prediction stability and generalization ability are insufficient.

[0005] Therefore, a new prediction method is needed to overcome the shortcomings of existing technologies. Summary of the Invention

[0006] The purpose of this invention is to provide a milling force prediction system based on a mechanism-data hybrid driven model. Through residual connections and attention mechanisms, it aims to simultaneously achieve efficient and stable training, rapid learning convergence with small samples, and highly robust prediction under complex working conditions.

[0007] To achieve the above objectives, this invention provides a milling force prediction system based on a mechanism-data hybrid driven model. It combines an LSTM network and a fully connected neural network, introduces residual connections and incorporates a Self-Attention mechanism as the main network structure to construct a milling force prediction model. The model architecture specifically includes an input layer, an LSTM temporal feature extraction layer, residual connections, a Self-Attention feature enhancement layer, and a fully connected neural network (FCN) prediction layer.

[0008] Preferably, in the input layer, the input features include: mechanistic features, process parameters, and time-series data; all features are standardized to form a multi-dimensional time-series input matrix. Among them, the mechanism features are theoretical physical quantities pre-calculated based on the cutting dynamics equations, including instantaneous undeformed chip thickness and cutting force coefficient, which are used to provide physical prior knowledge for the neural network; the process parameters include: spindle speed, feed rate, depth of cut and width of cut; the time series data includes: milling force signals and vibration signals in the sampling time series of historical moments.

[0009] Preferably, in the LSTM temporal feature extraction layer, a two-layer stacked LSTM structure is used, with 128 neurons in each layer; the output of the first LSTM layer is used as the input of the second layer to enhance the deep extraction of temporal dependencies, and the output is the hidden state sequence. .

[0010] Preferably, residual connections are introduced in each LSTM layer to prevent gradient vanishing, as shown below: ;in, It is the first The LSTM output of the layer; It is the output of the previous LSTM layer.

[0011] Preferably, the Self-Attention feature enhancement layer is placed after the LSTM temporal feature extraction layer to redistribute the weights of the temporal features, thereby enhancing the model's sensitivity to changes in milling force during key machining stages. Therefore, the input to the Self-Attention layer is the hidden state sequence output by the LSTM. The linear transformation yields the Query, Key, and Value, as shown below: ;in, The weight matrix is ​​trainable; the weights for each time step are calculated using a multi-head self-attention mechanism to highlight key processing moments, and the output is a weighted feature representation, as shown below: ;in, This is the scaling factor; The dimension of the key vector Key is used to scale the dot product result and prevent gradient vanishing.

[0012] Preferably, the prediction layer of the fully connected neural network adopts a three-layer fully connected structure with 64, 32, and 1 neurons respectively; the first two layers use the ReLU activation function, and the last layer linearly outputs the predicted milling force value. .

[0013] Therefore, the present invention adopts the above-mentioned milling force prediction system based on a mechanism-data hybrid driven model, which has the following beneficial effects: 1) The attention mechanism effectively enhances the model's attention to key inputs by dynamically allocating different weights, thereby improving prediction accuracy; 2) The introduction of a residual connection structure adds the input of the LSTM layer to the features processed by the Self-Attention layer element-wise, forming a fused feature input to the fully connected layer; this structure allows the network to learn only the residual mapping, effectively alleviating the gradient degradation problem of deep networks; 3) LSTM can effectively capture long-term dependencies in long-term sequences, improving the training efficiency of the model.

[0014] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0015] Figure 1 is a schematic diagram of the RNN structure; Figure 2 is a schematic diagram of the LSTM structure; Figure 3 is a schematic diagram of the residual connection structure; Figure 4 is a schematic diagram of the milling force prediction model architecture of the present invention; Figure 5 is a diagram of the prediction results of the model of the present invention; Figure 6 is a diagram of the RNN structure of the test set of the present invention. 2 picture. Detailed Implementation

[0016] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0017] In order to achieve accurate prediction of milling force, this invention combines LSTM network and fully connected neural network, introduces residual connection and combines Self-Attention mechanism as the main network structure to construct a milling force prediction model. The model architecture is shown in Figure 4, which specifically includes an input layer, LSTM temporal feature extraction layer, residual connection, Self-Attention feature enhancement layer and fully connected neural network (FCN) prediction layer.

[0018] (1) Input layer.

[0019] Input features include: mechanistic features, process parameters, and time series data; all features are standardized to form a multidimensional time series input matrix. .

[0020] Among them, the mechanism features are theoretical physical quantities pre-calculated based on the cutting dynamics equations, including instantaneous undeformed chip thickness and cutting force coefficient, which are used to provide physical prior knowledge for the neural network; the process parameters include: spindle speed, feed rate, depth of cut and width of cut, etc.; the time series data includes: milling force signals and vibration signals in the sampling time series of historical moments, etc.

[0021] (2) LSTM temporal feature extraction layer.

[0022] Recurrent Neural Networks (RNNs) are used for time series forecasting, and milling force prediction is a type of Time Series Forecasting (TSP). The structure of an RNN is shown in Figure 1. A key characteristic of RNNs is that they are prediction models with memory capabilities; each prediction is related not only to the current input but also to previous states. However, RNNs are susceptible to vanishing and exploding gradients, primarily due to long-term dependencies. Exploding gradients cause weights to oscillate continuously during training, while vanishing gradients prevent effective long-term learning. This makes RNNs perform poorly when predicting time series with long-term dependencies.

[0023] Long Short-Term Memory (LSTM) networks, as a special type of RNN, effectively improve this problem by introducing three "gate" mechanisms and a cell state mechanism. The structure of LSTM is shown in Figure 2. The basic principle of LSTM is the gating mechanism, which controls the transmission of information by "turning it on" or "turning it off." LSTM has three main gates: the forget gate, the input gate, and the output gate. These gates use the sigmoid activation function to determine whether to retain or discard information. The forget gate determines which information in the current memory state needs to be forgotten.

[0024] The forget gate outputs a value between 0 and 1, representing the importance of each unit of information in memory, where 0 indicates complete forgetting and 1 indicates complete retention, as shown below: ;in, It is the output of the forget gate; It is the hidden state from the previous moment; This is the current input; and These are the weights and biases of the forget gate, respectively; It is the Sigmoid activation function.

[0025] The input gate uses a similar structure to the forget gate. The input gate determines the degree of updating of the current input information. It updates the current memory unit based on the combination of the current input and the hidden state of the previous time step, as shown below: ;in, It is the output of the input gate; It is the current candidate memory unit, used to determine the content of new information; and These are the weights and biases of the input gate, respectively; and These are the weights and biases of the candidate memory units; It is the hyperbolic tangent activation function.

[0026] The output gate determines the output of the current hidden state; the hidden state is generated based on the current memorized state and adjusted through the output gate, as shown below: ;in, It is the output of the output gate; It is the hidden state at the current moment; and These are the weights and biases of the output gate, respectively. This represents the current state of the memory cell. The update of the memory cell state is based on the outputs of the forget gate and the input gate, as shown below: The workflow of LSTM can be summarized as follows: First, the forget gate determines the historical information to be forgotten; then, the input gate determines the new information to be added to memory and updates the memory state; finally, the output gate determines the output content based on the current memory state.

[0027] Through this gating mechanism, LSTM can effectively capture long-term dependencies in long-term sequences. Although the LSTM structure is relatively complex, it can still accelerate the training process through parallel computation, thereby improving the training efficiency of the model.

[0028] This invention employs a two-layer stacked LSTM structure, with 128 neurons in each layer; the output of the first LSTM layer serves as the input to the second layer, enhancing the extraction of temporally dependent deep layers, and the output is a sequence of hidden states. .

[0029] (3) Residual connection.

[0030] Early research on neural networks found that increasing the number of network layers and neurons per layer could improve network performance. However, when the network depth became too large, its predictive performance actually decreased. This may be because the gradients of the network become extremely small or large during the backpropagation of errors, making it difficult to update the model's parameters, and causing the network to be difficult to converge or unstable. ResNet effectively solved this problem. ResNet innovatively uses a residual structure, employing skip connections in each residual block to alleviate the vanishing and exploding gradient problems, as shown in Figure 3.

[0031] The residual block consists of an inner convolutional layer and an activation function, and the final mapping is obtained through skip connections. Its core structure is as follows: ;in, It is the input data; The transformation representing a neural network directly allows the input to pass through skip connections. Add to output If an identity mapping is formed, the gradient will propagate directly backward along the skip connections, thus avoiding the gradient vanishing problem.

[0032] Therefore, in order to improve the training stability and information transmission capability of the network, this invention introduces residual connections in each LSTM layer to prevent gradient vanishing, as shown below: ;in, It is the first The LSTM output of the layer; It is the output of the previous LSTM layer. This structure ensures smooth information flow and improves training stability.

[0033] (4) Self-Attention feature enhancement layer.

[0034] The self-attention mechanism effectively captures key information even when processing long sequences of data, preventing the loss of important information due to the large time span. By dynamically assigning different weights, the attention mechanism effectively enhances the model's focus on key inputs, thereby improving prediction accuracy. This characteristic has significant advantages in processing long sequence tasks. The output at the current time step is not only related to the current input but also influenced by all historical inputs. However, the influence of inputs at different time steps on the output varies. The attention mechanism measures the importance of inputs by assigning different weights; the larger the weight, the more significant the contribution to the final prediction. When the amount of data is small or information is scarce, the self-attention mechanism can strengthen the connections between input data and dynamically adjust model parameters during continuous prediction, making it more accurately adapt to the data distribution. Its simple structure and low computational cost facilitate the optimization of model structure and parameters. Therefore, the self-attention mechanism is suitable for milling force prediction tasks.

[0035] The calculation process of Self-Attention is as follows: In this invention, the Self-Attention layer is connected after the LSTM layer to redistribute the weights of temporal features and enhance the model’s sensitivity to changes in milling force during key processing stages (such as the entry and exit stages).

[0036] Therefore, the input to the Self-Attention layer is the hidden state sequence output by the LSTM. The linear transformation yields the Query, Key, and Value, as shown below: ;in, This is a trainable weight matrix.

[0037] The weights for each time step are calculated using a multi-head self-attention mechanism to highlight key processing moments. The output is a weighted feature representation, as shown below: ;in, This is a scaling factor used to avoid gradient problems caused by excessively large dot products; The dimension of the key vector Key is used to scale the dot product result and prevent gradient vanishing.

[0038] (5) Fully connected neural network (FCN) prediction layer.

[0039] This invention employs a three-layer fully connected structure with 64, 32, and 1 neurons respectively; the first two layers use the ReLU activation function, and the last layer linearly outputs the predicted milling force value. .

[0040] (6) Training strategy and hyperparameter settings.

[0041] Mean squared error (MSE) is used as the loss function. During training, the Adam optimizer is used. In a preferred embodiment of the present invention, the model training parameters are set as follows: initial learning rate is 0.0001; batch size is 64, sequence length is 50; number of LSTM layers is 2, number of neurons per layer is 128; maximum gradient norm is 18 to prevent gradient explosion; dropout rate is set to 0.07 to reduce overfitting; training is terminated when the validation set loss does not decrease for 10 consecutive rounds.

[0042] The system model constructed in this invention outputs a continuous time-step milling force prediction sequence, which can be directly used for machining process monitoring and optimization. The milling force prediction sequence output by the model is presented in the form of a time-series array, which can be directly connected to a CNC system or an independent process monitoring platform. This output format combines high timeliness and high accuracy, effectively solving the shortcomings of traditional methods in terms of real-time performance and prediction stability, and providing a reliable data-driven kernel for the realization of intelligent milling.

[0043] In practical applications, milling force prediction sequences can be used for scenarios such as real-time machining status monitoring, adaptive process optimization, and digital twins and simulations.

[0044] Among them, real-time machining status monitoring enables early detection and warning of abnormal states such as tool wear and chatter by comparing predicted forces with sensor-measured forces; adaptive process optimization dynamically adjusts process parameters such as spindle speed and feed rate based on prediction results to achieve autonomous optimization and energy saving in the machining process; digital twin and simulation, as the core output of the virtual machining model, provides high-fidelity force data support for process planning and simulation.

[0045] As shown in Figures 5 and 6, during the training process, the coefficient of determination R of the training set...2 The coefficient of determination (R²) reached 0.992, and the validation loss during training decreased to 0.00014. The solid red line represents the actual milling force, and the dashed blue line represents the predicted simulated milling force. The predicted milling force is very close to the actual force, indicating that the proposed model has high prediction accuracy. On the test set data selected in this invention, the average error of the mechanical force model prediction results relative to the actual measured values ​​was 13.16%, and the coefficient of determination R² was [missing value]. 2 The value is 0.6079, and the mean square error is 261.

[0046] Therefore, this invention adopts a milling force prediction system based on a mechanism-data hybrid driven model. The attention mechanism effectively enhances the model's attention to key inputs by dynamically allocating different weights, thereby improving prediction accuracy. By using residual structure skip connections, the vanishing and exploding gradient problems are alleviated. LSTM can effectively capture long-term dependencies in long-term sequences, improving the training efficiency of the model.

[0047] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A milling force prediction system based on a mechanism-data hybrid driven model, which combines LSTM networks and fully connected neural networks, introduces residual connections and incorporates a Self-Attention mechanism as the main network structure to construct a milling force prediction model, characterized in that: Its model architecture specifically includes an input layer, an LSTM temporal feature extraction layer, residual connections, a Self-Attention feature enhancement layer, and a fully connected neural network (FCN) prediction layer.

2. The milling force prediction system based on a mechanism-data hybrid driving model according to claim 1, characterized in that, At the input layer, the input features include: mechanistic features, process parameters, and time-series data; after standardization, all features form a multi-dimensional time-series input matrix. Among them, the mechanism features are theoretical physical quantities pre-calculated based on the cutting dynamics equations, including instantaneous undeformed chip thickness and cutting force coefficient, which are used to provide physical prior knowledge for the neural network; the process parameters include: spindle speed, feed rate, depth of cut and width of cut; the time series data includes: milling force signals and vibration signals in the sampling time series of historical moments.

3. The milling force prediction system based on a mechanism-data hybrid driving model according to claim 1, characterized in that, In the LSTM temporal feature extraction layer, a two-layer stacked LSTM structure is used, with 128 neurons in each layer. The output of the first LSTM layer serves as the input to the second layer, enhancing the deep extraction of temporal dependencies. The output is the hidden state sequence. 。 4. The milling force prediction system based on a mechanism-data hybrid driving model according to claim 3, characterized in that, Residual connections are introduced into each LSTM layer to prevent gradient vanishing, as shown below: ;in, It is the first The LSTM output of the layer; It is the output of the previous LSTM layer.

5. A milling force prediction system based on a mechanism-data hybrid driving model according to claim 4, characterized in that, The Self-Attention feature enhancement layer follows the LSTM temporal feature extraction layer and is used to redistribute the weights of temporal features, enhancing the model's sensitivity to changes in milling force during key machining stages. Therefore, the input to the Self-Attention layer is the sequence of hidden states output by the LSTM. The linear transformation yields the Query, Key, and Value, as shown below: ;in, The weight matrix is ​​trainable; the weights for each time step are calculated using a multi-head self-attention mechanism to highlight key processing moments, and the output is a weighted feature representation, as shown below: ;in, This is the scaling factor; The dimension of the key vector Key is used to scale the dot product result and prevent gradient vanishing.

6. The milling force prediction system based on a mechanism-data hybrid driving model according to claim 1, characterized in that, The fully connected neural network prediction layer uses a three-layer fully connected structure with 64, 32, and 1 neurons respectively; the first two layers use the ReLU activation function, and the last layer linearly outputs the predicted milling force value. 。