Predicting Surface Residual Stress for Multi-Axis Milling of Ti-6Al-4V Titanium Alloy in Combined Simulation and Experiments

As one essential indicator of surface integrity, residual stress has an important influence on the fatigue performance of aero engines’ thin-walled parts. Larger compressive or smaller tensile residual stress is more prone to causing fatigue cracks. To optimize the state of residual stress, the relationship between the surface residual stress and the machining conditions is studied in this work. A radial basis function (RBF) neural network model based on simulated and experimental data is developed to predict the surface residual stress for multi-axis milling of Ti-6Al-4V titanium alloy. Firstly, a 3D numerical model is established and verified through a cutting experiment. These results are found to be in good agreement with average absolute errors of 11.6% and 15.2% in the σx and σy directions, respectively. Then, the RBF neural network is introduced to relate the machining parameters with the surface residual stress using simulated and experimental samples. A good correlation is observed between the experimental and the predicted results. The verification shows that the average prediction error rate is 14.4% in the σx direction and 17.2% in the σy direction. The effects of the inclination angle, cutting speed, and feed rate on the surface residual stress are investigated. The results show that the influence of machining parameters on surface residual stress is nonlinear. The proposed model provides guidance for the control of residual stress in the precision machining of complex thin-walled structures.


Introduction
Complex curved thin-walled structures using free-form materials have been widely used to improve the performance of final products [1]. Multi-axis machining technology has been used for the finishing of complex curved thin-walled structures due to its excellent accuracy and efficiency [2,3]. Residual stress is inevitably generated during machining, easily causing the deformation of thin-walled parts, and bringing great difficulties to the control of machining quality [4]. Therefore, it is necessary to accurately predict the machining-induced residual stress and determine the optimal residual stress state to improve the fatigue performance of the parts.
In recent decades, many scholars have been exploring methods of predicting machininginduced residual stress. Based on the stress invariance assumption and the stress-strain relaxation method, Li et al. [5] believe that the deformation caused by machining is affected by the magnitude and depth of the initial stress and residual stress. Gao et al. [6] established a semi-analytical model to predict the deformation caused by residual stress in typical machining processes. They found that reducing the residual stress near the blank surface would significantly reduce the machining deformation. Liang et al. [7] proposed a multiphysics prediction model for residual stress considering tool wear. The verification results showed that the surface residual stress changed from compressive stress to tensile stress with the increase in tool wear. Ji et al. [8,9] presented a sensitivity analysis of residual stress based on a verified residual stress prediction model. A parametric study was carried out to investigate the effects of a minimal quantity of lubrication parameters. The results showed that a high maximum compressive residual stress was obtained under a lower flow rate of minimum-quantity lubrication. The advantage of the analytical method is that the residual stress can be quickly calculated, opening up a new and effective approach for the rapid prediction of machining residual stress. However, due to the excessive simplification in the modeling process, there is still a certain distance from engineering applications.
In the past, numerous researchers had worked on numerical modeling of residual stress generation in machining processes. Outeiro et al. [10] numerically analyzed the effects of tool geometry parameters on residual stress during cutting of AISI316L steel. The research showed that increasing the tool edge radius and decreasing the tool rake angle resulted in an increase in residual compressive stress. Arrazola et al. [11] used 3D numerical simulation to predict the residual stress distribution in the cutting of IN718 alloy, and the influence of process parameters on the residual stress distribution was analyzed. They concluded that the surface residual stress and the maximum compressive peak stress both increased with the increase in cutting speed. Xin et al. [12] numerically analyzed the effects of cutting force, cutting temperature, and microstructure on residual stress during disc milling. They discovered that the greater the cutting speed, the smaller the residual compressive stress, and that residual compressive stress changes from compressive stress to tensile stress with the increase in depth. Sahu et al. [13] used 3D numerical simulation to obtain large amounts of simulation data, and the response surface methodology was used to predict the residual stress of turning Ti-6Al-4V. The results showed that the surface residual stress was compressive stress within the threshold of the selected process parameters. Özel and Ulutan [14] presented a 3D numerical model to study the effects of uncoated tools and TiAlN-coated tools on the residual stress of turning Ti-6Al-4V titanium alloy. The research showed that the tool coating had little effect on the circumferential residual stress. However, the coated tools had a greater impact on the peak residual compressive stress compared with the uncoated tools. Mishra et al. [15] simulated the effects of TiAlN-coated tools on cutting temperature and residual stress by 2D and 3D numerical simulation. They found that the lower temperature of TiAlN-coated tools would reduce the tensile residual stress of the machined workpiece. The above finding show that numerical simulation has high prediction accuracy and offers advantages in solving various cutting process parameters simultaneously. However, the problem of efficiency is still a shortcoming that is difficult to solve.
In recent years, with the continuous improvement and development of machine learning theory, a variety of methods based on mature machine learning theory have also been introduced into residual stress prediction and processing parameter optimization research, greatly improving models' prediction accuracy [16]. Based on Gaussian process regression, Chen et al. [17] established a surface residual stress prediction model for the end milling process. They found that the feed rate had the greatest effect on surface residual stresses. Elsheikh et al. [18] predicted the residual stress induced by cutting IN718 alloy using a hybrid learning model of the pigeon optimization algorithm and particle swarm optimization. The effect of the cutting conditions on the induced relative errors was investigated. Jafarian [19] used an artificial neural network method to determine the optimal machining parameters to predict residual stress induced by finishing Inconel 718.
The validation experiments showed that the prediction accuracy of the proposed hybrid machine model was better than that of traditional methods. Xu et al. [20] introduced k-nearest neighbors and artificial neural network methods to predict the effects of different cutting parameters on surface residual stress during high-speed milling. They concluded that the feed rate is the most important factor affecting the residual stresses.
The understanding of the above works has allowed for the prediction of residual stresses and a deeper understanding of the mechanisms of residual stresses using analytical and numerical models. In addition, residual stress prediction through intelligent optimiza-tion algorithms is a new trend. However, there is currently less literature on the prediction of residual stress induced by multi-axis milling.
In this study, an RBF neural network model based on simulated and experimental data is developed to predict the surface residual stress for multi-axis milling of Ti-6Al-4V titanium alloy. Firstly, a 3D numerical model is established for predicting surface residual stress in Ti-6Al-4V titanium alloy subjected to ball-end milling. Experiments in multi-axis milling and subsequent X-ray diffraction measurements are conducted, and the basic data of residual stress under various machining parameters are obtained via experimentation and simulation. Secondly, the RBF neural network is introduced to relate machining parameters and the surface residual stress. Finally, the interaction effect of machining parameters on surface residual stress is analyzed. The optimal conditions can be obtained to control the surface residual stress in the multi-axis milling of Ti-6Al-4V titanium alloy.

Simulation Details
A 3D numerical model of multi-axis milling of Ti-6Al-4V titanium alloy was developed using the explicit time integration method, and a coupled thermomechanical transient analysis was performed. The numerical model was developed using ABAQUS software. The initial boundary conditions and mesh settings of the numerical model of multi-axis milling are shown in Figure 1. The tool diameter is 5 mm, the rake angle is 6 • , the relief angle is 10 • , and the helix angle is 40 • . The workpiece is a cube of 6 mm × 6 mm × 6 mm, and the cutting depth is 0.2 mm. To simulate the stable cutting stage, the workpiece was geometrically modified to establish a cutting area, and a 0.2 mm arc-shaped cutting depth was formed according to the tool size. The x-, y-, and z-directions are fixed at the bottom of the workpiece. The translation speed of the tool in the y-direction simulates the actual feed, and the rotation speed of the tool axis is given to simulate the rotation of the spindle. timization algorithms is a new trend. However, there is currently less literature on t prediction of residual stress induced by multi-axis milling.
In this study, an RBF neural network model based on simulated and experimen data is developed to predict the surface residual stress for multi-axis milling of Ti-6Altitanium alloy. Firstly, a 3D numerical model is established for predicting surface residu stress in Ti-6Al-4V titanium alloy subjected to ball-end milling. Experiments in multi-a milling and subsequent X-ray diffraction measurements are conducted, and the basic d of residual stress under various machining parameters are obtained via experimentati and simulation. Secondly, the RBF neural network is introduced to relate machining p rameters and the surface residual stress. Finally, the interaction effect of machining p rameters on surface residual stress is analyzed. The optimal conditions can be obtained control the surface residual stress in the multi-axis milling of Ti-6Al-4V titanium alloy.

Simulation Details
A 3D numerical model of multi-axis milling of Ti-6Al-4V titanium alloy was dev oped using the explicit time integration method, and a coupled thermomechanical tran ent analysis was performed. The numerical model was developed using ABAQUS so ware. The initial boundary conditions and mesh settings of the numerical model of mu axis milling are shown in Figure 1. The tool diameter is 5 mm, the rake angle is 6°, t relief angle is 10°, and the helix angle is 40°. The workpiece is a cube of 6 mm × 6 mm mm, and the cutting depth is 0.2 mm. To simulate the stable cutting stage, the workpie was geometrically modified to establish a cutting area, and a 0.2 mm arc-shaped cutti depth was formed according to the tool size. The x-, y-, and z-directions are fixed at t bottom of the workpiece. The translation speed of the tool in the y-direction simulates t actual feed, and the rotation speed of the tool axis is given to simulate the rotation of t spindle. To improve the authenticity and accuracy of the simulation, the initial temperatu field was set for the workpiece and the tool, and the value was 25 ℃. General cont mode was set, defined at the cutting area of the tool and the workpiece. The tool-wo piece-chip frictions followed Coulomb's friction law, and the friction coefficient was To improve the authenticity and accuracy of the simulation, the initial temperature field was set for the workpiece and the tool, and the value was 25 • C. General contact mode was set, defined at the cutting area of the tool and the workpiece. The tool-workpiecechip frictions followed Coulomb's friction law, and the friction coefficient was set as 0.24 [21]. The heat generated by friction is equally distributed to the tool and the workpiece. Due to the irregular shape of the tool, the local seed distribution was selected for the cutting edge, and the characteristic length was 0.05 mm. The mesh type was selected as the temperature-displacement coupled tetrahedral element (C3D4T). The workpiece was meshed by a temperature-displacement coupled hexahedron, and the reduced integration mode (C3D8RT) was selected to improve the simulation efficiency without affecting the accuracy of the results [11]. The cutting area of the workpiece was geometrically divided, and the mesh was locally refined to reduce the number of elements. The characteristic length was 0.025 mm.

Governing Equations
To simulate the residual stress induced by the multi-axis milling process, it is necessary to solve the nonlinear spatial variation control equations in the region of the given boundary conditions and initial conditions. Equations (1)-(6) list a set of governing equations that needed to be solved in the present work [22]: where Equation (1) is the equilibrium equation, and the terms ∇ and · σ are the gradient operator and stress rate, respectively. Equation (2) is the strain rate ( are the elastic strain, viscoplastic strain rate, and thermal strain rate, respectively. Equation (4) is the flow rule, which gives the viscoplastic flow direction of the ideal plasticity theory, and the occurrence condition is determined by the yield criterion in Equation (5). Equation (6) represents the heat equation, where the parameters K, ρ, c, and Dq gen /Dt are the thermal conductivity, density, specific heat, and heat generation rate, respectively.
Metal cutting is a complex thermomechanical coupling process that involves many basic theoretical disciplines, such as elastoplastic mechanics, thermodynamics, fracture mechanics, and tribology. The constitutive model of the material determines the results of force and stress. The chip separation criteria determine whether the chip can be generated correctly. Considering the influence of various factors, the widely recognized Johnson-Cook model expressed in Equation (7) is used to characterize the constitutive relationship, and the Johnson-Cook dynamic failure model expressed in Equation (8) is used as the chip separation criterion.
where the flow stress (σ) of the material is expressed by the strain (ε), strain rate ( · ε), and temperature (T); · ε 0 is the equivalent strain rate, T is the material temperature of the workpiece, T r is the room temperature, and T m is the melting temperature. In Equation (7), the constants A, B, and C are the initial yield stress, hardening modulus, and strain rate variation coefficient, respectively, while the constants m and n represent the thermal softening coefficient and work hardening index, respectively. In Equation (8), d 1 , d 2 , and d 3 are the strain-dependent damage parameters. The parameters d 4 and d 5 represent the strain-rate-dependent damage parameter and the thermal softening parameter, respectively. The Johnson-Cook constitutive model parameters and damage model parameters for Ti-6Al-4V titanium alloy are listed in Tables 1 and 2, respectively. The thermomechanical properties of the Ti-6Al-4V titanium alloy are shown in Table 3. Table 1. Johnson-Cook constitutive model parameters of Ti-6Al-4V [23]. Table 2. Johnson-Cook damage model parameters of Ti-6Al-4V [24]. Table 3. Thermomechanical properties of titanium alloy Ti-6Al-4V [25].

Data Extraction of Simulated Residual Stress
The simulation of residual stress can be divided into four basic processes: Firstly, the cutter performs the cutting motion according to the given cutting parameters to complete the milling process. Secondly, the tool is retreated to eliminate the influence of cutting force on the stress and strain of the workpiece. Thirdly, the fixed constraint at the bottom of the workpiece is removed and transformed into a three-point constraint, so that the workpiece can deform freely. Finally, the workpiece is set with thermal convection contact to complete cooling. Residual stress is unevenly distributed on the workpiece due to discontinuous and continuous changes in the cutting point. Therefore, five test points (RS1, RS2, RS3, RS4, and RS5) of the machined surface in Figure 2 are selected to obtain the average distribution of surface residual stress.

Verification Experiment
The experiments of multi-axis milling of Ti-6Al-4V titanium alloy were conducted on

Verification Experiment 2.4.1. Machining Experiment
The experiments of multi-axis milling of Ti-6Al-4V titanium alloy were conducted on a five-axis vertical NC (JingDiao, Beijing, China)under dry cutting conditions. The milling method was climb cutting. The workpiece was machined into a rectangular block with dimensions of 60 mm × 40 mm × 25 mm. The workpiece was annealed and stressrelieved in the furnace before the experiment. The surface residual stress of the treated workpiece was −32.8 ± 12.5 MPa in the σ x direction and −27.6 ± 15.4 MPa in the σ y direction. To measure the initial residual stress inside the workpiece, the workpiece was electropolished with an electropolishing instrument (SOLY, Shanghai, China), and the polishing was stopped when the residual stress value approached zero. The residual stress was approximately zero when the depth was 80 µm (−7.6 ± 13.9 MPa in the σ x direction and 15.1 ± 20.3 MPa in the σ y direction). The tool used in the experiment was a four-tooth ball-end mill of R2.5 mm × 25 mm × 65 mm. The tool material was carbide (K 44) and uncoated. Ball-end milling with a rake angle of 6 • , relief angle of 10 • , and helix angle of 40 • is often adopted. The overhang length was fixed as 35 mm. The machining parameters in all experiments were fixed at an axial milling depth of a p = 0.2 mm and a radial milling depth of a e = 0.2 mm. Additionally, a new cutting edge was employed to avoid the effect of cutter wear on the cutting edge for each experiment. The selection of machined parameters mainly refers to the parameters in the actual production of the blades. There are three design variables: the inclination angle (θ), the cutting speed (V c ), and the feed rate (f z ). The cutting force was measured by a three-way dynamic piezoelectric dynamometer, which was connected to the computer via a charge amplifier and data acquisition. In the machine coordinate system, the force components are defined as main force Fx (N), feed force Fy (N), and radial force Fz (N). The cutting force signal was collected using Dewesoftx software. The multi-axis milling experiment and cutting force measurements are shown in Figure 3.

Residual Stress Measurement
Due to the relationship between the macroscopic residual stress and the final perf mance of the component, only the macroscopic residual stress is studied in this pap This is considered to be one of the main factors affecting machining accuracy, dimensio stability, and product life. The LXRD MG2000 X-ray residual stress testing syst (PROTO, Toronto, Canada)was used to measure the residual stress of the specimens. K-Alpha radiation was used in the residual stress test with the sin2W method. The t

Residual Stress Measurement
Due to the relationship between the macroscopic residual stress and the final performance of the component, only the macroscopic residual stress is studied in this paper. This is considered to be one of the main factors affecting machining accuracy, dimensional stability, and product life. The LXRD MG2000 X-ray residual stress testing system (PROTO, Toronto, Canada)was used to measure the residual stress of the specimens. Cu K-Alpha radiation was used in the residual stress test with the sin2W method. The test voltage was 25 kV and the electric current was 30 mA. A circular spot with a diameter of 3 mm was used. The exposure time was 2 s, and the number of exposures was 10. The Bragg angle was set to 142 • , and the swing range of the β angle was ±25 • . In order to ensure the validity of the residual stress test results, each point was measured three times, and the average value was calculated until the error was within the allowable range. The secondary stress measurements were performed using a turntable, as shown in Figure 4a. The X-ray stress measurements were based on crystal Bragg diffraction. When monochromatic X-rays were incident on the polycrystal shown in Figure 4b, the diffraction of the crystal occurred at a satisfactory angle: where λ is the wavelength of the X-ray, d is the interplanar spacing of the atomic plane, and θ d is the angle between the incident ray and the atomic plane, called the Bragg angle. The lattice plane {213} of Ti was used for the measurement. The cutting load causes changes in the lattice spacing on the workpiece surface. The stress-free value changes from d 0 to d 0 + ∆d, and the strain in the normal direction of the diffraction plane is as follows: where, θ 0 is the diffraction angle of the unstressed crystal.

Simulated and Measured Cutting Forces and Chip Morphology
The consistency of simulated and experimental cutting force results can improve the reliability of residual stress prediction. Figure 5 displays the filtered cutting force comparison between the simulated results and those measured by dynamometer. Ball-end milling entails intermittent cutting. The collection frequency of cutting force depends on the spindle speed and the number of cutting edges. Since the tool has four edges, four peaks and valleys can be observed in Fx, Fy, and Fz. It can be observed from the experimental and simulated cutting forces that the variation ranges for cutting force per cutting edge are small, and the milling process is stable. The error rates of the maximum cutting force of Fx in the three groups of machining parameters are 12.7%, 6.4%, and 4.8%, respectively; the average error is 7.9%. The error rates of the maximum cutting force of Fy in the three groups of machining parameters are 11.5%, 14.8%, and 10.3%, respectively; the average error is 12.2%. The error rates of the maximum cutting force of Fz in the three groups of machining parameters are 5.4%, 13.7%, and 8.6%, respectively; the average error rate is 9.2%. The results show that the established numerical model has high prediction accuracy for cutting force.

Simulated and Measured Cutting Forces and Chip Morphology
The consistency of simulated and experimental cutting force results can improve the reliability of residual stress prediction. Figure 5 displays the filtered cutting force comparison between the simulated results and those measured by dynamometer. Ball-end milling entails intermittent cutting. The collection frequency of cutting force depends on the spindle speed and the number of cutting edges. Since the tool has four edges, four peaks and valleys can be observed in F x , F y , and F z . It can be observed from the experimental and simulated cutting forces that the variation ranges for cutting force per cutting edge are small, and the milling process is stable. The error rates of the maximum cutting force of Fx in the three groups of machining parameters are 12.7%, 6.4%, and 4.8%, respectively; the average error is 7.9%. The error rates of the maximum cutting force of Fy in the three groups of machining parameters are 11.5%, 14.8%, and 10.3%, respectively; the average error is 12.2%. The error rates of the maximum cutting force of Fz in the three groups of machining parameters are 5.4%, 13.7%, and 8.6%, respectively; the average error rate is simulated cutting forces that the variation ranges for cutting force per cutting edge are small, and the milling process is stable. The error rates of the maximum cutting force of Fx in the three groups of machining parameters are 12.7%, 6.4%, and 4.8%, respectively; the average error is 7.9%. The error rates of the maximum cutting force of Fy in the three groups of machining parameters are 11.5%, 14.8%, and 10.3%, respectively; the average error is 12.2%. The error rates of the maximum cutting force of Fz in the three groups of machining parameters are 5.4%, 13.7%, and 8.6%, respectively; the average error rate is 9.2%. The results show that the established numerical model has high prediction accuracy for cutting force.  In addition to cutting forces, chip formation is also very important for the study of various complex machining processes. The comparison of chip morphology between simulated and experimental results is shown in Figure 6. It can be seen that both the simulated and experimental chip surfaces have serrated wrinkles, and that the degree of spatial curling is similar. The reason for this is that the high friction between the tool and the chip leads to excessive temperature in the cutting zone, resulting in a large deformation of the chip as it flows over the rake face. The good consistency between the wrinkled and curled chips obtained by numerical simulation and the real experiments can prove that the actual milling process is balanced and stable. The similarity of chip formation can also directly reflect the accuracy and effectiveness of the numerical model.  Table 4. It can be seen that the experimental surface residual stress ranges from −202.2 MPa to −269.6 MPa in the σ x direction, and from −135.4 MPa to −221.7 MPa in the σ y direction. The established numerical model has a maximum prediction error rate of 16.1% and a minimum error rate of 4.9% in the σ x direction, and a maximum prediction error rate of 23.2% and a minimum error rate of 7.8% in the σ y direction. The total average prediction error rate of surface residual stress is 11.6% and 15.2% in the two directions, respectively. The average error is less than 20%, showing that the established 3D numerical model can better predict the surface residual stress of multi-axis milling. and experimental chip surfaces have serrated wrinkles, and that the degree of spatial curling is similar. The reason for this is that the high friction between the tool and the chip leads to excessive temperature in the cutting zone, resulting in a large deformation of the chip as it flows over the rake face. The good consistency between the wrinkled and curled chips obtained by numerical simulation and the real experiments can prove that the actual milling process is balanced and stable. The similarity of chip formation can also directly reflect the accuracy and effectiveness of the numerical model.  Table 4. It can be seen that the experimental surface residual stress ranges from −202.2 MPa to −269.6 MPa in the σx direction, and from −135.4 MPa to −221.7 MPa in the σy direction. The established numerical model has a maximum prediction error rate of 16.1% and a minimum error rate of 4.9% in the σx direction, and a maximum prediction error rate of 23.2% and a minimum error rate of 7.8% in the σy direction. The total average prediction error rate of surface residual stress is 11.6% and 15.2% in the two directions, respectively. The average error is less than 20%, showing that the established 3D numerical model can better predict the surface residual stress of multi-axis milling.

RBF Neural Network
An RBF neural network is a forward network with a single hidden layer, which can be used for function approximation and model prediction [26]. RBF neural networks are good at modeling nonlinear data, which can be trained in one stage and can also quickly learn a given application. The basic RBF neural network structure includes an input layer, a hidden layer, and an output layer. The input layer consists of some perceptual units that connect the network with the external environment. The RBF network has only one hidden layer, which nonlinearly transforms the input vector from the input space to the hidden space. The output of the network is a linear weight of the hidden units, as shown in Figure 8. The hidden layer can be linearly combined with the output layer, and the processing speed is extremely rapid [27]. The mathematical definition of the hidden neuron is shown in Equation (11):

RBF Neural Network
An RBF neural network is a forward network with a single hidden layer, which can be used for function approximation and model prediction [26]. RBF neural networks are good at modeling nonlinear data, which can be trained in one stage and can also quickly learn a given application. The basic RBF neural network structure includes an input layer, a hidden layer, and an output layer. The input layer consists of some perceptual units that connect the network with the external environment. The RBF network has only one hidden layer, which nonlinearly transforms the input vector from the input space to the hidden space. The output of the network is a linear weight of the hidden units, as shown in Figure 8. The hidden layer can be linearly combined with the output layer, and the processing speed is extremely rapid [27]. The mathematical definition of the hidden neuron is shown in Equation (11): The neurons in the input layer are directly connected to the neurons in the hidden layer. The hidden layer contains multiple kernel functions ϕ j (x), which contain a center of the j-th input data point x j and width ϕ j (spread).
The Gaussian function is used as the basis function; it is defined in Equation (12): where x represents the n-dimensional input vector, while σ i is the i-th perceptual variable, which determines the width of the basis function around the center point. The size of the x j value reflects the response width of the output to the input. The input of the output layer is the weighted summation of the outputs of the neurons in the hidden layers. Since the excitation function is a purely linear function, it is defined in Equation (13): where ω j represents the output weights. The weights of only a few output layers need to be adjusted and determined during the RBF network training process. The RBF neural network has optimal approximation and global optimal performance, meaning that it does not easily converge to the local optimal solution, and the network training needs to adjust fewer parameters. Therefore, RBF neural networks have been widely used in solving nonlinear problems.

Prediction Model of Surface Residual Stress
Residual stress is very sensitive to machining parameters, and milling is a nonlinear large-deformation process. In theory, RBF neural networks are suitable for this engineering problem. The three input variables in this paper are the inclination angle (θ), the cutting speed (V c ), and the feed rate (f z ). The output layer is the surface residual stress value in both the σ x and σ y directions. The input vector is x = [θ, V c , f z ]. The dimensions of the three are not consistent, so the input vector is normalized.
where The spread parameter was 0.42. The 40 groups of experimental and simulation data were used as training samples, as shown in Table 5, to train the network and obtain the optimal network structure. Five additional experiments were selected within the design parameter threshold to verify the accuracy of the RBF model, and the experimental conditions remained unchanged. Therefore, the number of hidden layer neurons was only 40 for the residual stresses in each direction. The index of error evaluation is defined as shown in Equation (15) where e is the average error, pre i χ is the predicted value of the RBF neural network, i χ is the experimental or simulated value, and I is the total number of experiments and simulations. Figure 10 shows the comparison between the fitting value of the trained RBF neural network and the experimental value. It can be seen that the fitting value of the RBF neural network at the experimental point almost completely coincides with the experimental result. This indicates that the RBF model has completed the best approximation to the sample point.  Figure 9. Flowchart of the prediction model based on an RBF neural network.
The spread parameter was 0.42. The 40 groups of experimental and simulation data were used as training samples, as shown in Table 5, to train the network and obtain the optimal network structure. Five additional experiments were selected within the design parameter threshold to verify the accuracy of the RBF model, and the experimental conditions remained unchanged. Therefore, the number of hidden layer neurons was only 40 for the residual stresses in each direction. The index of error evaluation is defined as shown in Equation (15): where e is the average error, χ pre i is the predicted value of the RBF neural network, χ i is the experimental or simulated value, and I is the total number of experiments and simulations. Figure 10 shows the comparison between the fitting value of the trained RBF neural network and the experimental value. It can be seen that the fitting value of the RBF neural network at the experimental point almost completely coincides with the experimental result. This indicates that the RBF model has completed the best approximation to the sample point.

Verification of Residual Stress
To evaluate the applicability of the designed neural network, five groups of machining parameters within the design parameter threshold were selected for verification experiments. The experimental conditions remained unchanged. The comparison of the pre-

Verification of Residual Stress
To evaluate the applicability of the designed neural network, five groups of machining parameters within the design parameter threshold were selected for verification experiments. The experimental conditions remained unchanged. The comparison of the predicted surface residual stress and the corresponding experimental results is shown in Figure 11. Clearly, the predicted values are consistent with the experimental values for all five groups of machining parameters. The surface residual stress is residual compressive stress. The experimental and predicted values and errors of the surface residual stress of the five groups of machining parameters are shown in Table 6. It can be observed that the error range of the experimental and predicted values for the five groups of machining parameters is 28.2 MPa~48.6 MPa in the σ x direction; the error rates are 12.9%, 9.8%, 10.4%, 16.2%, and 22.7%, respectively. The average prediction error of surface residual stress is 14.4%. The prediction error range is between 25.5 MPa~68.5 Mpa in the σ y direction, and the error rates are 14.2%, 18.7%, 11.1%, 22.6%, and 19.3%, respectively. The average prediction error of surface residual stress is 17.2%. The prediction error of the surface residual stress in the σ x direction is smaller than that in the σ y direction. Meanwhile, the error of the established prediction model is slightly higher than that of the simulation model. The reason for this is that a large number of simulation samples are selected in the prediction model, and there is a certain deviation between the simulation and the experiment. Overall, this validation shows that surface residual stress can be well predicted using the modeling method presented in this paper.

Influence of Machining Parameters
Cutting is a highly nonlinear, high-temperature, and large-deformation elastoplastic behavior [28]. The thermal-related properties of the material are in an unstable state. Meanwhile, the thermomechanical coupling effect causes alternating fluctuations of thermal stress and mechanical stress inside the material, which is a typical material nonlinear and geometric nonlinear problem [29]. The mechanical behavior of tool-workpiece contact is also in a time-varying state during the cutting process. For the stress solution inside the surface material of the workpiece, the time-varying characteristics of the contact boundary make the problem more complicated, which is a typical nonlinear boundary condition problem. Hence, there may be a high degree of nonlinearity between the machining parameters and the cutting response, and it is difficult to obtain a linear mapping by simply transforming the sample data sequence. Figures 12 and 13 show the interactive effects of the machining parameters on surface residual stress in the σx and σy directions, respectively. It can be seen that the influence of the inclination angle, milling speed, and feed rate on surface residual stress is strongly nonlinear. In Figures 12a-c, the maximum value of residual compressive stress is always located in the middle parameter region in the σx direction. Similar laws also apply in the σy direction when the feed rate is small, as shown in Figure 13a. Parameters that are too large or too small will lead to the transformation of the residual stress form from compression to tension. The residual tensile stress first decreases and then increases with in-

Influence of Machining Parameters
Cutting is a highly nonlinear, high-temperature, and large-deformation elastoplastic behavior [28]. The thermal-related properties of the material are in an unstable state. Meanwhile, the thermomechanical coupling effect causes alternating fluctuations of thermal stress and mechanical stress inside the material, which is a typical material nonlinear and geometric nonlinear problem [29]. The mechanical behavior of tool-workpiece contact is also in a time-varying state during the cutting process. For the stress solution inside the surface material of the workpiece, the time-varying characteristics of the contact boundary make the problem more complicated, which is a typical nonlinear boundary condition problem. Hence, there may be a high degree of nonlinearity between the machining parameters and the cutting response, and it is difficult to obtain a linear mapping by simply transforming the sample data sequence. Figures 12 and 13 show the interactive effects of the machining parameters on surface residual stress in the σ x and σ y directions, respectively. It can be seen that the influence of the inclination angle, milling speed, and feed rate on surface residual stress is strongly nonlinear. In Figure 12a-c, the maximum value of residual compressive stress is always located in the middle parameter region in the σ x direction. Similar laws also apply in the σ y direction when the feed rate is small, as shown in Figure 13a. Parameters that are too large or too small will lead to the transformation of the residual stress form from compression to tension. The residual tensile stress first decreases and then increases with increasing feed rate. In the σ y direction, the cutting speed and inclination angle have little effect on the residual stress when the feed rate exceeds 0.05 mm/rev. A lower cutting speed and larger inclination angle can lead to larger residual compressive stress, as shown in Figure 13b,c. Therefore, a large residual compressive stress can be obtained at an inclination angle of 55 • and a cutting speed of about 100 m/min.  Figures 12 and 13 show the interactive effects of the machining parameters on surface residual stress in the σx and σy directions, respectively. It can be seen that the influence of the inclination angle, milling speed, and feed rate on surface residual stress is strongly nonlinear. In Figures 12a-c, the maximum value of residual compressive stress is always located in the middle parameter region in the σx direction. Similar laws also apply in the σy direction when the feed rate is small, as shown in Figure 13a. Parameters that are too large or too small will lead to the transformation of the residual stress form from compression to tension. The residual tensile stress first decreases and then increases with increasing feed rate. In the σy direction, the cutting speed and inclination angle have little effect on the residual stress when the feed rate exceeds 0.05 mm/rev. A lower cutting speed and larger inclination angle can lead to larger residual compressive stress, as shown in In Figures 12d-f and 13d-f, it can be observed that the variation law of residual stress is relatively similar in the two directions. The low cutting speed and feed rate can generate a large residual compressive stress when the inclination angle is 35°, which is about −300 MPa in the σx direction and −450 MPa in the σy direction. As the inclination angle increases from 35° to 55°, the maximum residual tensile stress moves from a small feed rate to a large feed rate. The maximum value is located in the area where the feed rate is higher than 0.05 mm/rev, and the maximum residual stress first increases and then decreases. However, the trend is the opposite when the inclination angle increases to 75°. This confirms that an inclination angle that is too large or too small will lead to a reduction in The interactive effects of the feed rate and inclination angle on surface residual stress are shown in Figures 12g-i and 13g-i. The maximum residual compressive stress is located at the small feed rate threshold. A small inclination angle can produce a large residual compressive stress when the cutting speed is slow. However, a large residual compressive stress can be obtained by selecting the inclination angle near the neighborhood of 55° when the cutting speed is high. The residual compressive stress has a trend of first increasing and then decreasing with the increase in cutting speed. To intuitively show the optimal region of residual stress, the color is used to describe the value of residual stress. It can be seen that the maximum value of global compressive stress is located in the mazarine area. In Figures 12d-f and 13d-f, it can be observed that the variation law of residual stress is relatively similar in the two directions. The low cutting speed and feed rate can generate a large residual compressive stress when the inclination angle is 35 • , which is about −300 MPa in the σ x direction and −450 MPa in the σ y direction. As the inclination angle increases from 35 • to 55 • , the maximum residual tensile stress moves from a small feed rate to a large feed rate. The maximum value is located in the area where the feed rate is higher than 0.05 mm/rev, and the maximum residual stress first increases and then decreases. However, the trend is the opposite when the inclination angle increases to 75 • . This confirms that an inclination angle that is too large or too small will lead to a reduction in residual compressive stress. Overall, a large residual compressive stress can be obtained when the inclination angle is 55 • . The maximum residual compressive stress is obtained in the neighborhood with a cutting speed of 100 m/min and a feed rate of 0.05 mm/rev.
The interactive effects of the feed rate and inclination angle on surface residual stress are shown in Figures 12g-i and 13g-i. The maximum residual compressive stress is located at the small feed rate threshold. A small inclination angle can produce a large residual compressive stress when the cutting speed is slow. However, a large residual compressive stress can be obtained by selecting the inclination angle near the neighborhood of 55 • when the cutting speed is high. The residual compressive stress has a trend of first increasing and then decreasing with the increase in cutting speed. To intuitively show the optimal region of residual stress, the color is used to describe the value of residual stress. It can be seen that the maximum value of global compressive stress is located in the mazarine area.

Conclusions
In the present study, for the purpose of predicting the surface residual stress induced by multi-axis milling of Ti-6Al-4V titanium alloy, a new prediction model is proposed, combining simulation and experimentation. The experimental results verify the accuracy of the established model. Some conclusions can be summarized as follows: (1) A 3D numerical model was established to predict the surface residual stress induced by multi-axis milling of Ti-6Al-4V titanium alloy. The simulated and experimental values followed a similar trend and gave good agreement between them. The total average prediction error rate of surface residual stress was 11.6% and 15.2% in the σ x and σ y directions, respectively.
(2) The verification shows that the surface residual stress can be well predicted by using the modeling method based on the RBF neural network presented in this paper. Within the thresholds of cutting speed of 20~180 m/min, feed rate of 0.01~0.09 mm/rev, and roll angle of 35~75 • , the prediction error ranges from 28.2 MPa to 48.6 MPa in the σ x direction, and from 25.5 MPa to 68.5 MPa in the σ y directions. The average prediction error rates of surface residual stress in the two directions are 14.4% and 17.2%, respectively. The proposed prediction model in this paper, based on experimentation and simulation, can effectively predict the surface residual stress induced by multi-axis milling of Ti-6Al-4V titanium alloy. (3) The inclination angle, cutting speed, and feed rate have a strong nonlinear relationship with the surface residual stress. Parameters that are too large or too small will lead to the transformation of the surface residual stress form from compression to tension.