Efficient Prediction of Stability Boundaries in Milling Considering the Variation of Tool Features and Workpiece Materials

Theoretical stability analysis is a significant approach to predicting chatter-free machining parameters. Accurate milling stability predictions highly depend on the dynamic properties of the process system. Therefore, variations in tool and workpiece attributes will require repeated and time-consuming experiments or simulations to update the tool tip dynamics and cutting force coefficients. Considering this problem, this paper proposes a transfer learning framework to efficiently predict the milling stabilities for different tool–workpiece assemblies through reducing the experiments or simulations. First, a source tool is selected to obtain the tool tip frequency response functions (FRFs) under different overhang lengths through impact tests and milling experiments on different workpiece materials conducted to identify the related cutting force coefficients. Then, theoretical milling stability analyses are developed to obtain sufficient source data to pre-train a multi-layer perceptron (MLP) for predicting the limiting axial cutting depth (aplim). For a new tool, the number of overhang lengths and workpiece materials are reduced to design and perform fewer experiments. Then, insufficient stability limits are predicted and further utilized to fine-tune the pre-trained MLP. Finally, a new regression model to predict the aplim values is obtained for target tool–workpiece assemblies. A detailed case study is developed on different tool–workpiece assemblies, and the experimental results validate that the proposed approach requires fewer training samples for obtaining an acceptable prediction accuracy compared with other previously proposed methods.


Introduction
Continuous developments in the manufacturing industry have pushed the machine tool to pursue a higher machining efficiency and accuracy.However, chatter vibrations occurring in the milling process will restrict the machine tool to its limits [1].Since regenerative chatter is the most common chatter phenomenon in milling, in-depth methods have been developed to suppress the chatter occurrences [2,3].Providing accurate stability lobe diagrams (SLDs) has become a major research direction to select chatter-free machining parameters.The SLDs describe the relationships between the spindle speed and axial cutting depth, which are derived by solving the dynamic model of the tool and workpiece system [4].Altintas and Budak [4,5] developed a two-degree-of-freedom (2DOF) analytical milling chatter model and provided a Fourier-approximation-based method to obtain the chatter-free machining parameters in the frequency domain.Since this method was proven to be effective in determining the SLD, it lays a foundation for predicting the chatter stability.Subsequently, the semi-discretization method, full-discretization method and time-domain method were also put forwarded to construct the chatter vibration models and conduct the machining stability analyses [6].The groundbreaking work of researchers is beneficial for operators to correctly select the processing parameters.Among these chatter vibration Sensors 2023, 23, 8954 2 of 18 models, the tool tip dynamics and cutting force coefficients are the critical inputs of the dynamic model.
The tool tip dynamics can reflect the structural dynamics characteristics of the machining system and are commonly represented by the tool tip frequency response functions (FRFs) in the frequency domain [7].Generally, the tool tip FRFs are acquired through impact testing, finite element simulations, substructure coupling methods and so on [8][9][10][11].Kolar et al. [12] proposed a coupled method to establish the whole machine tool system by joining the spindle and machine frame finite element (FE) model.It is convenient to establish the FE model of a new tool; however, its related joint dynamics are difficult to simulate accurately.Due to some simplifications in constructing the finite element model, the frequency response function obtained by the finite element simulations still have some obvious deviations from the actual values.Wang [13] introduced the receptance coupling substructure analysis (RCSA) method to utilize the tested FRFs at the end of the spindle to predict the tip FRFs of different tool-holder assemblies.However, the accuracy of RCSA is subject to many parameters that are difficult to measure or identify.For example, the joint dynamics of the tool-holder-spindle assembly are difficult to measure and susceptible to the complex contact conditions, limiting the ability to accurately identify the joint stiffness and damping coefficients.Therefore, impact testing has become the most acceptable approach to obtain the tool tip dynamics; this is where the forces exerted at the tool tip are measured and combined with the vibration signals recorded by the pasted sensors to directly generate the tool tip FRFs.Chang et al. [14] utilized impact testing to obtain the FRFs of the tool-spindle system and predicted the SLD using the full discretization method for selecting the appropriate chatter-free machining parameters.Since the tool tip FRFs are mainly determined by the dynamic characteristics of the tool-holder assembly, the tool properties, including the tool materials, tool diameter and tool overhang length, can significantly affect the tool tip FRFs.Once one of the mentioned tool properties is changed, repeated experiments, simulations or identifications are required to update the tool tip FRFs, and the shutdown of the machine tool for a long time will decrease the production efficiency.Therefore, though many effective methods have been proposed to improve the accuracy of tool tip FRFs, their efficient evaluation under different tool-holder assemblies remains a challenge.
Besides the tool tip dynamics, the machining stability is also seriously affected by the cutting force coefficients.Generally, the experimental data obtained from the milling tests under different combinations of machining parameters are used to evaluate the cutting force coefficients through the orthogonal-to-oblique transformation and average calibration method [15,16].Experimental results show that the workpiece material can affect the cutting force coefficients.Lacerda et al. [17] carried out milling tests on GH-190 cast iron and ABNT 1020 steel and calculated their cutting force coefficients, and the SLDs were plotted and compared to confirm that the milling stability was affected by the workpiecematerial-dependent cutting force coefficient.Yu et al. [18] carried out a series of singlefactor milling tests on TiB2/Al composites and other three aluminum alloys to compare their cutting performances; the cutting force coefficients of each material were identified and used to provide theoretical guidance for selecting reasonable milling parameters for the TiB2/Al composites.Qiu [19] et al. took four workpieces with the materials TC4, 7075T6, 45 steel and 304 stainless steel, respectively, for a case study and validated that the variation of the workpiece material had a great impact on the milling stability through changing the cutting force coefficients.Currently, the milling stability prediction models are mainly established for one workpiece material, and poor accuracies will be obtained when directly using them to predict the milling stability of a new material.Therefore, when facing different workpiece materials, repeated milling tests are required to update the cutting force coefficients and establish a new milling stability prediction model, which is extremely time-consuming.Some researchers have already focused on predicting the surface roughness for different workpiece materials, but an efficient prediction of milling stability under multiple workpiece materials has been rarely discussed [20].
Sensors 2023, 23, 8954 3 of 18 According to the above descriptions, properties of the tool-workpiece will have a comprehensive impact on the SLDs, and only using the impact testing and milling tests to realize the milling stability prediction under multiple machining conditions can be costly and inefficient.Then, current research is using fewer required experimental data to efficiently establish a milling stability prediction model considering multiple influencing factors, such as the tool material, tool diameter, tool overhang length and workpiece material.Considering this situation, transfer learning aiming to apply the knowledge learned in the source domain to solve similar problems in the target domain has been introduced to benefit the milling stability analysis [21].Unver et al. [22] proposed a new transfer learning (TL) framework for chatter detection based on the deep learning and numerical chatter simulation.Only an impact hammer test was required to generate different IMFs close to the modal frequencies for training different AlexNets.Predictions of these AlexNets were ensembled to output the vibration state, and they were directly transferred to the actual working condition to perform the chatter detection.This method indicates a significant potential in avoiding expensive experimental data collection, but it has not further taken the change of tool and workpiece material into consideration.Liu et al. [23] constructed the source domain dataset by sufficient impact tests on the source tool and divided the sub-workspace based on the modal order of FRF, and only a small number of impact tests were performed in each sub-workspace on the target tool to construct the target data.For each sub-workspace, the source data and target data were combined to train a modal parameters prediction model of the target tool through the transfer learning algorithm TrAdaBoost.R2.To further study the tool-dependent milling stability, Deng et al. [24] developed the method proposed by Liu et al. for efficiently predicting the SLDs for different tool-holder assemblies.A source tool was selected to perform the impact tests at sufficient overhang lengths to construct the source milling stability data, and the impact tests only at three tool overhang lengths were required to construct the target data for training the overhang length-dependent milling stability prediction model.Moreover, Postel et al. [25] further considered the differences between the theoretical and experimental stability limits and utilized fewer experimental data to fine-tune the tool overhang length-dependent deep neural network pre-trained using sufficient theoretical stability data.However, this research only focused on the stability states and could not further deal with the efficient SLD predictions with various toolworkpiece assemblies.The introduction of different effective transfer learning methods benefited evaluating the milling stability with less required data.Nevertheless, the stability prediction models in most studies were still limited to one specific tool or one specific workpiece material, which were not applicable to the multiple machining conditions with various tool features and workpiece materials.
Considering the diversity of tools and workpieces in machining processes and aiming to reduce the cost of training a milling stability model, this paper presents an approach to efficiently predicting the tool-workpiece assembly dependent milling stability.This can be achieved by utilizing the transfer learning for a neural network.First, a source tool was selected to carry out the impact tests to obtain the tool tip FRFs for multiple overhang lengths, and milling tests were conducted on different workpiece materials to identify related cutting force coefficients.These evaluated parameters were used to predict the limiting axial cutting depths and construct the source data through the theoretical milling stability analysis.Then, a multilayer perceptron was trained using the source data to predict the a plim values under multiple milling conditions.For a new tool, fewer overhang lengths and workpiece materials were selected to conduct the impact tests and milling tests for constructing the target stability data.The pre-trained network was then fine-tuned with the target data for more accurate stability predictions under the target milling conditions.The main goal of this presented approach is to keep the measurement effort to a minimum, making it a promising approach to performing an efficient stability prediction of the machining process with diverse tools and workpieces.
The remainder of this paper is organized as follows: In Section 2, the necessity for considering the properties of the tool-workpiece in the milling stability prediction is discussed, and a framework to establish the stability prediction model for different tool-workpiece assemblies is also provided.A detailed case study is carried out in Section 3 to explain the application of the proposed approach and provide an experimental validation.The work is summarized in Section 4.

Theoretical Analysis of Milling Chatter Stability
The dynamic model of the milling process is the basis for developing the milling stability analysis.By solving the milling dynamic model, the limiting axial cutting depth can be obtained, and then the SLDs can be plotted within the spindle speed range.Generally, the milling process is described as a dynamic model with two degrees of freedom (2-DOF) in the X and Y directions as shown in Figure 1.
cussed, and a framework to establish the stability predi workpiece assemblies is also provided.A detailed case stu explain the application of the proposed approach and prov The work is summarized in Section 4.

Theoretical Analysis of Milling Cha er Stability
The dynamic model of the milling process is the basis bility analysis.By solving the milling dynamic model, the be obtained, and then the SLDs can be plo ed within the s the milling process is described as a dynamic model with t in the X and Y directions as shown in Figure 1.With this 2-DOF model, Altintas and Budak [4] propo (ZOA) method, and it has been widely used to conduct th cording to the ZOA method, the limiting axial cu ing dept can be calculated using Equation (1): With this 2-DOF model, Altintas and Budak [4] proposed a zero-order approximation (ZOA) method, and it has been widely used to conduct the milling stability analysis.According to the ZOA method, the limiting axial cutting depth a plim and related spindle speed can be calculated using Equation (1): Here, N is the tool teeth number, K tc is the tangential force coefficient, ω c is the chatter frequency, k is the lobe number, and Λ R and Λ I are the real and imaginary parts of the system's eigenvalue in Equation (2), respectively.

of 18
Here, G xx and G yy are the tool tip FRFs in the x and y directions, respectively, and α xx , α xy , α yx and α yy are the direction coefficients: Here, ω r , k r and ξ r are the modal frequency, modal stiffness and modal damping ratios; k rc is the ratio of the radial and tangential cutting force coefficients and φ st and φ ex are the start and exit angles of the cutting tooth.
As can be seen from Equations ( 1) to (3), a plim is dependent on the tool tip FRFs and cutting force coefficients.Then, changes in the tool features such as the tool diameter and tool overhang length affect the milling stability by changing the tool tip FRFs; in addition, changes in the workpiece materials affect the milling stability by changing the cutting force coefficients.Therefore, it is necessary to develop a tool-workpiece assembly dependent milling stability prediction method.
The SLDs for different tool overhang lengths and workpiece materials are provided in Figure 2a,b, respectively.In Figure 2a, four tool overhang lengths are selected to plot the SLDs for a specific workpiece material, and most a plim values decrease with the increase in the tool overhang lengths.In Figure 2b, the SLDs are plotted for three different workpiece materials at a specific tool overhang length, and deviations in the a plim values for different SLDs can be observed.However, whether it is the changes in the tool overhang length or the workpiece materials, the variation tendencies of these lobes are similar.Therefore, these similarities may lay a foundation for the application of transfer learning in the milling stability under variable machining conditions.Moreover, the SLDs also varied with the change in the cutting width as shown in Figure 2c.
Here, ωr, kr and ξr are the modal frequency, modal stiffness and modal damping ratios; krc is the ratio of the radial and tangential cu ing force coefficients and ϕst and ϕex are the start and exit angles of the cu ing tooth.
As can be seen from Equations ( 1) to ( 3), aplim is dependent on the tool tip FRFs and cu ing force coefficients.Then, changes in the tool features such as the tool diameter and tool overhang length affect the milling stability by changing the tool tip FRFs; in addition, changes in the workpiece materials affect the milling stability by changing the cu ing force coefficients.Therefore, it is necessary to develop a tool-workpiece assembly dependent milling stability prediction method.
The SLDs for different tool overhang lengths and workpiece materials are provided in Figure 2a,b, respectively.In Figure 2a, four tool overhang lengths are selected to plot the SLDs for a specific workpiece material, and most aplim values decrease with the increase in the tool overhang lengths.In Figure 2b, the SLDs are plo ed for three different workpiece materials at a specific tool overhang length, and deviations in the aplim values for different SLDs can be observed.However, whether it is the changes in the tool overhang length or the workpiece materials, the variation tendencies of these lobes are similar.Therefore, these similarities may lay a foundation for the application of transfer learning in the milling stability under variable machining conditions.Moreover, the SLDs also varied with the change in the cu ing width as shown in Figure 2c.

Specifications of the Transfer Leaning
Transfer learning can utilize the extracted useful knowledge from the source task to benefit the modeling of the target domain, which requires fewer target data and accelerates the modeling process.

Specifications of the Transfer Leaning
Transfer learning can utilize the extracted useful knowledge from the source task to benefit the modeling of the target domain, which requires fewer target data and accelerates the modeling process.Transfer learning is usually divided into four types: the instancebased transfer learning, feature-based transfer learning, model-based transfer learning and relation-based transfer learning [26][27][28].The model-based transfer learning emphasizes that the model parameters and weights obtained from similar tasks or previous experiences can be used to improve the performance of the machine learning model on a small number of target samples.This meets the requirements for predicting milling stability under different tool-workpiece assemblies, as the parameters and weights of a source tool stability model can be transferred to assist in the stability modeling of a target tool with fewer target data.According to the concept and term of transfer learning, some symbols and definitions for the model-based transfer learning are organized as follows: The domain of transfer learning contains various labeled or unlabeled data, which are represented as domain data D = {X, Y}, where X is the instance space and Y is the label space.The source domain D s contains the existing knowledge, and the target domain D t is the domain to be learned.In general, the sample sizes of the source domain and the target domain are different: the source domain contains sufficient data required to complete the task T, and the target domain has only a small number of representative samples.
The (i-th) instance x i of X is presented by the feature vector, and its corresponding label is defined as y i .For m-many samples, the domain data can be described as D = {(x 1 , y 1 ), (x 2 , y 2 ),. . ., (x i , y i ),. . ., (x m , y m )}, where x i ∈ X, y i ∈ Y, i = 1, 2, . . . m. {X s , Y s } represent the instance and label spaces, respectively, for the source domain data Ds, and {X t , Y t } represents the instance and label spaces, respectively, for the target domain data D t .
f (•) denotes a prediction function describing the mathematic relationship between the instance space and label space, and it can be accurately obtained with sufficient training samples.f s (•) and f t (•) are the prediction models for the source and target domains, respectively.
Task T is defined by the label space Y and prediction model f (•).T = {Y, f (•)}learns from the feature vector and label space {x i , y i } to obtain a prediction function f (•).When giving the source domain D s and target domain D t , training f s (•) using the source domain data is the source task T s .With the help of f s (•), the target task T t is to finetune the f s (•) through the target domain data to obtain the f t (•).

Tool and Workpiece-Dependent Milling Stability Prediction Based on Transfer Learning
Currently, machine learning has been widely used to predict the stability of the milling process considering various influencing factors [29].Generally, sufficient training data are required to train a machine learning model and guarantee its accuracy.When facing the various properties of different tool-workpiece assemblies, a lot of experiments are required to obtain sufficient data, and the costs of the model training may be sharply increased.Therefore, transfer learning is introduced in this paper to benefit the milling stability model with fewer training samples.To realize model-based transfer learning, obtaining an accurate pretrained prediction model and selecting an appropriate finetuning strategy are two important foundations.

Pretraining of a Milling Stability Prediction Model
The artificial neural network has been widely used in predicting the milling stability and can achieve an acceptable prediction accuracy [30,31].Then, the multilayer perceptron is used to predict the limiting axial cutting depth.The MLP is a feedforward artificial neural network consisting of the input layer, hidden layers, and the output layer.The topological structure of an MLP containing L hidden layers is shown in Figure 3, where W [l] is the weight vector connecting the (i − 1)th and (l-th) layers, l = 1, 2,. .., L + 1.Each layer has one or more neurons, and the neurons in two adjacent layers are fully connected.Then, the input of the (j-th) neuron in the lth layer is the weighted sum of the outputs of all neurons in the (i − 1)th layer.
Here, w ij is the weight connecting the (i-th) neuron in the (i − 1)th layer and the (j-th) neuron in the lth layer, b j is the bias of the (j-th) neuron in the (l-th) layer, and f n () is the activation function of the (j-th) neuron in the (l-th) layer.The commonly used activation functions include the ReLU, sigmoid, tanh and softmax.
value.One-hot encoding uses the P-bit register to code the P states of the feature, ensuring that each state has an independent register bit and only one of them is valid at any time.
When encoding the (i-th) workpiece material, the (i-th) bit of the register is marked as 1, and the remaining bits are marked as 0. On this basis, a source MLP for predicting the milling stability can be constructed using sufficient training samples.

Finetuning for Training a Milling Stability Model on the Target Domain
After the pretraining model is constructed, it is necessary to select one appropriate finetuning strategy to retrain the model parameters.Global finetuning and local finetuning are two commonly used finetuning strategies.
Global finetuning retrains all the weights of the pretrained model, and local finetuning first freezes some layers of the pretrained model and updates the weights in the remaining layers.Since global finetuning can affect all the parameters of the whole model when fine-tuning, a be er adaptation to the target dataset is achieved.However, its convergence speed is higher than that of local finetuning.Local finetuning often freezes the Before training an MLP neural network, the number of hidden layers and the number of neurons in each layer are first defined.The number of neurons in the input layer and output layers is equal to the number of elements in the input and output vectors, respectively.Then, the weights and biases are randomly initialized and further modified using the Stochastic Gradient Descent (SGD) in Equation ( 5) [32].
Here, η is the learning rate, J() is the loss function and (x (i) , y (i) ) is the training set data pair.
According to the theoretical analysis of milling stability, the limiting axial cutting depth depends on the tool features, workpiece materials and machining parameters; then, the input vector of the milling stability prediction model should contain these factors.The tool features and machining parameters have already been considered to construct the milling stability prediction model, but they are still limited to one specific workpiece material.To reduce the number of training samples and improve the generalization performance of the trained stability prediction model under multi-milling conditions, the machining parameters, tool features and workpiece materials are combined to be the input variables x = {n, a e , l c , W m } of an MLP to predict the limiting axial cutting depth a plim .The terms n, a e , l c and W m represent the spindle speed, radial cutting width, tool overhang length and workpiece material, respectively.Moreover, one-hot encoding is adopted to express the workpiece material since it cannot be directly evaluated using a numerical value.One-hot encoding uses the P-bit register to code the P states of the feature, ensuring that each state has an independent register bit and only one of them is valid at any time.When encoding the (i-th) workpiece material, the (i-th) bit of the register is marked as 1, and the remaining bits are marked as 0. On this basis, a source MLP for predicting the milling stability can be constructed using sufficient training samples.

Finetuning for Training a Milling Stability Model on the Target Domain
After the pretraining model is constructed, it is necessary to select one appropriate finetuning strategy to retrain the model parameters.Global finetuning and local finetuning are two commonly used finetuning strategies.
Global finetuning retrains all the weights of the pretrained model, and local finetuning first freezes some layers of the pretrained model and updates the weights in the remaining layers.Since global finetuning can affect all the parameters of the whole model when fine-tuning, a better adaptation to the target dataset is achieved.However, its convergence speed is higher than that of local finetuning.Local finetuning often freezes the parameters of the first layers and finetunes the parameters of the last layers, for the first layers usually learn more basic low-level features and the learned features will be more abstract and advanced as the number of network layers increases.However, using the local finetuning for a pretrained model with fewer layers, only fewer parameters can be retrained after some layers are frozen, and then the performance of the neural network may be greatly affected by the source domain dataset [33].Thus, the finetuning strategy can be determined according to the structure of the source milling stability prediction model.
Then, transfer learning in efficiently predicting the tool and workpiece-dependent milling stability can be summarized as follows: A source tool is first selected to construct the source data D s = {X s , Y s } shown in Equation (6).The instance space X s is composed of m s feature vectors, the (i-th) of which can be defined as x si = {n si , a esi , l csi , W msi }, i = 1, 2, . .., m s .The label space Y s is composed of m s a plim values, where y si = {a plimsi }, i = 1, 2, . .., m s .
For a new tool, the target data D t = {X t , Y t } are described in Equation (7).Similarly, the instance space X t is composed of mt feature vectors, the (i-th) of which can be defined as x ti = {n ti , a eti , l cti , W mti }.The label space Y t is composed of m t a plim values, where y ti = {a plimti }, i = 1, 2, . .., m t .The source data size m s is always much larger than the target data size m t .
An accurate MLP is trained using the sufficient source data Ds, and it is transferred to the target domain.A finetuning strategy is selected according to the structure of the source MLP.With the finetuning strategy, the corresponding weights of the source MLP are re-trained using the target data D t .On this basis, a new MLP accurately mapping the target instance x ti to its label y ti can be obtained with only fewer target samples.
A concise description of transfer learning in predicting the milling stability under different combinations of a tool and workpiece is provided in Figure 4. First, different overhang lengths of the source tool are selected to conduct the impact tests at the tool tip and obtain the FRFs.The workpieces with different materials are determined, and the source tool is adopted to perform several milling tests on each workpiece.Then, the cutting force coefficients for these workpieces are identified and combined with the obtained tool tip FRFs to compute the limiting axial cutting depths through the theoretical milling stability analysis.With the sufficient source data D s composed of the machining parameters, tool overhang length, codes of the workpiece materials and limiting axial cutting depths, an MLP is trained to predict the a plim values of the source tool.For the target tool, reduced tool overhang lengths and workpiece materials are defined to perform the impact tests and milling tests.The obtained tool tip FRFs and cutting force coefficients are utilized to construct the target data D t .The structural parameters of the pretrained source MLP are transferred to the target domain, and the target data are utilized to update the weights through the selected finetuning strategy.Ultimately, a new MLP is trained to predict the milling stability of the target tool for different combinations of overhang length and workpiece material.

Case Study
In this section, we describe how the proposed transfer learning-based approach was used to carry out a detailed case study on a 3-axis vertical machining center, as shown in Figure 5.The experimental conditions and the data construction are introduced in Section 3.1.The details of constructing and fine-tuning the pretrained model to obtain the milling stability model of a target tool under multiple machining conditions are described in Sections 3.2 and 3.3, and comparisons to the existing method are also provided in these sections.

Case Study
In this section, we describe how the proposed transfer learning-based approach was used to carry out a detailed case study on a 3-axis vertical machining center, as shown in Figure 5.The experimental conditions and the data construction are introduced in Section 3.1.The details of constructing and fine-tuning the pretrained model to obtain the milling stability model of a target tool under multiple machining conditions are described in Sections 3.2 and 3.3, and comparisons to the existing method are also provided in these sections.

The Experiments and Data Construction
To validate the feasibility of the proposed method in predicting the milling stability under various tool-workpiece assemblies, three tools differing in the diameter, material, teeth number and total length were selected, and each tool was designed to cut three workpieces with different materials, such as cast iron, 45 steel and aluminum 6061.With the one-hot encoding, the aluminum 6061, cast iron and 45 steel were represented by 001,

The Experiments and Data Construction
To validate the feasibility of the proposed method in predicting the milling stability under various tool-workpiece assemblies, three tools differing in the diameter, material, teeth number and total length were selected, and each tool was designed to cut three workpieces with different materials, such as cast iron, 45 steel and aluminum 6061.With the one-hot encoding, the aluminum 6061, cast iron and 45 steel were represented by 001, 010 and 100.The specification information of the tools and workpiece materials are described in Tables 1 and 2. The tool with a diameter of 12 mm was selected as the source tool T 2 , and the other two tools T 1 and T 3 with diameters 8 mm and 16 mm, respectively, were taken as the target tools.For the source tool T 2 , sufficient stability data were required to construct an accurate stability prediction model.Then, within the variation range of the source tool overhang length [35 mm, 70 mm], eight discrete values were selected at a small interval of 5 mm to perform the impact tests at the tool tip for obtaining the corresponding FRFs in the X and Y directions as shown in Figure 5. Furthermore, the source tool was used to perform several full-immersion down-milling experiments of cast iron, 45 steel and aluminum 6061 under different f z values, and the mean cutting forces in three directions were measured and utilized to identify the corresponding radial and tangential cutting force coefficients, as listed in Table 2 through the regression analysis.
For the target tools T 1 and T 2 , since the aim was to construct the target milling stability prediction model with fewer impact tests and milling experiments, only four discrete tool overhang lengths separated by 10 mm and two types of workpiece materials were selected for each target tool as listed in Table 3.Similarly, the target tool tip FRFs corresponding to these tool overhang lengths were obtained through the impact tests, and several fullimmersion down-milling experiments under different f z values were carried out to measure the mean cutting forces and to identify the related cutting force coefficients shown in Table 2.In addition, four other discrete tool overhang lengths and one type of workpiece material for each target tool were also selected according to Table 3 to perform the corresponding impact tests and milling tests to obtain the tool tip FRFs and cutting force coefficients, which were only utilized to construct the target testing data for further validating the accuracy of the target milling stability prediction model.Note: l c is the tool overhang length, W m is the workpiece material, n is the spindle speed and a e is the radial cutting width.
These obtained tool tip FRFs and cutting force coefficients were used to conduct the theoretical milling stability analysis to construct the source and target data.For the source tool T 2 , the Latin hypercube sampling method was used to sample 150 combinations of a e , l c and W m within their variation ranges.For each combination of a e , l c and W m , 121 pairs of n and a plim were computed through Equations ( 1)-( 3) within the spindle speed range of 2000 rpm to 8000 rpm at an interval of 50 rpm.Thus, there were 121 × 150 = 18150 combinations of n s , a es , l cs , W ms and a plims to construct the source data D s_T2 .For each target tool, only 150 × 0.1 = 15 combinations of a e , l c and W m were selected using the Latin hypercube sampling method, where the l c had four different values and the W m had two different material types, and each combination was used to compute 61 pairs of n and a plim within the spindle speed range of 2000 rpm to 8000 rpm at an interval of 100 rpm.Then, there were 61 × 15 = 915 combinations of n t , a et , l ct , W mt and a plimt for each target tool, meaning that the target data D t_T1 and D t_T3 for the target tools T 1 and T 3 both had 915 training samples.Moreover, to construct the target testing data, the eight tool overhang lengths and three workpiece materials for each target tool were also taken to compose 150 combinations of a e , l c and W m using the Latin hypercube sampling method, and 121 pairs of n and a plim were computed at an interval of 50 rpm for each combination.Therefore, there were 121 × 150 = 18150 combinations of n, a e , l c , W m and a plim for the target testing data D t_T1t and D t_T3t , respectively.

Details in Constructing a Pretraining Model for the Source Tool
Here, 80% of the source data D s_T2 was randomly selected to be the training data, and the remaining 20% was taken as the testing data.The mean absolute percentage error (MAPE), root mean square error (RMSE) and coefficient of determination(R 2 ) described in Equation ( 8) were introduced to verify the accuracy of the trained prediction model.The MAPE reflects the deviation degree of the predicted value from the actual value, and a smaller MAPE corresponds to a higher accuracy.The RMSE is the difference between the predicted and actual values; a smaller RMSE indicates that the predicted values are close to the actual ones.R 2 stands for the fitting performance of the regression model, which varies from 0 to 1, and a value of R 2 closer to 1 means a better fitting degree.
Here, m is the total number of samples, y i and y pi represent the actual and predicted values, respectively, and y ave is the average of the real value.
The multilayer perceptron was first selected to train the regression model.The input layer had seven neurons representing n, a e , l c and W mt , respectively, and the output layer had one neuron representing a plim .Several MLPs with different parameters were initially trained and evaluated using the indexes listed in Equation ( 8), and the configurations listed in Table 4 showed a better performance.Then, they were finally determined to establish the milling stability model for the source tool T 2 , and the learning rate was set to 0.001.With the 18,150 × 0.8 = 14,520 training samples and the 18,150 × 0.2 = 3630 testing samples, the MLP was trained to predict the a plim values and further used to calculate the MAPE, RMSE, and R 2 values, as listed in Table 5.The MAPE 0.0271, RMSE 0.331 and R 2 0.998 validated the accuracy of the constructed MLP.Furthermore, the source data D s_T2 were also used to train other two regressors, Decision Tree (DT) and Random Forest (RF), and the corresponding MAPE, RMSE and R 2 values were also calculated as listed in Table 5. Comparing these values in Table 5, the MLP had the smallest MAPE and RMSE values and the largest R 2 value, validating that the MLP better approximated the relationship between the machining conditions and the milling stability.In addition, three SLDs plotted by the MLP, DT, and RF models, respectively, were compared in Figure 6.When n > 6300 rpm, the a plim values predicted by the DT and RF models showed obvious deviations from the original ones, while the a plim values predicted by the MLP model still fit the original ones well.Therefore, the MLP was selected to construct the pretraining model for predicting the milling stability under the multiple machining conditions of the source tool.In this work, the machining parameters, tool features and workpiece materials were taken as the inputs of the prediction model, which is different from the traditional prediction model only for one specific workpiece material.Therefore, the advantage of taking the workpiece material as an input when establishing the milling stability prediction model is further discussed.First, the 150 combinations of ae, lc and Wm for the source tool T2 were divided into three parts according to the workpiece materials: Wm1, Wm2 and Wm3.Then, each workpiece material corresponded to 50 combinations of ae and lc, which were used to compute 50 × 121 = 6050 pairs of ns and aplim.Thus, there were three different datasets, namely, Ds_Wm1, Ds_Wm2 and Ds_Wm3, for the three workpiece materials.Each dataset contained 6050 combinations of n, ae, lc, Wm and aplim, 80% of which was randomly selected as the training data and the other 20% of which was taken as the testing data.On this basis, three different MLPs, namely, MLP_Wm1, MLP_Wm2 and MLP_Wm3, were established for the workpiece materials Wm1, Wm2 and Wm3, respectively, to predict the corresponding aplim values.For each workpiece material, other 50 combinations of ae and lc were randomly  In this work, the machining parameters, tool features and workpiece materials were taken as the inputs of the prediction model, which is different from the traditional prediction model only for one specific workpiece material.Therefore, the advantage of taking the workpiece material as an input when establishing the milling stability prediction model is further discussed.First, the 150 combinations of a e , l c and W m for the source tool T 2 were divided into three parts according to the workpiece materials: W m1 , W m2 and W m3 .Then, each workpiece material corresponded to 50 combinations of a e and l c , which were used to compute 50 × 121 = 6050 pairs of n s and a plim .Thus, there were three different datasets, namely, D s_Wm1 , D s_Wm2 and D s_Wm3 , for the three workpiece materials.Each dataset contained 6050 combinations of n, a e , l c , W m and a plim , 80% of which was randomly selected as the training data and the other 20% of which was taken as the testing data.On this basis, three different MLPs, namely, MLP_W m1 , MLP_W m2 and MLP_W m3 , were established for the workpiece materials W m1 , W m2 and W m3 , respectively, to predict the corresponding a plim values.For each workpiece material, other 50 combinations of a e and l c were randomly selected to construct 50 × 121 = 6050 testing samples for validating the feasibility of the constructed MLP.Moreover, the obtained 6050 × 3 = 18,150 testing samples for three workpiece materials were also input to the previously constructed source pretraining model to predict the a plim values.With these testing samples, the calculated MAPE, RMSE and R 2 values for different MLPs are listed in Table 6.Comparing these evaluation index values, the previously obtained source pretraining model showed a higher prediction accuracy than the other three MLPs on the same testing data.For instance, the MAPE values for the three testing datasets of the workpiece materials W m1 , W m2 and W m3 were decreased by 22%, 14% and 29% when using the source pretraining model.This indicates that taking the workpiece material as the input feature can improve the generalization ability of the prediction model.Therefore, it is reasonable and effective to add the workpiece material as an input feature.According to the parameters shown in Table 4, the pretrained MLP in Section 3.2 was a five-layer neural network with a simple structure.Then, the global finetuning strategy was selected to develop the transfer learning.The target training data D t_T1 and D t_T3 obtained in Section 3.1 were used to finetune the pretrained MPL, respectively.The target testing data D t_T1t and D t_T3t obtained in Section 3.1 were taken as the testing datasets, and the calculated values of the evaluation indexes MAPE, RMSE and R 2 are listed in Table 7.Moreover, to verify the feasibility of the proposed pre-training and finetuning-based milling stability prediction model, two other types of milling stability prediction models were taken for comparisons.One was the pretrained source prediction model, and the other was the regressor constructed by only using the target data.For the target tool T 1 , the MAPE, RMSE and R 2 values on the 18,150 testing samples were 0.056, 0.892 and 0.987.For the target tool T 3 , the MAPE, RMSE and R 2 values on the 18,150 testing samples were 0.062, 0.631 and 0.987.Although the MAPE, RMSE and R 2 values were a little far away from their ideal values of 0, 0 and 1, they still reflected an acceptable prediction accuracy of the pretraining and finetuning-based milling stability prediction model when only four tool overhang lengths and two types of workpiece materials were used to construct the target data.The MAPE, RMSE and R 2 values for the other two models are also shown in Table 7.It can be seen that under the working conditions of the two target tools, the MAPE and RMSE values of the proposed pretraining and finetuning-based model were much smaller than those of the other two models, and the R 2 values were closer to 1 and much higher than those of the other models.This comparison validates that the proposed method can benefit the building of the stability prediction model when the number of tool overhang lengths and workpiece materials are decreased.In addition, the SLDs plotted using different prediction models are described in Figure 7, where the a plim values predicted by the proposed method were more consistent with the actual ones calculated through the theoretical milling stability analysis, further indicating the feasibility of the proposed method in training a stability prediction model with fewer tool overhang lengths and workpiece materials.Some experimental stability limits detected from the chatter tests are provided in Figure 8.The curve tendencies of the theoretical SLDs were close to the real conditions, but differences between the predicted and detected stability limits were still observed for some simplifications of the used analytical milling stability model.In the future, we will further extend this proposed method to obtain feedback from few experimental stability limits and improve the prediction accuracy under limited impact tests and chatter experiments.

Influence of the Target Training Data Size
In transfer learning, the number of target training samples has a direct impact on the performance of the prediction model [33].Therefore, different training sample sizes were determined for a comparison and study of their effects on the target milling stability prediction model.The 150 combinations of ae, lc and Wm in the source domain were taken as the basis to determine the target training sample sizes.Within the percentage variation range from 5% to 85%, the number of {ae, lc, Wm} combinations for the target domain varied from 150 × 0.05 = 8 to 150 × 0.85 = 128.For each target tool, the Latin hypercube sampling method was repeatedly used to sample the combinations of ae, lc and Wm within their variation ranges in Table 3.For each combination, 61 pairs of n and aplim were calculated within the range of 2000 rpm to 8000 rpm at an interval of 100 rpm.Therefore, the size of the finally obtained training samples for each target tool varied from 61 × 8 = 488 to 61 × 128 =

Influence of the Target Training Data Size
In transfer learning, the number of target training samples has a direct impact on the performance of the prediction model [33].Therefore, different training sample sizes were determined for a comparison and study of their effects on the target milling stability prediction model.The 150 combinations of ae, lc and Wm in the source domain were taken as the basis to determine the target training sample sizes.Within the percentage variation range from 5% to 85%, the number of {ae, lc, Wm} combinations for the target domain varied from 150 × 0.05 = 8 to 150 × 0.85 = 128.For each target tool, the Latin hypercube sampling method was repeatedly used to sample the combinations of ae, lc and Wm within their variation ranges in Table 3.For each combination, 61 pairs of n and aplim were calculated within the range of 2000 rpm to 8000 rpm at an interval of 100 rpm.Therefore, the size of the

Influence of the Target Training Data Size
In transfer learning, the number of target training samples has a direct impact on the performance of the prediction model [33].Therefore, different training sample sizes were determined for a comparison and study of their effects on the target milling stability prediction model.The 150 combinations of a e , l c and W m in the source domain were taken as the basis to determine the target training sample sizes.Within the percentage variation range from 5% to 85%, the number of {a e , l c , W m } combinations for the target domain varied from 150 × 0.05 = 8 to 150 × 0.85 = 128.For each target tool, the Latin hypercube sampling method was repeatedly used to sample the combinations of a e , l c and W m within their variation ranges in Table 3.For each combination, 61 pairs of n and a plim were calculated within the range of 2000 rpm to 8000 rpm at an interval of 100 rpm.Therefore, the size the finally obtained training samples for each target tool varied from 61 × 8 = 488 to 61 × 128 = 7808.Multiple MLPs were constructed through the proposed pretraining and finetuning-based method, and the testing data D t_T1t and D t_T3t obtained in Section 3. It can be seen from Figure 9 that the prediction accuracy of the two types of models was improved with the increase in the target training sample sizes.Within the percentage variation range from 5% to 85%, the pretraining and finetuning-based method effectively improved the prediction accuracy.When the percentage was 5%, the MPAE, RMSE and R 2 values of the transfer learning-based model were already much better than those of the model directly trained using the target training samples, but they still could not meet the needs of practical applications on the whole.When the percentage was increased to 10%, the MAPE, RMSE and R 2 values of the target tools T1 and T3 were 0.056 and 0.062, 0.892 and 0.631, and 0.987 and 0.987, respectively, indicating an acceptable accuracy for an actual milling process.When the percentage exceeded 10%, the accuracy of the two types of stability prediction models was further improved, but the advantages of the transfer learning were gradually reduced.Since a larger sample size can significantly increase the cost of data acquisition and labeling, the percentage of 10% was selected in Section 3.1 to construct the target data.

Comparison against Instance-Based Transfer Learning
Currently, instance-based transfer learning has also been widely used in milling stability prediction [34].The two-stage TrAdaBoost.R2 proposed by Pardoe [35] is commonly It can be seen from Figure 9 that the prediction accuracy of the two types of models was improved with the increase in the target training sample sizes.Within the percentage variation range from 5% to 85%, the pretraining and finetuning-based method effectively improved the prediction accuracy.When the percentage was 5%, the MPAE, RMSE and R 2 values of the transfer learning-based model were already much better than those of the model directly trained using the target training samples, but they still could not meet the needs of practical applications on the whole.When the percentage was increased to 10%, the MAPE, RMSE and R 2 values of the target tools T 1 and T 3 were 0.056 and 0.062, 0.892 and 0.631, and 0.987 and 0.987, respectively, indicating an acceptable accuracy for an actual milling process.When the percentage exceeded 10%, the accuracy of the two types of stability prediction models was further improved, but the advantages of the transfer learning were gradually reduced.Since a larger sample size can significantly increase the cost of data acquisition and labeling, the percentage of 10% was selected in Section 3.1 to construct the target data.

Comparison against Instance-Based Transfer Learning
Currently, instance-based transfer learning has also been widely used in milling stability prediction [34].The two-stage TrAdaBoost.R2 proposed by Pardoe [35] is commonly used to develop instance-based transfer learning.The basic idea of the two-stage TrAd-aBoost.R2 algorithm is that the weighted source data and target data are combined to train a regression model.Compared with the source data, the target data are more important for training the target regression model f t (•).Therefore, the weights of the target samples are increased iteratively through the adaptive weighting algorithm to emphasize their impact on constructing the regression model.For a milling stability analysis, the instance-based transfer learning requires a basic regression model to predict the limiting axial cutting depth, and the basic regression model should consider the sample weights in the training process.Then, the random forest (RF) and MLP were selected as the basic learners, and 18,150 source training samples and 915 target training samples were combined to train the milling stability regression models using the two-stage TrAdaBoost.R2, respectively.The accuracy of the finally obtained regressors was evaluated using the 18,150 target testing samples.The comparisons between the model-based transfer learning and the instancebased transfer learning are listed in Table 8.The MAPE, RMSE and R 2 values show that the proposed pretraining and finetuning-based method is more suitable for predicting milling stability under multiple machining conditions.

Conclusions
During the milling process, variation in the tool overhang length, workpiece material or machining parameters leads to a change in milling stability, accordingly.Machine learning can effectively deal with the complex regression problem with a variety of input features.However, as a data-driven method, traditional machine learning requires sufficient training data.Facing multiple milling conditions, many impact tests and milling experiments are needed to obtain sufficient stability data, increasing the time consumption and economic cost.Aiming to reduce the number of impact tests and milling experiments for different tool-workpiece assemblies, this paper proposes a transfer-learning-based milling stability prediction method.First, a source tool was selected to perform impact tests under sufficient tool overhang lengths and conduct milling tests on different workpiece materials.Then, the milling stability analysis was conducted to construct sufficient source stability data.For a new tool, only the representative overhang lengths and workpiece materials are selected for the impact tests and milling experiments to construct the target data.On this basis, a source MLP whose inputs are the machining parameters, tool overhang length and workpiece material is trained on the source data.The structural parameters of the source MLP are retrained on the target data through a global finetuning strategy.With this method, fewer experiments are required to train a tool and workpiece-dependent milling stability prediction model.
Case studies were conducted on a vertical machining center to validate the feasibility of the proposed method.An end mill with a diameter of 12 mm was selected as the source tool, and eight tool overhang lengths and three workpiece materials were determined to carry out the impact tests and milling experiments.The obtained tool tip FRFs and cutting force coefficients were taken to analyze the milling stability and then construct the source stability dataset with 18,150 samples.An accurate source MLP for predicting the a plim was pretrained using the source data.For the target tools T 1 and T 3 with the diameters of 8 mm and 16 mm, respectively, only four tool overhang lengths and two workpiece materials of each target tool were selected to perform the experiments and construct the target dataset with 915 samples.Then, two target stability prediction models for T 1 and T 3 , respectively, were obtained by finetuning the pretrained MLP using the corresponding target samples.For each target tool, the smaller MAPE and RMSE values and the R 2 value close to 1 on the 18,150 target testing samples verify the performance of the proposed method.The proposed method was also compared with the instance-based transfer learning method to validate its advantage in constructing a tool-and workpiece-dependent milling stability prediction model with fewer experiments.
In this work, we adopted the analytical milling stability theory to predict the limiting axal cutting depths for chatter avoidance.However, differences between the theoretical stability limits and those detected by the chatter experiments were often observed.Therefore, in our future work, we will extend the proposed method to introduce a few experimental stability limits in the finetuning stage.It is expected that this could allow for the predicted stability limits to be better adapted to the actual milling operations.

Figure 1 .
Figure 1.Dynamic models of milling process with two degrees o

Figure 1 .
Figure 1.Dynamic models of milling process with two degrees of freedom.

Figure 2 .
Figure 2. The SLDs for different tool overhang lengths, workpiece materials and cu ing widths.(a) Different tool overhang lengths, (b) Different workpiece materials, (c) Different cu ing widths.
Transfer learning is usually divided into four types: the instancebased transfer learning, feature-based transfer learning, model-based transfer learning and relation-based transfer learning [26-28].The model-based transfer learning emphasizes that

Figure 2 .
Figure 2. The SLDs for different tool overhang lengths, workpiece materials and cutting widths.(a) Different tool overhang lengths, (b) Different workpiece materials, (c) Different cutting widths.

Figure 3 .
Figure 3.The topological structure of an MLP.

Figure 3 .
Figure 3.The topological structure of an MLP.

Figure 4 .
Figure 4. Transfer learning in predicting the milling stability.

Figure 4 .
Figure 4. Transfer learning in predicting the milling stability.

Sensors 2023 , 19 Figure 5 .
Figure 5. Impact testing on the machine tool and related experimental instruments.

Figure 5 .
Figure 5. Impact testing on the machine tool and related experimental instruments.

Figure 6 .
Figure 6.SLDs plo ed by the MLP, DT and RF models.
Axial cutting depth/mm

Figure 6 .
Figure 6.SLDs plotted by the MLP, DT and RF models.

19 Figure 7 .
Figure 7. SLDs plo ed by different types of prediction models.

Figure 8 .
Figure 8. Comparisons between the predicted SLDs and measured stability limits.

Figure 8 .
Figure 8. Comparisons between the predicted SLDs and measured stability limits.

Figure 8 .
Figure 8. Comparisons between the predicted SLDs and measured stability limits.

19 Figure 9 .
Figure 9. Effects of the target training data size on the prediction models.

Figure 9 .
Figure 9. Effects of the target training data size on the prediction models.

Table 1 .
Specific information of the three different tools.

Table 2 .
The cutting force coefficients for different tool and workpiece materials.

Table 3 .
Features of multi-milling conditions for different types of tools and workpieces.

Table 4 .
Structural parameters of the MLP.

Table 5 .
Evaluation indexes values of different models trained by Ds.

Table 6 .
Comparisons of the evaluation index values for different types of MLPs and testing datasets.

Table 7 .
Evaluation index values for different types of prediction models.
Note: D s is the source data and D t is the target data.

Table 8 .
Effects of the target training data size on the prediction models.