TC4 titanium alloy high-speed milling surface roughness modeling method based on LightGBM-NN algorithm

By using the LightGBM-NN algorithm combined with static and dynamic data for feature selection and model training in TC4 titanium alloy milling, the problem of severe tool wear during the milling process is solved, and the accurate modeling and prediction of surface roughness is achieved, which improves the Processing quality and efficiency.

CN119442869APending Publication Date: 2025-02-14FUZHOU UNIV ZHICHENG COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411484325.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

During the milling process of TC4 titanium alloy, the tool wears severely, affecting the processing quality, and it is difficult for the existing technology to effectively predict and optimize the milling surface roughness.

Method used

Using a method based on LightGBM-NN algorithm, combined with static data (such as milling speed, feed speed) and dynamic signals (such as vibration signals, electrical signals) of TC4 titanium alloy milling, feature selection and model training are carried out to establish TC4 high-speed milling surface Roughness model.

Benefits of technology

Accurate modeling and prediction of the surface roughness of high-speed milling of TC4 titanium alloy is achieved, and the processing quality and efficiency are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442869A_ABST
    Figure CN119442869A_ABST
Patent Text Reader

Abstract

The invention relates to a TC4 titanium alloy high-speed milling surface roughness modeling method based on a LightGBM-NN algorithm, and belongs to the field of production and manufacturing. According to the method, TC4 titanium alloy milling static data (milling speed, feeding speed, axial cutting depth and radial cutting depth) and dynamic signals (vibration signals and electric signals) are combined to serve as a data set of a training model, and a Light GBM-NN algorithm with feature selection capacity is provided to establish a TC4 high-speed milling surface roughness model. The TC4 titanium alloy high-speed milling surface roughness modeling method can realize TC4 titanium alloy high-speed milling surface roughness modeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of manufacturing, and specifically relates to a TC4 titanium alloy high-speed milling surface roughness modeling method based on the LightGBM-NN algorithm. Background Art

[0002] TC4 titanium alloy (Ti-6Al-4V) has become an indispensable structural material in the modern aerospace industry due to its excellent properties such as high specific strength, good heat resistance and corrosion resistance, and has also been widely used in shipbuilding, chemical industry, metallurgy, and medical treatment.

[0003] At present, the processing of aviation titanium alloy structural parts is mainly based on milling. When milling TC4 titanium alloy, due to the effect of cyclic thermal loads during the processing, the chips and the blade are easy to stick together, the tool wear is serious, and the processing quality is affected. At present, machine learning methods have been widely used in the field of mechanical processing predictive modeling. Compared with theoretical physics modeling methods, machine learning methods have significant advantages. First, machine learning methods are not limited to strict theoretical physics assumptions and can directly learn and build models from a large amount of actual data, so they are more flexible. Secondly, machine learning methods can handle complex nonlinear relationships and high-dimensional data, so as to more comprehensively explore the complex interactions between parameters. In addition, machine learning methods have strong generalization capabilities and can adapt to new data and different scenarios. Application, so they can achieve good results in different processes and materials. Finally, machine learning methods can usually train models and make predictions in a relatively short time, which greatly improves the efficiency of modeling and optimization. At the same time, during the TC4 milling process, many dynamic signals such as electrical signals and vibration signals are also generated. Such data is also closely related to the TC4 processing quality. By comprehensively analyzing these static and dynamic parameters, sufficient data support can be provided during the machine learning model training process, enabling the model to more accurately predict the results of the milling process. Summary of the invention

[0004] The purpose of the present invention is to provide a TC4 titanium alloy high-speed milling surface roughness modeling method based on the LightGBM-NN algorithm. This method combines the static data of TC4 titanium alloy milling (milling speed, feed speed, axial cutting depth, radial cutting depth) with dynamic signals (vibration signals, electrical signals) as the data set for training the model, and proposes a LightGBM-NN algorithm with feature selection capability to establish a TC4 high-speed milling surface roughness model.

[0005] To achieve the above-mentioned purpose, the technical solution of the present invention is: a TC4 titanium alloy high-speed milling surface roughness modeling method based on the LightGBM-NN algorithm, which combines the static data of TC4 titanium alloy milling with the dynamic signal as the data set for the training model, and proposes a LightGBM-NN algorithm with feature selection capability to establish a TC4 high-speed milling surface roughness model.

[0006] The method comprises the following steps:

[0007] Step S1, using static data, i.e., milling speed, feed speed, axial cutting depth, and radial cutting depth as variables, constructing an experimental scheme, collecting electrical signals and vibration signals of the milling process during the experiment, and measuring the milling surface roughness of the titanium alloy after the experiment is completed;

[0008] Step S2, extracting the time domain features of the electrical signal and the vibration signal, and combining them with the static data to construct a data set for training the LightGBM-NN algorithm;

[0009] Step S3: Use the LightGBM algorithm to select features by calculating the importance score I of each feature. j , sort all features;

[0010] Step S4: Use the optimized features in step S3 as the input of the NN algorithm and the surface roughness of the titanium alloy milling as the output to construct a surface roughness model of titanium alloy high-speed milling.

[0011] The present invention also provides a TC4 titanium alloy high-speed milling surface roughness modeling system based on the LightGBM-NN algorithm, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps described above can be implemented.

[0012] The present invention also provides a computer-readable storage medium, on which computer program instructions that can be executed by a processor are stored. When the processor executes the computer program instructions, the method steps described above can be implemented.

[0013] Compared with the prior art, the present invention has the following beneficial effects: the present invention combines the static data (milling speed, feed speed, axial cutting depth, radial cutting depth) of TC4 titanium alloy milling with dynamic signals (vibration signals, electrical signals) as the data set for training the model, and proposes a LightGBM-NN algorithm with feature selection capability to establish a TC4 high-speed milling surface roughness model. The present invention can realize the surface roughness modeling of TC4 titanium alloy high-speed milling. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1This is a flowchart of the LightGBM-NN algorithm training in the present invention.

[0015] Figure 2 It is the histogram of feature importance and feature explanation rate.

[0016] Figure 3 This is a graph of the importance of the top 10 features. DETAILED DESCRIPTION

[0017] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.

[0018] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0019] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0020] The present invention provides a TC4 titanium alloy high-speed milling surface roughness modeling method based on the LightGBM-NN algorithm, which combines the TC4 titanium alloy milling static data with dynamic signals as the data set for the training model, and proposes a LightGBM-NN algorithm with feature selection capability to establish a TC4 high-speed milling surface roughness model. The method includes the following steps:

[0021] Step S1, using static data, i.e., milling speed, feed speed, axial cutting depth, and radial cutting depth as variables, constructing an experimental scheme, collecting electrical signals and vibration signals of the milling process during the experiment, and measuring the milling surface roughness of the titanium alloy after the experiment is completed;

[0022] Step S2, extracting the time domain features of the electrical signal and the vibration signal, and combining them with the static data to construct a data set for training the LightGBM-NN algorithm;

[0023] Step S3: Use the LightGBM algorithm to select features by calculating the importance score I of each feature. j , sort all features;

[0024] Step S4: Use the optimized features in step S3 as the input of the NN algorithm and the surface roughness of the titanium alloy milling as the output to construct a surface roughness model of titanium alloy high-speed milling.

[0025] The following is the specific implementation process of the present invention.

[0026] like Figure 1 As shown, this embodiment provides a TC4 titanium alloy high-speed milling surface roughness modeling method based on the LightGBM-NN algorithm, and the specific implementation steps are as follows:

[0027] Step S1 includes:

[0028] S1.1, select milling speed V c , feed per tooth f z For experimental factors, set the level of each factor and design an orthogonal experiment. Set the constraints of each factor according to the high-speed milling conditions of titanium alloy:

[0029] Milling speed V min ≤V c ≤V max

[0030] Feed per tooth f min ≤f z ≤f max

[0031] in,

[0032] V min 、V max is the milling speed V c The minimum and maximum values ​​of ;

[0033] f min 、f max is the feed per tooth f z The minimum and maximum values ​​of .

[0034] S1.2. Conduct a milling experiment. Collect electrical signals and vibration signals during the experiment. After each milling experiment, measure the surface quality of the workpiece after milling. The surface roughness is used to represent the milling surface quality.

[0035] Step S2 comprises:

[0036] S2.1. Feature extraction part. In the present invention, a total of 21 groups of signals are collected, including 18 groups of electrical parameter signals (as shown in Table 1) and 3 groups of vibration signals (X-axis, Y-axis, and Z-axis). Then, the time domain features of each group of electrical signals and vibration signals are extracted, totaling 11 parameters (as shown in Table 2). Therefore, there are a total of 231 (21×11) time domain features. Combined with static data (milling speed, feed per tooth), there are a total of 233 features. This data set is used to train the LightGBM-NN algorithm.

[0037] Table 1 Electrical signal parameters

[0038]

[0039] Table 2 Index calculation formula table

[0040]

[0041]

[0042] S2.2, the collected dynamic data (electrical parameters, vibration signals) and static data (milling speed, feed per tooth) and the surface roughness data of TC4 after milling are combined into a data set G, and the data set is divided into a training set G according to the leave-one-out cross-validation method. s =[G s1 ,G s2 ,…G si ,…G sm ] and the test set G v =[G v1 ,G v2 ,…G vi ,…G vk ](k=1 in leave-one-out cross-validation method). And select one G from the training set si For training LightGBM-NN model N g1 . Let G si The data is x=[x1,x2,…x t ],y=[y1,y2,…y t ], t represents the number of training set data, x represents the characteristic value of the training set data, x t represents the characteristic value of the tth training data, y t Indicates the corresponding x t The label value of is the milling surface roughness of titanium alloy;

[0043] Step S3 includes:

[0044] S3.1. LightGBM is a gradient boosting framework that uses a base classifier based on a decision tree to build the final integrated model. The base classifier refers to a single decision tree model used to fit the gradient boosting tree in the training data. Each base classifier attempts to capture a certain pattern or regularity in the training data, thereby reducing the prediction error of the overall model. When training the model, the residual of the predicted value and the true value of each iteration is calculated. Through each round of iteration, based on the error between the prediction result of the current model and the true label, the negative gradient of the loss function to the prediction result is calculated. This negative gradient can be regarded as the residual of the current model, that is, the difference between the true label and the current model prediction. Each iteration uses the residual of the previous round of models to train a new decision tree, and finally combines the results of multiple decision trees to obtain a more accurate model. According to the forward step-by-step method, if the model of the first learner is represented as f0(x)=0, the learner f in the mth step m (x) is calculated as:

[0045] f m (x) = f m-1 (x)+T(x;c m )

[0046] in,

[0047] x represents the characteristic value of the training set data;

[0048] T(x;c m ) represents a decision tree;

[0049] c m Represents decision tree parameters.

[0050] S3.2, take the square error as the loss function L(y i ,f m (x i ), the calculation formula is:

[0051]

[0052] in,

[0053] y i Represents x i The corresponding label value;

[0054] f m (x i ) represents x i The corresponding predicted value.

[0055] S3.3. In optimization algorithms such as gradient descent, we determine the direction of adjusting parameters by calculating the gradient of the loss function with respect to the parameters. The direction of the gradient is the direction in which the loss function increases fastest, so to reduce the loss function, we need to move in the negative direction of the gradient. The gradient descent formula can be derived as:

[0056]

[0057] S3.4. In order to make the loss function L(y i ,f m (x i )) reaches the minimum value, we need to make:

[0058]

[0059] S3.5. When the loss function takes a minimum value, that is, the derivative is 0, the parameter c m The calculation formula is:

[0060]

[0061] S3.6. After the learner of this round is determined, the residual is calculated, that is, the difference between the true value and the output value of the learner, and the residual is used as the label value of the next round of training data. The calculation formula of the residual r is:

[0062] r=yf m (x)

[0063] Among them, y is the true value of the label, that is, the surface roughness of titanium alloy milling;

[0064] S3.7. After obtaining the new label value, find the partition node. LightGBM traverses all features and possible partition points, and calculates the gain of each partition scheme. If the gain is greater than 0, continue to split. The calculation formula of Gain is:

[0065]

[0066] in:

[0067] G l , G r Respectively represent the L(y) in the left and right child nodes before splitting. i ,f m (x i )) m (x i ) is the sum of the first-order partial derivatives of ;

[0068] H l , H r Respectively represent the L(y) in the left and right child nodes before splitting. i ,fm (x i )) m (x i ) is the sum of the second-order partial derivatives of ;

[0069] γ(γ∈[0,+∞)) represents the first-order regularization coefficient, and λ(λ∈[0,+∞)) represents the second-order regularization coefficient, which are used to control the complexity of the tree in the model.

[0070] S3.8, LightGBM mainly uses a method based on feature importance score when selecting features. Feature importance score is an indicator to measure the contribution of a feature to model performance, usually calculated by the usage of the feature during model training. The commonly used importance score calculation method is based on gain, that is, the amount of loss reduction brought by the feature when the tree node is split. Specifically, for each feature j, its importance score I j It can be expressed as the sum of the gains of the feature in all trees, and its calculation formula is:

[0071]

[0072] in,

[0073] Gain(j,m) represents the gain of feature j in the mth tree;

[0074] M represents the number of trees.

[0075] The importance scores of all training data are calculated using the above formula to form the importance score vector I J =[I j1 ,I j2 ,…,I jz ], where z represents the number of features. The higher the importance of the feature, the higher its corresponding I j The bigger it will be.

[0076] Step S4 comprises:

[0077] S4.1. First, initialize the parameters of the NN algorithm, namely the error threshold E n and the learning rate η n Considering that it is necessary to fit the data under multi-dimensional features, the LeakyRel function is selected as the activation function, and its calculation formula is:

[0078]

[0079] Among them, x represents the input parameter of the activation function, α represents the linear variable, and its value is 0.1.

[0080] S4.2, perform forward propagation and apply the activation function f(x) to calculate the hidden layer output U and the output layer output O. The formula is as follows:

[0081] U=f(w (dq) ·x+b (dq) )

[0082] O=f(w ql ·f(w (dq) ·x+b (dq) )+b (ql) )

[0083] in,

[0084] d represents the number of neurons in the input layer;

[0085] q represents the number of neurons in the hidden layer;

[0086] l represents the number of neurons in the output layer;

[0087] w (dq) =(w ih ) d×q , represents the connection weight matrix between the input layer and the hidden layer, w ih is the weight between the i-th input layer neuron and the h-th hidden layer neuron;

[0088] w (ql) =(w ho ) q×l , represents the connection weight matrix between the hidden layer and the output layer, w ho is the weight between the hth hidden layer neuron and the oth output neuron;

[0089] b (dq) Represent the bias between the input layer and the hidden layer respectively;

[0090] b (ql) They represent the bias between the output layer and the hidden layer respectively.

[0091] S4.3. After forward propagation, the output value is compared with the true value, and the loss function is calculated. The loss function of the NN part in the present invention adopts the root mean square error function, and its calculation formula is:

[0092]

[0093] in:

[0094] l represents the number of neurons in the output layer;

[0095] O i represents the output of the i-th output neuron.

[0096] S4.4. Finally, the back propagation process calculates the error factor δ between the hidden layer and the output layer ql , and its calculation formula is:

[0097]

[0098] Where, f' is the first-order derivative of f;

[0099] S4.5, by the error factor δ ql The connection weight w between the updated output layer and the hidden layer can be calculated ( ' ql) and the bias value b ( ' ql) , and its calculation formula is as follows:

[0100] w ( ' ql) =w (ql) +η n δ ql U

[0101] b ( ' ql) =b (ql) +η n δ ql

[0102] in,

[0103] η n is the learning rate (0<η n <1).

[0104] S4.6. Calculate the error factor δ between the input layer and the hidden layer dq , and its calculation formula is as follows:

[0105]

[0106] in:

[0107] U i is the output of the i-th hidden layer neuron.

[0108] S4.7, by the error factor δ dq The updated connection weight w between the input layer and the hidden layer can be calculated ( ' dq) and the bias value b ( ' dq) , and its calculation formula is as follows:

[0109] w ( ' dq) =w (dq) +η n δ dq x

[0110] b ( ' dq) =b (dq) +η n δ dq

[0111] in,

[0112] η n is the learning rate (0<η n <1).

[0113] S4.8, calculate the root mean square error between the output value of a single NN model and the true value. The root mean square error calculation formula is shown in step S4.3, and then pass the test set G v Verify the overall fitting accuracy A of the NN model set N e , the model fitting accuracy is calculated as follows:

[0114]

[0115] Among them, l represents the number of neurons in the output layer, y i represents the true value of the label corresponding to the i-th output neuron, Represents the average value of the i-th label.

[0117] Case Description

[0118] This case is to perform side milling on a TC4 titanium alloy plate with a length of 100mm, a width of 100mm, and a thickness of 5mm on a VMC850E vertical machining center. Because in actual processing, the axial cutting depth and radial cutting depth are determined by the processing technology, so in this experiment, the axial cutting depth and radial cutting depth are set to fixed values, the axial cutting depth is taken as a fixed value of 0.2mm, the radial cutting depth is taken as a fixed value of 5mm, the milling speed and the feed per tooth are taken at 4 levels, and the design of the full factorial experimental factors and level table is shown in Table 3.

[0119] Table 3 Factors and levels of full factorial experimental design

[0120]

[0121] Table 4 Full factorial experimental design table

[0122]

[0123] According to the experimental arrangement in Table 4, the titanium alloy TC4 plate with a length of 100mm, a width of 100mm, and a thickness of 5mm was profile milled. After the experiment, the surface roughness of the quality evaluation index after cutting needs to be measured, and the plane after the test is measured using a handheld roughness measuring instrument. The measurement method is: after milling based on a set of process parameters, the surface roughness is measured three times and the average value is taken. Table 5 gives the data of the titanium alloy milling experiment, and Table 6 and Table 7 are partial electrical signal characteristics and partial vibration signal characteristics, respectively.

[0124] Table 5 Titanium alloy milling experimental data

[0125]

[0126] Table 6 Characteristics of some electrical signals

[0127]

[0128]

[0129] Table 7 Characteristics of some vibration signals

[0130]

[0131] (1) Feature selection

[0132] Before starting to train the LightGBM algorithm, set the algorithm parameters, mainly including: tree depth, number of trees and learning rate. The depth of the tree controls the complexity of the tree, that is, the maximum number of layers that the tree can grow along the split node. The number of trees is an important hyperparameter in the gradient boosting tree algorithm. Increasing the number of trees will make the model more complex and can capture more subtle patterns and relationships in the training data, thereby improving the model's ability to fit the training data. However, if the number of trees is too large, the model may overfit the training data, resulting in a decrease in generalization performance on the test data. The learning rate controls the relative contribution of the new tree model to the previous model in each step. A smaller learning rate will make the contribution of each tree relatively small, and the model will converge more slowly, but it will help improve the generalization ability of the model and reduce the risk of overfitting; while a larger learning rate will accelerate the convergence of the model, but may cause the model to overfit on the training data.

[0133] The parameter settings of the LightGBM algorithm are shown in Table 8.

[0134] Table 8 LightGBM algorithm parameters

[0135]

[0136] The importance scores of 233 features are obtained through the LightGBM algorithm, and then feature selection is performed and a feature importance graph is drawn (such as Figure 2 ). As can be seen from the figure, the feature contribution rate of the first 57 features reaches 99%. Figure 3 The feature importance of the top 10 features is plotted, and the corresponding features of the top 10 are given in Table 9. It can be seen from Table 9 that most of the top 10 features are dynamic features, and only one static feature (feed per tooth) ranks sixth, indicating that the surface roughness of TC4 high-speed milling is more sensitive to dynamic data.

[0137] Table 9 Number and feature comparison table

[0138]

[0139] (2) TC4 high-speed milling surface roughness model

[0140] After completing the feature selection, the corresponding features are multiplied by the feature importance matrix and MinMax normalization is performed. The processed data is then used as input, and the TC4 high-speed milling surface roughness is used as output to train the NN model. Among them, the input layer neurons are 57 (the preferred number of features); the number of hidden layers is finally determined to be 13 after training and parameter adjustment; the number of output layer nodes is 1, that is, the TC4 high-speed milling surface roughness; the error threshold is set to 0.1; the learning rate reflects the speed of convergence of the NN model. Too large a learning rate will lead to insufficient training and low model accuracy. The learning rate of the present invention is set to 0.05. The NN algorithm parameter settings are shown in Table 10.

[0141] Table 10NN algorithm parameters

[0142]

[0143] (3) LightGBM-NN fitting results

[0144] The leave-one-out cross-validation method is used in the present invention, so there are 16 candidate models after fitting. Table 11 lists the 16 candidate models and the corresponding errors. According to step S4.8, the overall accuracy of the NN model after using the leave-one-out cross-validation method reaches 94.15%. It can be seen from Table 11 that the error of model 15 is the smallest, so model 15 is selected as the final LightGBM-NN model.

[0145] Table 11NN candidate model fitting error table

[0146]

[0147]

[0148] In order to further verify the feasibility of the LightGBM-NN model, three groups of process parameters are randomly selected in the experimental design table 4 of the present invention, and they are substituted into the LightGBM-NN model numbered 15 as verification data. Table 12 shows the numerical values ​​of the output value of the LightGBM-NN model and the measured value after the TC4 high-speed milling experiment using the above three groups of process parameters. The minimum and maximum absolute errors between the model output value and the measured value are 0.037μm and 0.090μm, respectively, the average absolute error between the model output value and the measured value is 0.069, and the root mean square error is 0.073, indicating that the TC4 titanium alloy high-speed milling surface roughness model established by the LightGBM-NN algorithm is effective.

[0149] Table 12 Model verification status

[0150]

[0151] The present invention also provides a TC4 titanium alloy high-speed milling surface roughness modeling system based on the LightGBM-NN algorithm, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps described above can be implemented.

[0152] The present invention also provides a computer-readable storage medium, on which computer program instructions that can be executed by a processor are stored. When the processor executes the computer program instructions, the method steps described above can be implemented.

[0153] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0154] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0155] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0157] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

Claims

1. A surface roughness modeling method for high-speed milling of TC4 titanium alloy based on LightGBM-NN algorithm, characterized in that: The static data of TC4 titanium alloy milling is combined with dynamic signals as the data set for training the model, and a LightGBM-NN algorithm with feature selection capability is proposed to establish the surface roughness model of TC4 high-speed milling.

2. According to claim 1, a TC4 titanium alloy high-speed milling surface roughness modeling method based on the LightGBM-NN algorithm is characterized in that: The steps include: Step S1, using static data, i.e., milling speed, feed speed, axial cutting depth, and radial cutting depth as variables, constructing an experimental scheme, collecting electrical signals and vibration signals of the milling process during the experiment, and measuring the milling surface roughness of the titanium alloy after the experiment is completed; Step S2, extracting the time domain features of the electrical signal and the vibration signal, and combining them with the static data to construct a data set for training the LightGBM-NN algorithm; Step S3: Use the LightGBM algorithm to select features by calculating the importance score I of each feature. j , sort all features; Step S4: Use the optimized features in step S3 as the input of the NN algorithm and the surface roughness of the titanium alloy milling as the output to construct a surface roughness model of titanium alloy high-speed milling.

3. The surface roughness modeling method of TC4 titanium alloy high-speed milling based on LightGBM-NN algorithm according to claim 2 is characterized in that: Step S1 specifically includes: S1.1, select milling speed V c , feed per tooth f z For experimental factors, set the level of each factor and design an orthogonal experiment; set the constraints of each factor according to the high-speed milling conditions of titanium alloy: Milling speed V min ≤V c ≤V max Feed per tooth f min ≤f z ≤f max Among them, V min 、V max is the milling speed V c The minimum and maximum values ​​of f min 、f max is the feed per tooth f z The minimum and maximum values ​​of ; S1.

2. Conduct a milling experiment. Collect electrical signals and vibration signals during the experiment. After each milling experiment, measure the surface quality of the workpiece after milling. The surface quality of the workpiece after milling is represented by the surface roughness of titanium alloy milling.

4. The surface roughness modeling method of TC4 titanium alloy high-speed milling based on LightGBM-NN algorithm according to claim 2 is characterized in that: Step S2 specifically includes: S2.1, feature extraction part: extract the time domain features of each set of dynamic data, i.e. electrical signals and vibration signals, and build a data set in combination with static data to train the LightGBM-NN algorithm; S2.2, the collected dynamic data and static data as well as the milling surface roughness data of titanium alloy after milling are combined into data G, and the data set G is divided into training set G according to the leave-one-out cross-validation method. s =[G s1 ,G s2 ,…G si ,…G sm ] and the test set G v =[G v1 ,G v2 ,…G vi ,…G vk ] and select a G from the training set si For training LightGBM-NN model N g1 ; where G si represents the i-th training set; G vi represents the i-th test set; let G si The data is x=[x1,x2,…x t ],y=[y1,y2,…y t ], t represents the number of training set data; x represents the characteristic value of the training set data, x t represents the characteristic value of the tth training data; y t Indicates the corresponding x t The label value is the surface roughness of titanium alloy milling.

5. The surface roughness modeling method of TC4 titanium alloy high-speed milling based on LightGBM-NN algorithm according to claim 4 is characterized in that: Step S3 specifically includes: S3.

1. According to the forward step-by-step method, if the model of the first learner is represented by f0(x) = 0, the learner f in the mth step m (x) is calculated as: f m (x)=f m-1 (x)+T(x;c m ) Where x represents the characteristic value of the training set data; T(x; c m ) represents a decision tree; c m represents the decision tree parameters; S3.2, take the square error as the loss function L(y i ,f m (x i ), the calculation formula is: Among them, y i Represents x i The corresponding label value; f m (x i ) represents x i The corresponding predicted value; S3.3, moving in the negative direction of the gradient, the gradient descent formula can be derived as: S3.4, in order to make the loss function L(y i ,f m (x i )) reaches the minimum value, we need to make: S3.

5. When the loss function takes a minimum value, that is, the derivative is 0, the parameter c m The calculation formula is: S3.

6. After the current round of learners is determined, the residual is calculated, that is, the difference between the true value and the learner output value, and the residual is used as the label value of the next round of training data. The calculation formula of the residual r is: r=y-f m (x) Among them, y is the true value of the label, that is, the surface roughness of titanium alloy milling; S3.

7. After obtaining the new label value, find the partition node. LightGBM traverses all features and possible partition nodes, calculates the gain of each partition scheme, and continues to split if the gain is greater than 0. The calculation formula of Gain is: Where: G l , G r Respectively represent the L(y) in the left and right child nodes before splitting. i ,f m (x i )) m (x i ) is the sum of the first-order partial derivatives; H l , H r Respectively represent the L(y) in the left and right child nodes before splitting. i ,f m (x i )) m (x i ) is the sum of the second-order partial derivatives of ; γ(γ∈[0,+∞)) represents the first-order regularization coefficient, and λ(λ∈[0,+∞)) represents the second-order regularization coefficient, which are used to control the complexity of the tree in the model.

6. The surface roughness modeling method for high-speed milling of TC4 titanium alloy based on LightGBM-NN algorithm according to claim 5 is characterized in that: LightGBM uses a method based on feature importance scores when selecting features. The method based on feature importance scores is based on gain, that is, the amount of loss reduction caused by the feature when the tree node is split; specifically, for each feature j, its importance score I j It is expressed as the sum of the gains of feature j in all trees, and its calculation formula is: Among them, Gain(j,m) represents the gain of feature j in the mth tree; M represents the number of trees; the importance scores of all training data are calculated by the above formula to form the importance score vector I J =[I j1 ,I j2 ,…,I jz ], where z represents the number of features. The higher the importance of the feature, the higher its corresponding I j The bigger it will be.

7. The surface roughness modeling method for high-speed milling of TC4 titanium alloy based on LightGBM-NN algorithm according to claim 6 is characterized in that: Step S4 specifically includes: S4.

1. First, initialize the parameters of the NN algorithm, namely the error threshold E n and the learning rate η n ; Considering the need to fit the data under multi-dimensional features, the LeakyRel function is selected as the activation function, and its calculation formula is: Among them, x represents the input parameter of the activation function, α represents the linear variable, and its value is 0.1; S4.2, perform forward propagation and apply the activation function f(x) to calculate the hidden layer output U and the output layer output O, the formula is as follows: U=f(w (dq) ·x+b (dq) ) O=f(w ql ·f(w (dq) ·x+b (dq) )+b (ql) ) Where d represents the number of neurons in the input layer; q represents the number of neurons in the hidden layer; l represents the number of neurons in the output layer; w (dq) =(w ih ) d×q represents the connection weight matrix between the input layer and the hidden layer, w ih is the weight between the i-th input layer neuron and the h-th hidden layer neuron; w (ql) =(w ho ) q×l represents the connection weight matrix between the hidden layer and the output layer, w ho is the weight between the hth hidden layer neuron and the oth output neuron; b (dq) represents the bias between the input layer and the hidden layer; b (ql) Represents the bias between the output layer and the hidden layer; S4.

3. After forward propagation, the output value is compared with the true value and the loss function is calculated; S4.

4. Finally, the back propagation process calculates the error factor δ between the hidden layer and the output layer ql , and its calculation formula is: Where, f' is the first-order derivative of f; S4.5, by the error factor δ ql Calculate the updated connection weight w between the output layer and the hidden layer ( ' ql) and the bias value b ( ' ql) , and its calculation formula is as follows: w ( ' ql) =w (ql) +n n d ql U b ( ' ql) =b (ql) +n n d ql Among them, η n is the learning rate, 0<η n <1; S4.

6. Calculate the error factor δ between the input layer and the hidden layer dq , and its calculation formula is as follows: Among them, U i is the output of the i-th hidden layer neuron; S4.7, by the error factor δ dq Calculate the updated connection weight w between the input layer and the hidden layer ( ' dq) and the bias value b ( ' dq) , and its calculation formula is as follows: w ( ' dq) =w (dq) +n n d dq x b ( ' dq) =b (dq) +n n d dq S4.

8. Calculate the root mean square error between the output value of a single NN algorithm model and the true value, and then use the test set G v Verify the overall fitting accuracy A of the NN model set N e , the model fitting accuracy is calculated as follows: Among them, O i represents the predicted value of the i-th output neuron, l represents the number of neurons in the output layer, and y i represents the true value of the label corresponding to the i-th output neuron, Represents the average value of the i-th label.

8. The surface roughness modeling method for high-speed milling of TC4 titanium alloy based on LightGBM-NN algorithm according to claim 7 is characterized in that: The loss function of the NN algorithm adopts the root mean square error function, and its calculation formula is: Where l represents the number of neurons in the output layer.

9. A TC4 titanium alloy high-speed milling surface roughness modeling system based on LightGBM-NN algorithm, characterized in that: The method comprises a memory, a processor and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, the method steps as claimed in any one of claims 1 to 8 can be implemented.

10. A computer-readable storage medium storing computer program instructions that can be executed by a processor, wherein when the processor executes the computer program instructions, the method steps according to any one of claims 1 to 8 can be implemented.