Bidirectional milling force prediction method and system
By constructing a neural network model based on CNN-ResNet and using the current signal characteristics to predict the milling force, the problem of inaccurate prediction of bidirectional milling force in the existing technology is solved, and high-precision monitoring and analysis of the milling force is achieved.
Patent Information
- Application Number
- CN202411189320.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-08-28
AI Technical Summary
Existing milling force monitoring methods mainly focus on the prediction of the resultant force, which makes it difficult to accurately predict the bidirectional milling force, affecting the tool life and machining quality analysis.
By acquiring the tool spindle current and milling force data of the workpiece at different speeds, a neural network model is constructed using the CNN-ResNet deep learning algorithm to extract the time domain, frequency domain and time-frequency domain features of the current signal, screen out features with high stability, strong sensitivity and high correlation, and establish a mapping relationship between the current signal and the bidirectional milling force.
It achieves accurate prediction of the milling forces Fx and Fy along and perpendicular to the feed direction, improves the accuracy of cutting state analysis and tool wear monitoring, and is suitable for complex cutting conditions and material changes.
Smart Images

Figure CN119077436B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a prediction method and system, and in particular to a bidirectional milling force prediction method and system. Background Art
[0002] Milling force is a key parameter in machine tool design and process optimization, reflecting the interaction between the tool and the workpiece during machining. Milling force not only encompasses the cutting load but also includes information such as tool condition, machining quality, and chatter. Accurate milling force monitoring can directly impact tool life, vibration stability, cutting deformation, thermal effects, and machined surface quality. It directly reflects changes in the machine tool's machining state and is of great significance to the research of adaptive control technologies for CNC machine tools.
[0003] Effectively monitoring milling forces is key to accurately reflecting the machining status of machine tools. Currently, there are two main methods for monitoring milling forces: direct monitoring, which typically uses dedicated force sensors to directly measure the forces in the cutting area. This allows for real-time acquisition of high-precision cutting force data, helping to adjust machining parameters and ensure machining quality. However, this method is costly and complex to install. Indirect monitoring, however, infers cutting forces by analyzing vibration, power, or current signals. Vibration signal analysis utilizes vibration sensors to reflect dynamic changes during the cutting process in real time, but data analysis is complex due to the influence of the vibration characteristics of the machine tool structure. Power signal analysis indirectly infers cutting forces through changes in motor power. While widely applicable, it has a slow response speed and limited accuracy. Furthermore, most existing monitoring and prediction models can only predict the resultant cutting force, making it difficult to accurately predict bidirectional milling forces. Summary of the Invention
[0004] Objective of the invention: The first objective of the present invention is to provide a method for predicting bidirectional milling force that can predict bidirectional milling force more accurately.
[0005] A second object of the present invention is to provide a bidirectional milling force prediction system.
[0006] Technical solution: The present invention discloses a bidirectional milling force prediction method, comprising the following steps:
[0007] The experiment obtains the tool spindle current and milling force data sets when the same workpiece is milled at two or more different speeds; the current and milling force data sets include the equivalent DC current I rms , bidirectional milling force F x and F y , where F x and F y The cutting force F pointing to the instantaneous cutting direction t Decomposed, and F x and Fy The directions are respectively along the milling feed direction and perpendicular to the milling feed direction;
[0008] The time domain, frequency domain, and time-frequency domain features of the current signal in the current and milling force datasets are extracted. Based on the stability of the current features, the sensitivity of the current features to the rotational speed, and the correlation between the current features and the milling force, the current features that meet the preset conditions are selected to form a target feature matrix.
[0009] Build a neural network model based on the CNN-ResNet deep learning algorithm;
[0010] The data contained in the target feature matrix is divided into a training set and a validation set. The training set is used to train the neural network model to obtain a preliminary model. The validation set is imported, and the preliminary model is used to calculate the loss value. Then, backpropagation and parameter updates are performed until the loss function value is minimized and stabilized. The iteration is stopped to obtain the final prediction model for predicting bidirectional milling force.
[0011] The target characteristic matrix of the tool spindle current of the milling force to be monitored is obtained and input into the prediction model to predict the bidirectional milling force.
[0012] Furthermore, before extracting the time domain, frequency domain and time-frequency domain features of the current signal, the current data in the current and milling force data sets are subjected to wavelet denoising, and the cutting-in and cutting-out parts of the milling force data in the current and milling force data sets are removed, and the signal data of the stable milling stage are retained.
[0013] Furthermore, the workpiece is composed of two different materials; the steps of obtaining the current and milling force data sets are as follows:
[0014] The tool first idles on one side of the workpiece, then moves along the length of the workpiece and mills two different materials in succession;
[0015] The tool performs the aforementioned milling operation at different rotational speeds;
[0016] The milling operation at the same speed is repeated multiple times, and the current and milling force data obtained from the milling operation at the same speed constitute a data group;
[0017] All data sets obtained at different rotational speeds constitute the current and milling force data sets.
[0018] Furthermore, the time domain, frequency domain and time-frequency domain features of the current signal in the current and milling force data set are extracted, including each I rms Multiple features in idling state, milling carbon steel state, and milling aluminum alloy state.
[0019] Furthermore, the multiple features include maximum value, minimum value, average value, peak-to-peak value, absolute mean value, variance, standard deviation, root mean square value, root square amplitude, skewness index, kurtosis index, form factor, peak factor, pulse factor, margin factor, center of gravity frequency, mean square frequency, root mean square frequency, frequency variance and 8-layer wavelet decomposition. All the extracted features constitute the current signal feature M C0 .
[0020] Furthermore, the stability of the current characteristic is determined by the milling state and the milling speed, and the current signal characteristic M is used as the variable. C0 As an evaluation index, the calculation formula and screening method of stability are as follows:
[0021] Solve the experimental characteristic dispersion coefficient c of each data group separately v , the calculation formula is as follows:
[0022] c v =σ fea / μfea
[0023] Among them, σ fea and μ fea are the standard deviation and mean of the same feature in multiple milling at the same speed,
[0024] According to the calculated experimental characteristic dispersion coefficient c v As a result, the threshold is set and the experimental characteristic dispersion coefficient c v Features below the threshold are constructed into a feature matrix M C1 .
[0025] Furthermore, the sensitivity of the current characteristic to the rotational speed is used to characterize the characteristic current signal characteristic M C0 Response to speed changes, sensitivity Var i The calculation formula and screening method are as follows:
[0026]
[0027] Among them, μ i is the characteristic average value of the i-th data group; n i is the rotation speed of the i-th data group;
[0028] The features that are highly sensitive to the changes in milling force are recorded as the feature matrix M C2 .
[0029] Furthermore, the correlation between the current characteristics and the milling force is screened as follows:
[0030] Take the feature matrix M C1 and the feature matrix M C2 The intersection of C3 ;
[0031] Calculate F separately x and F y The average value of the feature matrix M C3 With F x The mean and F y The mean values of M were analyzed by Pearson correlation. C3 Medium milling force F x and F y The features with correlation greater than 0.8 are recorded as the target feature matrix.
[0032] Furthermore, the neural network model includes a convolutional layer of a CNN and a ResNet residual block.
[0033] Based on the same inventive concept, the present invention also discloses a bidirectional milling force prediction system, comprising:
[0034] A data acquisition module is used to obtain tool spindle current and milling force data sets when the same workpiece is milled at two or more different speeds;
[0035] A preprocessing module is used to perform wavelet denoising on the current signal in the current and milling force data sets, remove the cutting-in and cutting-out parts of the milling force data in the current and milling force data sets, and retain the signal data of the stable milling stage;
[0036] Feature extraction module, used to extract the time domain, frequency domain and time-frequency domain features of the current signal in the current and milling force datasets;
[0037] The feature screening module selects the current features that meet the preset conditions to form a target feature matrix based on the stability of the current features, the sensitivity of the current features to the rotational speed, and the correlation between the current features and the milling force;
[0038] The initial module is used to build a neural network model based on the CNN-ResNet deep learning algorithm;
[0039] The training module divides the data contained in the target feature matrix into a training set and a validation set, and uses the training set to train the neural network model to obtain a preliminary model; the validation set is imported, the preliminary model is used to calculate the loss value, and then backpropagation and parameter updates are performed until the loss function value is minimized and tends to be stable. The iteration stops and the final prediction model for predicting bidirectional milling force is obtained;
[0040] An input module, for inputting a target characteristic matrix of a tool spindle current of a milling force to be monitored into a prediction model;
[0041] The output module is used to output the bidirectional milling force predicted by the prediction model.
[0042] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: the present invention can predict the bidirectional milling force F along the feed direction and perpendicular to the feed direction x and F y Compared with only being able to predict the resultant milling force, the bidirectional milling force is more useful for cutting state analysis or tool wear state monitoring; the present invention utilizes feature analysis to screen features with high stability, high sensitivity to the milling force, and high correlation with the milling force, establishes a current signal feature matrix, and establishes a mapping relationship between the current signal feature matrix and the bidirectional milling force through the CNN-ResNet deep learning network to verify the accuracy of the current-based milling force monitoring, thereby realizing the intelligent monitoring of the bidirectional milling force based on the current, and the accuracy of the prediction monitoring is high; the workpiece of the experiment of the present invention is composed of two materials, so that the prediction model of the present invention can be applied to complex cutting conditions and material changes, and has strong versatility. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a flow chart of the method of the present invention;
[0044] Figure 2 The power transmission chain from the motor to the tool in the present invention;
[0045] Figure 3 This is the design drawing of the experimental workpiece material in the present invention;
[0046] Figure 4 This is a diagram of the experimental platform in the present invention;
[0047] Figure 5 This is a diagram analyzing the stability of current characteristics in the present invention;
[0048] Figure 6 is the ratio of the characteristics of the milling forces Fx and Fy to the rotational speed under different cutting materials in the present invention;
[0049] Figure 7 This is the sensitivity analysis of the current characteristics to the rotation speed in the present invention;
[0050] Figure 8 is a correlation diagram between current characteristics and milling force in the present invention;
[0051] Figure 9 Flowchart of the CNN-ResNet algorithm in the present invention;
[0052] Figure 10 Graphs for training and testing loss of the CNN-ResNet model in this invention;
[0053] Figure 11 The milling force prediction results of different algorithms in the present invention for the milling material of carbon steel (0.45% C) are shown;
[0054] Figure 12 The milling force prediction results of different algorithms in the present invention for the milling material being aluminum alloy (7050);
[0055] Figure 13 Schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION
[0056] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0057] Example 1
[0058] In order to predict the milling force through current, the theoretical relationship between the milling force and the motor spindle current is first established: the power transmission chain from the motor to the tool is as follows: Figure 2 As shown in the figure, the original power comes from the spindle motor, and then is transmitted to the tool through the gear box and the machine tool spindle. During the transmission process, the original power motor torque T is decomposed into cutting torque T q , friction torque T f and moment of inertia T J The power consumed. The current I measured in the U, V, and W three-phase wires of the input spindle motor u , I v , I w Convert to equivalent DC current I rms Utilize I rms Predicted cutting force F t (F x and F y The combined force of Figure 2 As shown, edge 1, edge 2, edge 3 and edge 4 represent the four cutting edges of the tool respectively.
[0059] During milling operation, the current I measured in the U, V, and W three-phase lines of the input spindle motor is u , I v , I w Convert to equivalent DC current I rms , the three-phase current of the motor is described as follows:
[0060]
[0061] Among them, I u , I v , I w are the phase currents of U, V, and W respectively; I m 、ω i are the amplitude and angular frequency of the three-phase current respectively;
[0062] Equivalent DC current I rms The solution is as follows:
[0063]
[0064] Repeat the above steps to calculate the equivalent DC current I of the motor in idling state rms0 .
[0065] Establish the theoretical relationship between milling force and spindle current:
[0066] According to the principle of conservation of momentum:
[0067] T=T f +T J +T q (3)
[0068] Among them, T is the motor torque, representing the original power;
[0069] Cutting torque T q Proportional to the cutting force, that is, T q =F t ·r, where r is the tool radius, F t is the cutting force pointing to the instantaneous cutting direction; cutting force F t The change of cutting torque T q The change of affects the motor torque T; therefore, in theory, the motor torque T can be used to calculate the cutting force F. t predictions.
[0070] Therefore, equation (3) can be expressed in another form:
[0071]
[0072] Where K is the motor torque constant, T f =KI rms0 , T J Depends on the inertia of the transmission system J, T J =J(dw / dt), w is the speed of the spindle motor, t is the time. So far, the relationship between input current and cutting force has been established.
[0073] Considering that the spindle speed is constant during the milling process, that is, dw / dt=0, T J =J(dw / dt)=0. Equation (4) can be further deduced as:
[0074] KI rms =KI rms0 +rF t (5)
[0075] It can be expressed in another form:
[0076] F t =KI rms / r-KI rms0 / r(6)
[0077] Now, we can use equation (6) to calculate the equivalent DC current of the spindle motor I rms To predict the cutting force F t , I rms0 , K and r are all constants, indicating that F t and I rms There is a linear relationship between them; however, there are two problems with equation (6). On the one hand, in practical applications, F t and I rms There is no simple linear relationship between them, because the friction torque T f It may change with the increase of spindle speed, that is, K is no longer a constant. Therefore, the cutting force F cannot be accurately predicted using equation (6) t On the other hand, equation (6) can only predict their resultant force F t , but cannot predict F separately x and F y , so along the milling feed direction F x and bidirectional milling force F perpendicular to the feed direction y It is more useful for cutting condition analysis or tool wear condition monitoring.
[0078] Therefore, the present invention provides a bidirectional milling force prediction method, such as Figure 1 As shown, the following steps are included:
[0079] The experiment obtains the tool spindle current and milling force data sets when the same workpiece is milled at two or more different speeds. The current and milling force data sets include the equivalent DC current I rms , bidirectional milling force F x and F y , where F x and F y The cutting force F pointing to the instantaneous cutting direction t Decomposed, and F x and F y The directions are along the milling feed direction and perpendicular to the milling feed direction respectively; the experimental workpiece is composed of two different materials, such as Figure 3 As shown, half of the workpiece materials in this experiment are carbon steel (0.45% C) and the other half are aluminum alloy (7050); the steps for obtaining the current and milling force data sets are as follows: the tool first idles on one side of the workpiece, and then the tool moves along the length of the workpiece and mills the carbon steel and aluminum alloy in sequence; the tool performs the aforementioned milling operation at different rotational speeds; the milling operation at the same rotational speed is repeated multiple times, and the current and milling force data obtained from the milling operation at the same rotational speed constitute a data set; all data sets obtained at different rotational speeds constitute the current and milling force data set. In this embodiment, as Figure 4As shown, the experiment used a DX-650 high-speed CNC milling machine. The cutting tool was a four-flute carbide vertical milling cutter with a diameter of 6mm and a helix angle of 48 degrees. Down-milling was performed dry. The force signal was measured using a Kistler 9119AA2 force sensor, and the current signal was measured using a CPL8100B current probe and a DL950 oscilloscope. The sampling frequency of all signals was 50kHz. Milling operations were performed at four different speeds, with the same speed repeated 10 times. The four data sets obtained were labeled T1, T2, T3, and T4. The data sets for T1-T4 are shown in Table 1 below:
[0080] Table 1
[0081]
[0082]
[0083] In Table 1, n refers to the motor's spindle speed, RPM refers to the motor's spindle speed unit (rotation per minute), and v f Refers to the tool feed speed, a e Refers to the cutting width, a p Refers to the depth of cut. The current and milling force data sets were processed: the current signal was subjected to wavelet denoising, using the wavelet basis db and a decomposition level of 4 to obtain the current time-domain monitoring signal. For the milling force signal, the cut-in and cut-out portions were removed from the acquired signal, retaining the signal during the stable milling phase to obtain the cutting force time-domain monitoring signal.
[0084] A theoretical milling force prediction model based on experimental data is constructed. The milling force prediction model based on this theoretical model uses the experimental data of T1-T4 to substitute into equation (6), and after linear fitting, the following results are obtained:
[0085] F t =1.099 6 (I rms -I rms0 ) 3 -1.754 6 (I rms -I rms0 ) 2 +9.315 5 (I rms -I rms0 )-1.646(7)
[0086] The result is not a strict linear polynomial relationship, which verifies that the theoretical relationship between milling force and motor spindle current, equation (6), cannot accurately predict the cutting force F. tThis may be because during the milling process, the tool may experience different degrees of runout, which leads to dynamic changes in the milling radial force and affects the friction torque. Therefore, this equation cannot accurately represent the mathematical relationship between the spindle current and the cutting force. t Perpendicular to the tool axis plane, it can be decomposed into F x and F y , along the milling feed direction F x and bidirectional milling force F perpendicular to the feed direction y It is more useful for machining status analysis or tool wear monitoring, so pay attention to the spindle current and F x and F y The relationship between them is more meaningful.
[0087] Extract the time domain, frequency domain and time-frequency domain features of the current signal in the current and milling force dataset. According to the stability of the current feature, the sensitivity of the current feature to the rotation speed, and the correlation between the current feature and the milling force, select the current features that meet the preset conditions to form the target feature matrix. Extract the time domain, frequency domain and time-frequency domain features of the current signal in the current and milling force dataset. rms The maximum value, minimum value, average value, peak-to-peak value, absolute mean value, variance, standard deviation, root mean square value, root square amplitude, skewness index, kurtosis index, form factor, peak factor, pulse factor, margin factor, center of gravity frequency, mean square frequency, root mean square frequency, frequency variance and 8-layer wavelet decomposition in the idling state, milling carbon steel state and milling aluminum alloy state, respectively, a total of 81 features, all the extracted features constitute the current signal feature M C0 , current signal characteristics M C0 I used to represent 40 samples rms All 81 features, current signal feature M C0 The structure is as follows:
[0088]
[0089] Among them, F 1_K1 Refers to when the motor is in idling state I rms Feature 1 of sample 1; F 1_S1 When the workpiece material is carbon steel rms Feature 1 of sample 1; F 1_A1 When the workpiece material is aluminum alloy rms Feature 1 of sample 1; F 27_K40 Refers to when the motor is in idling state I rms Features 27 of sample 40; F 27_S40 When the workpiece material is carbon steel rms Features 27 of sample 40; F 27_A40 When the workpiece material is aluminum alloy rmsFeatures 27 of sample 40.
[0090] The stability of the current characteristics is determined by the milling state and milling speed as variables, and the current signal characteristics M C0 As an evaluation index, the calculation formula and screening method of stability are as follows:
[0091] Solve the experimental characteristic dispersion coefficient c of ten cuttings of T1, T2, T3 and T4 respectively v , the calculation formula is as follows:
[0092] c v =σ fea / μfea
[0093] Among them, σ fea and μ fea are the standard deviation and mean of the same feature in multiple millings at the same speed;
[0094] According to the calculated experimental characteristic dispersion coefficient c v As a result, the threshold is set and the experimental characteristic dispersion coefficient c v Features below the threshold are constructed into a feature matrix M C1 , that is, the experimental characteristic dispersion coefficient c v The characteristics below the threshold are defined as characteristics that are not affected by the rotational speed. Preferably, the threshold can be set according to the actual situation. In this embodiment, the threshold is set to 0.1; Figure 5 As shown, Figure 5(a), 5(b), 5(c) and 5(d) show the results of the coefficient of dispersion of 27 features for the T1, T2, T3 and T4 experiments, respectively, where feature 1 represents the maximum value feature, feature 2 represents the minimum value feature, feature 3 represents the average value feature, feature 4 represents the peak-to-peak value feature, feature 5 represents the absolute mean feature, feature 6 represents the variance feature, feature 7 represents the standard deviation feature, feature 8 represents the root mean square value feature, feature 9 represents the root mean square amplitude feature, feature 10 represents the skewness index feature, feature 11 represents the kurtosis index feature, and feature 12 represents the waveform factor feature. Feature 13 represents the peak factor feature, feature 14 represents the pulse factor feature, feature 15 represents the margin factor feature, feature 16 represents the center of gravity frequency feature, feature 17 represents the mean square frequency feature, feature 18 represents the root mean square frequency feature, feature 19 represents the frequency variance feature, and features 20-27 represent the features of the 1st-8th layers of the wavelet decomposition. The calculation results of the discrete coefficient show that the discrete coefficients of the same features are basically the same under different milling materials. At different speeds, the discrete coefficients of features 1, 3-16, and 20 are less than 0.1, indicating that these features are not affected by speed. It can be seen that the maximum value, average value, peak-to-peak value, absolute mean, variance, standard deviation, root mean square value, root mean square amplitude, skewness index, kurtosis index, form factor, peak factor, pulse factor, margin factor, center of gravity frequency, and the first layer subband of the wavelet decomposition are highly stable.
[0095] The obtained feature matrix M C1 for:
[0096]
[0097] The sensitivity of current characteristics to speed is used to characterize the characteristic current signal characteristics M C0 Response to speed changes, sensitivity Var i The calculation formula and screening method are as follows:
[0098]
[0099] Among them, μ i is the characteristic average value of the i-th data group; n i is the rotation speed of the i-th data group;
[0100] The characteristics that change with the change of milling force are recorded as the characteristic matrix M C2 , during the cutting process, F x and F y The change of is consistent with the change of the speed ratio, which means that the milling force F x and F y The magnitude of is positively correlated with the change of spindle speed, that is, its characteristic is defined as a characteristic that is highly sensitive to the change of milling force; Figure 6As shown, the milling force F under different milling materials is shown x and F y The ratio of the change in the spindle speed to the change in the spindle speed is Figure 6 It can be seen from the figure that when the cutting material is carbon steel, F x The change of is consistent with the change of the speed ratio, indicating that the milling force F x The magnitude of F is positively correlated with the change of spindle speed; however, y No consistent changes were shown, therefore, this rule does not apply when the workpiece material is aluminum alloy.
[0101] The characteristic changes between different materials are consistent, increasing or decreasing with the increase of rotation speed, such as Figure 7 As shown in the figure, the horizontal axes 1, 2, and 3 represent the T1-T2 test group, the T2-T3 test group, and the T3-T4 test group, respectively, and feai refers to feature i. rms The characteristics of: mean value, absolute mean value, variance, standard deviation, root mean square value, root square amplitude, skewness index, kurtosis index, shape factor, peak factor, pulse factor, margin factor, center of gravity frequency and the first and second sub-bands of wavelet decomposition are highly sensitive to the change of milling force. These characteristics change accordingly with the change of milling force and can be used as the prediction characteristics of milling force, that is, the obtained characteristic matrix M C2 for:
[0102]
[0103] The correlation between current characteristics and milling force is screened as follows:
[0104] Take the feature matrix M C1 and the feature matrix M C2 The intersection of C3 ;
[0105] Calculate F separately x and F y The average value of the feature matrix M C3 With F x The mean and F y The mean values of M were analyzed by Pearson correlation. C3 Medium milling force F x and F y The features with correlation greater than 0.8 are recorded as target feature matrix;
[0106] In this embodiment, the F of 40 samples is calculated. x Mean and F y Average value, such as Figure 8 As shown, Figure 8 When cutting different workpiece materials, the characteristic matrix MC3 and milling force F x Mean and F y Pearson correlation analysis results between mean values. C3 The characteristics of the milling force correlation greater than 0.8 are: average value, absolute average value, root mean square value, root square amplitude, center of gravity frequency and the first layer sub-band of wavelet decomposition, which are recorded as the target feature matrix. rms The feasibility of monitoring the milling force by the target feature matrix. The features included in the target feature matrix are shown in Table 2 below (for the convenience of listing and matrix, the target feature matrix is recorded as feature matrix M C4 ):
[0107] Table 2
[0108]
[0109]
[0110] Construct a neural network model based on the CNN-ResNet deep learning algorithm; the neural network model includes the convolutional layer of CNN and the residual block of ResNet; the core idea of this neural network model is to solve the gradient vanishing or gradient exploding problem in deep networks by introducing residual learning, thereby improving the training efficiency and generalization ability of the model. Figure 9 As shown, Figure 9 The structure of the CNN-ResNet deep learning algorithm is shown. Input features are extracted through the convolutional layers of the CNN. The input data is initially fed into the convolutional layers of the feature extraction section for preliminary processing before being propagated through two structured residual blocks in the ResNet residual block. These residual blocks, incorporating discriminative mapping techniques, effectively facilitate information flow within deep neural networks, helping to alleviate the vanishing gradient problem common in deep learning models. Furthermore, the batch normalization operation integrated into these residual blocks further enhances training stability. By normalizing the outputs of intermediate layers, this ensures efficient gradient propagation during network training. After processing by the residual blocks, data flows to the first fully connected layer of the regression section. This layer transforms the high-level features extracted by the deep network into final output predictions. Through further feature integration and processing at this stage, the model is able to produce accurate predictions based on the input data. This overall process demonstrates the effective mechanism by which deep learning models employ a hierarchical approach to feature extraction and transformation when processing complex data.
[0111] The convolutional layer in the feature extraction section performs preliminary feature extraction on the input data. This layer can be represented by the following convolutional operation formula: z = Dx + b, where z represents the output of the convolutional layer, D and b represent the weights of the convolution kernel and the bias term, respectively, and x represents the current feature matrix.
[0112] The residual block forms a key component of the model and is designed to enable the network to directly learn the residual between the input and output. Each residual block consists of two one-dimensional convolutional layers, each followed by batch normalization and a ReLU activation function. The output of the residual block can be expressed as the following residual learning formula:
[0113] y=F(z,{D j})+z
[0114] Among them, y represents the output of the residual block, and x represents the input. j}) represents the combination of convolution operation and nonlinear activation function, where {D j} represents the weight in the convolutional layer, j represents the index of the weight in the convolutional layer, that is, it represents the jth weight parameter. This architecture helps solve the problem of information transmission in deep networks.
[0115] After each convolution operation, batch normalization is used to stabilize the learning process and accelerate convergence. Batch normalization can be expressed as follows:
[0116]
[0117]
[0118] where m (k) represents the output of the convolutional layer, s (k) represents the output of the batch normalization layer, and E[m (k) ] and Var[m (k) ] denote the mean and variance of the batch data respectively, and τ is a very small number to prevent division by zero. In addition, γ and β are learnable parameters used to recover some information that may be lost during the normalization process.
[0119] After batch normalization, a ReLU activation function is applied to introduce nonlinearity to improve the model's expressiveness. The model is trained using the Adam optimizer and the mean squared error (MSE) loss function. Through the backpropagation algorithm, parameters are adjusted during each training epoch to minimize the difference between the predicted output and the actual label.
[0120] During training, the model parameters were initialized using the Xavier uniform initialization method to ensure the stability of the training process. The model was evaluated on the validation set to test its generalization ability.
[0121] The uniqueness of the method of the present invention is that it can effectively predict the milling force signal without inputting any cutting parameters, relying only on the filtered I rmsFeatures, that is, the target feature matrix. The data contained in the target feature matrix is divided into a training set and a validation set, and the neural network model is trained with the training set to obtain a preliminary model; the validation set is imported, the preliminary model is used to calculate the loss value, and then backpropagation and parameter updates are performed until the loss function value is minimized and tends to be stable, the iteration stops, and the final prediction model for predicting bidirectional milling force is obtained; in this embodiment, first, a target feature matrix is constructed and screened for milling test samples T1, T2, T3 and T4, and the features protected by the target feature matrix constitute a complete data set. After random encoding, the data set is divided into a training set (accounting for 80%) and a validation set (accounting for 20%). Subsequently, the constructed neural network model is trained using the data set obtained from the experiment. As Figure 10 As shown in , the training process is configured to iterate for a maximum of 100 times and it automatically terminates when no further reduction in the iterative loss is observed. To ensure the stability of the model, the training scheme is repeated 5 times. The details of each iteration are shown in Figure 10 (a) to 10(e). The average iteration loss calculated in these 5 training stages is as follows Figure 10 (f) shows the reliability of the model. After optimization, the model can be used to predict the milling force under different spindle speeds and material conditions.
[0122] Verify the accuracy of the prediction model. The steps to verify the accuracy of the prediction model are as follows: use the prediction model, CNN model, RNN model and LSTM model to predict the milling force at the same time, compare the four prediction results with the actual measurement results, and judge the accuracy of the predictions of the four models. In this embodiment, three different models, CNN, RNN and LSTM, are used for comparison. The specific parameters set by the comparison model method are as follows: (1) CNN has two convolutional layers, two maximum pooling layers, one flat layer, two fully connected layers, one input layer and one output layer, and the activation function of the fully connected layer is Relu; (2) RNN has one GRU layer as the input layer, the output layer is a fully connected layer, and the activation function of the output layer is Relu; (3) LSTM has one LSTM layer, two dropout layers, one fully connected layer as the output layer, one input layer, the activation function of the fully connected layer is Relu, the dropout layer is used to prevent overfitting, and the dropout ratio is 0.2; each method is trained at least 5 times to obtain the final prediction result.
[0123] The final prediction results of different models are as follows Figure 11 and Figure 12 The test results show that this method is better than the other three model methods in predicting milling force. When the cutting material is steel, the average F x The prediction accuracy reached 96%, and the average F yThe prediction accuracy reached 90%, demonstrating the method's excellent generalization performance and its ability to effectively capture the force variations during steel milling. Furthermore, the experimental results showed good prediction results for both workpiece materials, demonstrating that the prediction model constructed in this paper is minimally affected by changes in workpiece material.
[0124] When in use, the target characteristic matrix of the tool spindle current of the milling force to be monitored is obtained and input into the prediction model, and the prediction model can output the predicted bidirectional milling force.
[0125] Example 2
[0126] The present invention discloses a bidirectional milling force prediction system, such as Figure 13 As shown, it includes a data acquisition module, a preprocessing module, a feature extraction module, a feature screening module, an initial module and a training module.
[0127] The data acquisition module is used to obtain the tool spindle current and milling force data sets when the same workpiece is milled at two or more different speeds; the current and milling force data sets include the equivalent DC current I rms , bidirectional milling force F x and F y , where F x and F y The cutting force F pointing to the instantaneous cutting direction t Decomposed, and F x and F y The directions are along the milling feed direction and perpendicular to the milling feed direction respectively; the workpiece is composed of two different materials. In this embodiment, half of the workpiece is made of carbon steel and the other half is aluminum alloy. The steps for obtaining the current and milling force data sets are as follows:
[0128] The tool first idles on one side of the workpiece, then moves along the length of the workpiece and mills carbon steel and aluminum alloy in turn;
[0129] The tool performs the aforementioned milling operation at different rotational speeds;
[0130] The milling operation at the same speed is repeated multiple times, and the current and milling force data obtained from the milling operation at the same speed constitute a data group;
[0131] All data sets obtained at different rotational speeds constitute the current and milling force data sets.
[0132] A preprocessing module is used to perform wavelet denoising on the current signal in the current and milling force data sets, remove the cutting-in and cutting-out parts of the milling force data in the current and milling force data sets, and retain the signal data of the stable milling stage;
[0133] The feature extraction module is used to extract the time domain, frequency domain and time-frequency domain features of the current signal in the current and milling force data sets; extracting the time domain, frequency domain and time-frequency domain features of the current signal in the current and milling force data sets includes: extracting each I rms The maximum value, minimum value, average value, peak-to-peak value, absolute mean value, variance, standard deviation, root mean square value, root square amplitude, skewness index, kurtosis index, form factor, peak factor, pulse factor, margin factor, center of gravity frequency, mean square frequency, root mean square frequency, frequency variance and 8-layer wavelet decomposition in the idling state, milling carbon steel state and milling aluminum alloy state respectively. All the extracted features constitute the current signal feature M C0 .
[0134] The feature screening module selects the current features that meet the preset conditions to form a target feature matrix based on the stability of the current features, the sensitivity of the current features to the rotational speed, and the correlation between the current features and the milling force;
[0135] The stability of the current characteristics is determined by the milling state and milling speed as variables, and the current signal characteristics M C0 As an evaluation index, the calculation formula and screening method of stability are as follows:
[0136] Solve the experimental characteristic dispersion coefficient c of each data group separately v , the calculation formula is as follows:
[0137] c v =σ fea / μfea
[0138] Among them, σ fea and μ fea are the standard deviation and mean of the same feature in multiple milling at the same speed,
[0139] According to the calculated experimental characteristic dispersion coefficient c v As a result, the threshold is set and the experimental characteristic dispersion coefficient c v Features below the threshold are constructed into a feature matrix M C1 , that is, the experimental characteristic dispersion coefficient c v Features below the threshold are defined as features not affected by the rotational speed. Preferably, the threshold can be set according to actual conditions. In this embodiment, the threshold is set to 0.1.
[0140] The sensitivity of current characteristics to speed is used to characterize the characteristic current signal characteristics M C0 Response to speed changes, sensitivity Var i The calculation formula and screening method are as follows:
[0141]
[0142] Among them, μi is the characteristic average value of the i-th data group; n i is the rotation speed of the i-th data group;
[0143] The characteristics that change with the change of milling force are recorded as the characteristic matrix M C2 ,During the cutting process, the changes of Fx and Fy are consistent with the changes of the speed ratio, which means that the magnitude of the milling forces Fx and Fy is positively correlated with the changes in the spindle speed, that is, its characteristics are defined as characteristics that are highly sensitive to changes in milling forces.
[0144] The correlation between current characteristics and milling force is screened as follows:
[0145] Take the feature matrix M C1 and the feature matrix M C2 The intersection of C3 ;
[0146] Calculate F separately x and F y The average value of the feature matrix M C3 With F x The mean and F y The mean values of M were analyzed by Pearson correlation. C3 Medium milling force F x and F y The features with correlation greater than 0.8 are recorded as the target feature matrix.
[0147] The initial module is used to build a neural network model based on the CNN-ResNet deep learning algorithm. The neural network model includes the convolutional layer of CNN and the residual block of ResNet. The core idea of this neural network model is to solve the gradient vanishing or gradient exploding problem in deep networks by introducing residual learning, thereby improving the training efficiency and generalization ability of the model. Figure 9 As shown, Figure 9The structure of the CNN-ResNet deep learning algorithm is shown. Input features are extracted through the convolutional layers of the CNN. The input data is initially fed into the feature extraction layer for preliminary processing, and then propagated through two structured residual blocks in the ResNet residual block. These residual blocks, incorporating discriminative mapping techniques, effectively facilitate information flow within deep neural networks, helping to alleviate the vanishing gradient problem common in deep learning models. Furthermore, the batch normalization operation integrated into these residual blocks further enhances the stability of the training process. By normalizing the outputs of intermediate layers, this ensures efficient gradient propagation during network training. After processing by the residual blocks, the data flows to the first fully connected layer in the regression layer. This layer transforms the high-level features extracted by the deep network into final output predictions. Through further feature integration and processing at this stage, the model is able to produce accurate predictions based on the input data. This overall process demonstrates the effective mechanism of deep learning models using a hierarchical approach to feature extraction and transformation when processing complex data.
[0148] The primary convolutional layer in the feature extraction section performs preliminary feature extraction on the input data. This layer can be represented by the following convolutional operation formula: z = Dx + b, where z represents the output of the convolutional layer, D and b represent the weights of the convolution kernel and the bias term, respectively, and x represents the current feature matrix.
[0149] The residual block forms a key component of the model and is designed to enable the network to directly learn the residual between the input and output. Each residual block consists of two one-dimensional convolutional layers, each followed by batch normalization and a ReLU activation function. The output of the residual block can be expressed as the following residual learning formula:
[0150] y=F(z,{D j})+z
[0151] Where y represents the output of the residual block and x represents the input. j}) represents the combination of convolution operation and nonlinear activation function, where {D j} represents the weight in the convolutional layer, j represents the index of the weight in the convolutional layer, that is, it represents the jth weight parameter. This architecture helps solve the problem of information transmission in deep networks.
[0152] After each convolution operation, batch normalization is used to stabilize the learning process and accelerate convergence. Batch normalization can be expressed as follows:
[0153]
[0154] where m (k) represents the output of the convolutional layer, s (k)represents the output of the batch normalization layer, and E[m (k) ] and Var[m (k) ] denote the mean and variance of the batch data respectively, and τ is a very small number to prevent division by zero. In addition, γ and β are learnable parameters used to recover some information that may be lost during the normalization process.
[0155] After batch normalization, a ReLU activation function is applied to introduce nonlinearity to improve the model's expressiveness. The model is trained using the Adam optimizer and the mean squared error (MSE) loss function. Through the backpropagation algorithm, parameters are adjusted during each training epoch to minimize the difference between the predicted output and the actual label.
[0156] During training, the model parameters were initialized using the Xavier uniform initialization method to ensure the stability of the training process. The model was evaluated on the validation set to test its generalization ability.
[0157] The training module divides the data contained in the target feature matrix into a training set and a validation set, and uses the training set to train the neural network model to obtain a preliminary model; imports the validation set, uses the preliminary model, calculates the loss value, and then performs backpropagation and parameter updates until the loss function value is minimized and tends to be stable, the iteration stops, and the final prediction model for predicting bidirectional milling force is obtained.
[0158] The input module is used to input the target characteristic matrix of the tool spindle current of the milling force to be monitored into the prediction model.
[0159] The output module is used to output the bidirectional milling force predicted by the prediction model.
[0160] In order to further verify the accuracy of the prediction model, the prediction model, CNN model, RNN model and LSTM model were used to predict the milling force at the same time. The four prediction results were compared with the actual measurement results to evaluate the accuracy of the predictions of the four models.
Claims
1. A bidirectional milling force prediction method, characterized by: The following steps are involved: The experiment obtains the tool spindle current and milling force data sets when the same workpiece is milled at two or more different speeds; The current and milling force data sets include the equivalent DC current I rms , bidirectional milling force F x and F y , where F x and F y The cutting force F pointing to the instantaneous cutting direction t Decomposed, and F x and F y The directions are along the milling feed direction and perpendicular to the milling feed direction respectively; the workpiece is composed of two different materials; the steps of obtaining the current and milling force data sets are as follows: The tool first idles on one side of the workpiece, then moves along the length of the workpiece and mills two different materials in succession; The tool performs the aforementioned milling operation at different rotational speeds; The milling operation at the same speed is repeated multiple times, and the current and milling force data obtained from the milling operation at the same speed constitute a data group; All data sets obtained at different rotational speeds constitute the current and milling force datasets; The time domain, frequency domain, and time-frequency domain features of the current signal in the current and milling force datasets are extracted. Based on the stability of the current features, the sensitivity of the current features to the rotational speed, and the correlation between the current features and the milling force, the current features that meet the preset conditions are selected to form a target feature matrix. The time domain, frequency domain and time-frequency domain features of the current signal in the current and milling force dataset are extracted, including each I rms Multiple features in the idling state, the milling carbon steel state, and the milling aluminum alloy state respectively; the multiple features include maximum value, minimum value, average value, peak-to-peak value, absolute mean value, variance, standard deviation, root mean square value, root square amplitude, skewness index, kurtosis index, form factor, peak factor, pulse factor, margin factor, center of gravity frequency, mean square frequency, root mean square frequency, frequency variance, and 8-layer wavelet decomposition. All the extracted features constitute the current signal feature M C0 ; in The stability of the current characteristics is determined by the milling state and milling speed as variables, and the current signal characteristics M C0 As an evaluation index, the calculation formula and screening method of stability are as follows: Solve the experimental characteristic dispersion coefficient c of each data group separately v , the calculation formula is as follows: c v =s fea / μfea Among them, σ fea and μ fea are the standard deviation and mean of the same feature in multiple milling at the same speed, According to the calculated experimental characteristic dispersion coefficient c v As a result, the threshold is set and the experimental characteristic dispersion coefficient c v Features below the threshold are constructed into a feature matrix M C1 ; The sensitivity of the current characteristic to the rotational speed is used to characterize the characteristic current signal characteristic M C0 Response to speed changes, sensitivity Var i The calculation formula and screening method are as follows: Among them, μ i is the characteristic average value of the i-th data group; n i is the rotation speed of the i-th data group; The features that are highly sensitive to the changes in milling force are recorded as the feature matrix M C2 ; The correlation between current characteristics and milling force is screened as follows: Take the feature matrix M C1 and the feature matrix M C2 The intersection of the two forms the characteristic matrix M C3 ; Calculate F separately x and F y The average value of the feature matrix M C3 With F x The mean and F y The mean values of M were subjected to Pearson correlation analysis. C3 Medium milling force F x and F y The features with correlation greater than 0.8 are recorded as target feature matrix; Build a neural network model based on the CNN-ResNet deep learning algorithm; the neural network model includes the convolutional layer of CNN and the residual block of ResNet; The data contained in the target feature matrix is divided into a training set and a validation set. The training set is used to train the neural network model to obtain a preliminary model. The validation set is imported, and the preliminary model is used to calculate the loss value. Then, backpropagation and parameter updates are performed until the loss function value is minimized and stabilized. The iteration is stopped to obtain the final prediction model for predicting bidirectional milling force. The target characteristic matrix of the tool spindle current of the milling force to be monitored is obtained and input into the prediction model to predict the bidirectional milling force.
2. The bidirectional milling force prediction method according to claim 1, characterized in that: Before extracting the time domain, frequency domain and time-frequency domain features of the current signal, the current data in the current and milling force data sets are subjected to wavelet denoising. For the milling force data in the current and milling force data sets, the cutting-in and cutting-out parts are removed and the signal data in the stable milling stage is retained.
3. A prediction system for the bidirectional milling force prediction method according to claim 1 or 2, characterized in that: include, A data acquisition module is used to obtain tool spindle current and milling force data sets when the same workpiece is milled at two or more different speeds; A preprocessing module is used to perform wavelet denoising on the current signal in the current and milling force data sets, remove the cutting-in and cutting-out parts of the milling force data in the current and milling force data sets, and retain the signal data of the stable milling stage; Feature extraction module, used to extract the time domain, frequency domain and time-frequency domain features of the current signal in the current and milling force datasets; The feature screening module selects the current features that meet the preset conditions to form a target feature matrix based on the stability of the current features, the sensitivity of the current features to the rotational speed, and the correlation between the current features and the milling force; The initial module is used to build a neural network model based on the CNN-ResNet deep learning algorithm; The training module divides the data contained in the target feature matrix into a training set and a validation set, and uses the training set to train the neural network model to obtain a preliminary model; the validation set is imported, the preliminary model is used to calculate the loss value, and then backpropagation and parameter updates are performed until the loss function value is minimized and tends to be stable. The iteration stops and the final prediction model for predicting bidirectional milling force is obtained; An input module, for inputting a target characteristic matrix of a tool spindle current of a milling force to be monitored into a prediction model; The output module is used to output the bidirectional milling force predicted by the prediction model.
Citation Information
Patent Citations
Cutting force coefficient identification method based on numerical control machine tool main shaft and servo shaft power
CN106094730A
Monitoring method for machine tool cutter state
CN111113150A
Cited By
Milling force prediction method of machine tool current data driving simulation model
CN122165237A