Experimental Analysis and Prediction Model of Milling-Induced Residual Stress of Aeronautical Aluminum Alloys

Aeronautical thin-walled frame workpieces are usually obtained by milling aluminum alloy plates. The residual stress within the workpiece has a significant influence on the deformation due to the relatively low rigidity of the workpiece. To accurately predict the milling-induced residual stress, this paper describes an orthogonal experiment for milling 7075 aluminum alloy plates. The milling-induced residual stress at different surface depths of the workpiece, without initial stress, is obtained. The influence of the milling parameters on the residual stress is revealed. The parameters include milling speed, feed per tooth, milling width, and cutting depth. The experimental results show that the residual stress depth in the workpiece surface is within 0.12 mm, and the residual stress depth of the end milling is slightly greater than that of the side milling. The calculation models of residual stress and milling parameters for two milling methods are formulated based on regression analysis, and the sensitivity coefficients of parameters to residual stress are calculated. The residual stress prediction model for milling 7075 aluminum alloy plates is proposed based on a back-propagation neural network and genetic algorithm. The findings suggest that the proposed model has a high accuracy, and the prediction error is between 0–14 MPa. It provides basic data for machining deformation prediction of aluminum alloy thin-walled workpieces, which has significant application potential.


Introduction
Aeronautical aluminum alloy has a high specific strength, as well as excellent mechanical and machining properties. As an ideal structural material, it is widely used to manufacture aeronautical workpieces [1][2][3][4][5]. Thin-walled frame structures machined from aluminum alloy plates is the first choice for aeronautical workpieces to improve production efficiency and reduce product weight, assembly time, and production costs [6][7][8]. However, material removal of a thin-walled frame workpiece is large, and the workpiece stiffness after machining is low. During the machining process, the internal residual stress of the plate changes in a complicated way, which causes the workpiece to warp or twist after machining. The workpiece deformation causes a high rejection rate or additional correction procedures, which significantly increases production costs and reduces production efficiency [9][10][11]. The cutting-induced residual stress is an essential factor affecting workpiece deformation and accuracy stability [12]. As the residual stress increases, the thin-walled workpiece deformation increases [13]. In addition, the cutting-induced residual stress affects the service life and performance of the workpiece [14,15].
Residual stress is mainly caused by the combined effects of cutting force and cutting heat during the machining process [16]. Scholars have carried out a great deal of research on the machining-induced residual stress of structural parts. Shan et al. [17] proposed an improved prediction model for the residual stress of an orthogonal cutting process, considering the mechanical and thermal stress based on contact mechanics, the Johnson-Cook constitutive model, and the slip line theory. Starting from the geometric parameters of the milling cutter, Shen et al. [18] created a finite element model to investigate the influence of the cutting edge shape on the residual stress distribution in the machined surface. Ji et al. [19] studied the residual stress distribution in square pocket milling of 2219 aluminum alloy. They suggested that the axial cutting depth is the most critical factor influencing the residual stress distribution of the machined pocket surface. As the axial cutting depth increased, the tensile stress increased. The altered feed rate and radial cutting depth slightly affected the residual stress distribution and the average value. Liu et al. [20] pointed out that the plastic deformation caused by the cutting force is the dominant factor in the residual stress in ultra-precision machining 2024 aluminum alloy with a single crystal diamond tool. Salvati and Korsunsky [21] reconstructed the residual stress caused by the surface treatment based on the finite element method. Feature simplification reduces the amount of calculation during preprocessing by the finite element software. Meng et al. [22] investigated the effects of prestress on surface residual stress through milling experiments. Zhang et al. [23] studied the impact of milling width on surface residual stress using Al5Si aluminum alloy. Further, they explored the influence of milling thickness on the tensile anisotropy of hybrid wire arc additive-milling subtractive manufacturing. Xiong et al. [24] analyzed the residual stress of in situ milling of TiB2/7050Al metal matrix composites. They found that cutting temperature played a significant role in residual stress through comparative research. Huang et al. [25] proposed an analytical method for residual stress prediction in dynamic orthogonal cutting and formulated a dynamic orthogonal cutting mechanistic model considering the effect of cutting edge indentation. Based on plastic strain calculation and the inclusion theory, they formulated an analytical residual stress solution of the plastic strain distributed in the half-plane. Then, they predicted two-dimensional residual stress distribution in non-relaxation dynamic cutting and performed a dynamic cutting orthogonal experiment to verify the prediction results. Cheng et al. [26] studied surface residual stress under different cutting parameters and machining characteristics. They proposed a new method based on Gaussian process regression for predicting machining-induced surface residual stress, which was verified through comparison to other machine learning algorithms. Andrey et al. [27] studied the effect of repeated stress on hard milling using 3D finite element simulations. They investigated the formation of stresses at variable tooth feeds with a constant cutting speed and depth, and determined the development of material modifications (residual stresses) due to multiple stresses. Zhou et al. [28] presented an analytical model of residual stress generation in complex surface milling. Milling-introduced mechanical stress was determined according to the contact mechanics and the geometric transformation in the workpiece. The residual stress was estimated using an elastic-plastic model and a relaxation procedure. Additionally, the proposed model was verified through a milling experiment.
Cutting-induced residual stress causes workpiece deformation, significantly affecting performance. For example, the negative effect of tensile residual stress was revealed in terms of crack resistance, fatigue life, and corrosion resistance. Reducing residual stress can enhance material performance [29]. Therefore, it is necessary to measure and optimize residual stress distribution to evaluate the residual stress state in the machined surface, control the workpiece deformation, and improve its performance. For the characteristics of cutting-induced residual stress, the most widely used measurement technology is X-ray diffraction. The accuracy of this method reaches ±10 MPa, and it has become the international standard method for surface residual stress measurement. However, limited by the X-ray penetration ability, it is difficult to measure the residual stress distribution directly [30]. Moreover, using the measurement method to adjust the machining parameters for the required residual stress results in high time and economic costs. Previous studies on cutting-induced residual stress mainly used analytical methods, finite element methods, and experimental methods. They explored the influence law and prediction model of cutting force, cutting heat, tool geometric sizes, and some cutting parameters on residual stress under dry cutting conditions and orthogonal cutting process. However, the research on the influence law and prediction model of various factors on residual stress under wet cutting conditions and non-orthogonal cutting process is rarely involved. Milling aluminum alloy is generally under cooling conditions, which is non-orthogonal cutting. The simulation method is computationally intensive and time-consuming. The experimental method is time-consuming, laborious, and costly. In addition, it is necessary to repeatedly establish simulation models and implement experimental verification for parts with different characteristics and machining parameters, Given the above issues, it is of engineering significance to study residual stress distribution and the prediction model under actual milling conditions. This paper takes 7075 aluminum alloy as the research object and performs experimental research on milling-induced residual stress. Firstly, the influence of milling parameters (e.g., milling speed, feed per tooth, milling width, and cutting depth) on the residual stress in end milling and side milling under a wet cutting condition is comparatively studied. Secondly, a back-propagation (BP) neural network with a strong nonlinear mapping ability is used to formulate the residual stress prediction model of milling aeronautical aluminum alloy based on the experimental data. Finally, the accuracy of the proposed prediction model is verified by experiments.

Design of the Experimental Study
The experimental material was a 7075-T7451 aluminum alloy pre-stretched plate. To save the time of preparing the test pieces, a type of test piece with 100 mm × 80 mm × 40 mm was cut out from the plate for an end milling experiment. A total of five test pieces were milled by the bottom edge of an end mill. Each test piece was subjected to two milling experiments with two sets of milling parameters. Each milling experiment was also performed at a different position of the test piece. Another type of test piece with a size of 100 mm 40 mm 40 mm was prepared for the side milling experiment, i.e., milling with the circumferential edge of an end mill. There were nine test pieces in total, and each test piece was only subjected to a milling experiment with one set of milling parameters. The two milling methods are shown in Figure 1.
Although the residual stress of Al7075-T7451 plate is about ±30 MPa, when it is superimposed with the milling stress, the milling stress cannot be distinguished. Therefore, before milling, the test pieces were subjected to stress relief annealing treatment to eliminate the influence of initial residual stress on the milling-induced residual stress. The temperature of annealing was about 350 °C. The initial stress of the annealed test pieces was tested and found to be around ±10 MPa, which can be regarded as a stress-free state.
The milling was carried out on a five-axis machining center of DMG-DMU-60-monoBLOCK, and the primary parameters are listed in Table 1. The milling adopted the Heye-M2Al 4-blade-alloy milling cutter with a diameter of 20 mm, helix angle of 30°, rake angle of 15°, relief angle of 10°, and cutting edge of 50 mm.  Cutting oil was used to cool the tool during milling. The factors affecting the test piece deformation included milling speed, vc; feed per tooth, fz; milling width, ae; and cutting depth, ap. Thus, a four-factor three-level orthogonal milling experiment was adopted. Taking into account the performance of the selected tool and the range of commonly used finishing milling parameters, we selected three milling speeds (i.e., 125.6 m/min, 376.8 m/min, 628 m/min) and three levels of feed per tooth (i.e., 0.01 mm/z, 0.025 mm/z, 0.05 mm/z). For end milling, three milling depths (i.e., 0.5 mm, 1 mm, 1.5 mm) and three milling widths (i.e., 10 mm, 15 mm, 20 mm) were selected. For side milling, three milling depths (i.e., 15 mm, 25 mm, 35 mm) and three milling widths (i.e., 0.2 mm, 0.6 mm, 1 mm) were selected. The parameters of the end milling and side milling are presented in Tables 2 and 3.

Test Results of Milling-Induced Residual Stress
The residual stress in the surface of the milled test pieces was measured by X-ray diffraction. The test instrument was a XSTRESS-3000 residual stress analyzer made in Finland, with an accuracy of ±10 MPa. The parameters of the X-ray diffractometer are shown in Table 4. The residual stress of milling varied slightly with the milling position. The small ratio of the tool diameter to the spot diameter may affect measurement accuracy. To this end, we selected three test points on each machined surface of the test piece. In addition, the distance between two adjacent points was 25 mm, as shown in Figure 2. The residual stress average value at the three points was regarded as the milling-induced residual stress on the machined surface. An electrolytic polisher was used to polish the piece surface to obtain the residual stress distribution along the depth direction in the milled surface. The thickness of each polishing was 0.02 mm and the residual stress was measured layer by layer. A Kristall 650 electrolytic polishing machine maded in Germany was used for electrolytic polishing and the parameters are shown in Table 5. The residual stress distribution state corresponding to each milling parameter was obtained. We took the depth of the milling stress layer as the abscissa, and the residual stress value based on the experiment as the ordinate. Then, the spline function was employed for curve fitting in MATLAB. As a result, the residual stress distribution along the depth direction was obtained, as shown in Figures 3 and 4. The residual stress in the machined surface was the result of many factors. The experimental results showed that the end milling-induced residual stress was within 0.12 mm of the test piece surface, and the side milling-induced residual stress was within 0.08 mm. The residual stress varied significantly along the depth direction, and the overall distribution was in a "spoon shape". After reaching the maximum value at a depth of 0.02 mm, the residual stress gradually decreased with depth.       To conveniently analyze the influence of various milling parameters on residual stress, the residual stress at different depths under each group of parameters was equivalently treated using Equation (1). The results are listed in Tables 6 and 7. The maximum residual stress in the tables is 84.77 MPa, which is much smaller than the yield stress of the material, but will cause larger bending deformation of the weakly rigid thin-walled parts. The tool software, Design-Expert, was used for the variance analysis on the orthogonal data in Tables 6 and 7, and the results are shown in Tables 8 and 9. Generally, a p-value less than 0.05 indicates that the model term is significant, while a p-value greater than 0.1 indicates that the model term is not significant. The results in Table 8 suggest that fz is a significant model item for the feed direction of end milling, and fz and vc are significant model items for the vertical direction of feed of end milling.
Then, linear regression analysis was used to fit the empirical formula of the milling-induced residual stress of 7075 aluminum alloy. Through the orthogonal experiments, the exponential relationship between the residual stress and milling parameters was formulated as Equations (2)- (5).
where H is the depth of the milling-induced residual stress. 156.6478 where , denote the equivalent residual stress in the feed direction and vertical direction of feed of side milling, respectively; 125.6 m/min 628 m/min , 0.01 mm/z 0.05 mm/z, 15 mm 35 mm, 0.2 mm 1 mm.
The four formulas indicate that the equivalent residual stress in milling is expressed as compressive stress.
(1) The condition of end milling. According to Equations (2) and (3), the significance of the milling parameters to the residual stress in the feed direction is , and the significance of the parameters to the residual stress in the vertical direction of feed is . When and increase, the residual stress in the two directions exhibits a decreasing trend. When and increase, the residual stress in the feed direction increases, and the residual stress in the vertical direction of feed decreases.
(2) The condition of side milling. According to Equations (4) and (5), the significance of the parameters to the residual stress in the two directions is . When increases, the residual stress in the two directions increases. When , and increase, the residual stress in the two directions decreases.
Note that, except for Equation (2), the p-values of the other three equations are all greater than 0.05. It shows that the regression effect is not significant. Thus, it is necessary to develop better analysis methods.

Formulation of BP Neural Network
The BP neural network model consists of an input layer, a hidden layer and an output layer. The function of newff is used to formulate the model, expressed as: net newff PR, S1 S2 ⋯ SN , TF1 TF2 ⋯ TFN , BTF, BLF, PF , where PR denotes a matrix of R 2 to define the value range of R number of input vectors; [S1 S2...SN] is the number of neurons in each layer of the neural network; {TF1 TF2...TFN} represents the transfer function of each layer; by default, "tansig" and "purelin" are the transfer functions of the hidden layer and output layer, respectively; BLF reflects the learning of weights/thresholds, using the "learngdm" function; PF is the performance function, using the "mse" function. The input sample is transferred to PR after normalization, and PR is written as minmax inputn . This study involves five factors: cutting speed, feed per tooth, back-cutting, cutting width, and milling stress layer depth. Modeling mainly considers the relationship between the five factors and the milling-induced residual stress. Thus, the input layer is designed with five neurons, corresponding to the five factors. The output layer has one neuron corresponding to the residual stress. The three-layer BP neural network with a hidden layer is used to predict the workpiece residual stress. By changing the number of neurons in the hidden layer, the error of the training process under different numbers is comparatively analyzed. Based on the principle of minor error, the number of hidden layer neurons is determined as fifteen. Thus, the function is formulated as Equation (7).
Step 2: the input and output of the hidden layer and output layer are calculated as where p is the number of hidden layers, = 1, 2, …, 15; i is the number of input variables, ℎ = 1, 2, 3, …, ; k is the number of samples, = 1, 2, …, 63 represents 63 samples of end milling; ℎ is the input of the hidden layer; w is the connection weight between the input layer and the hidden layer; b denotes the threshold of the hidden layer.
where ℎ is the output of the hidden layer.
where is the input of the output layer, is the connection weight between the hidden layer and the output layer, and b is the threshold of the output layer.
where is the output of the output layer.
Step 3: the partial derivative of the error function to each neuron in the output layer is calculated as: , purelin′ , where represents the expected output.
Step 4: the connection weight ∆ is modified using of each neuron in the output layer and the output of each neuron in the hidden layer.
where is the given learning rate.
Step 5: the connection weight ∆ is modified using of each neuron in the hidden layer and the input of each neuron in the input layer. , Step 6: the global error is calculated as: Step 7: Convergence judgment. If the error requirements are met and the maximum number of training times is reached, the learning ends; otherwise, the next learning cycle starts.
To investigate the performance of the formulated neural network, we implemented predictions based on the training data and observe the errors of the prediction model. The prediction results are shown in Figure 5. The results show that the prediction results obtained from the BP neural network are not ideal. The error on several samples is significant, and the absolute error exceeds 20 MPa. It is because the BP neural network may converge to a local minimum.

BP Neural Network Optimized by Genetic Algorithm
To deal with the problem of BP neural network converging to a local minimum, this study uses the genetic algorithm to optimize the neural network, thereby improving the convergence speed and reducing the prediction error. After optimization using the genetic algorithm, the weights and thresholds of the data in the end milling and side milling are obtained. The BP neural network prediction model is determined accordingly. We used the optimized model to implement predictions based on the training data. The prediction results are shown in Figure 6. The absolute error of the optimized prediction model is within ±6 MPa, which is consistent with the expected output. This verifies the effectiveness of the genetic algorithm for optimizing neural networks.

Validation of BP Neural Network Model
To verify the accuracy of the residual stress prediction model, six groups of data were re-selected for the milling experiment, three groups for end milling and three groups for side milling. The experimental parameters are listed in Tables 10 and 11, and the results are shown in Figures 7-9. Figures 7 and 8 show that the residual stress distribution curve obtained by the prediction model is consistent with the curve measured by the experiment. Figure 9 presents that the residual stress prediction absolute error of end milling is between 0. 24-13.30 MPa, and that of side milling is between 0. 23-11.34 MPa. The prediction error is in the same order of magnitude (i.e., ±10 MPa) as the measurement accuracy of the residual stress analyzer used. Therefore, the proposed prediction model of milling-induced residual stress is accurate.

Conclusions
This paper studies the influence of milling parameters on the residual stress of 7075 aluminum alloy and formulates a residual stress prediction model related to the parameters. It provides a calculation tool for obtaining milling-induced residual stress. First, the orthogonal experiment is designed to implement milling experiments on 7075 aluminum alloy. Through electrolytic polishing and X-ray diffraction, layer by layer, the workpiece residual stress distribution at different depths was obtained. Secondly, the residual stress characterization equations related to the milling parameters in end milling and side milling are formulated based on regression analysis. The sensitivity coefficient of each milling parameter to the residual stress is calculated. Thirdly, the prediction model of milling-induced residual stress is proposed based on experimental data, using a genetic algorithm and BP neural network. The findings indicate that milling-induced residual stress varies significantly along the workpiece depth direction. The residual stress depth is within 0.12 mm of the workpiece surface, and the overall distribution is in a "spoon shape". The proposed prediction model can calculate the residual stress under different milling parameters. The prediction error is between 0-14 MPa, roughly the same as the measurement accuracy of the residual stress analyzer. Therefore, the prediction model has high accuracy and powerful application potential. In addition, this study gives constant values to factors, such as cutting tools, workpiece materials, and cooling conditions, resulting in limitations in the prediction model. In the future, we will incorporate more factors affecting milling-induced residual stress into the prediction model to improve its generality. In addition, the reverse approach of the optimal machining plan under the specified residual stress will be our research focus.

Replication of Results
In order to facilitate the reproduction of results presented in this paper, the MATLAB code is provided as the Supplementary Material. The basic information of the code files is listed in Table 12. The detailed description is written as the comments in corresponding files. Notes that, the program package of 'bcs_BP.rar' needs to be extracted into a folder, which should be added into the search path of MATLAB.  (2) and (3) CC_EQ4_5.m Procedure for calculating the coefficients and exponents of Equations (4)