Modelling of surface roughness and studying of optimal machining position in side milling

In this work, a theoretical analysis of surface generation numerical model is presented to predict the surface roughness achieved by side milling operations with cylindrical tools. This work is focused on the trajectory of tools with two teeth by the influence of tool errors such as radial runouts, as well as straightness with dynamic effects. A computational system was developed to simulate roughness topography in contour milling with cylindrical tool. Finally, the PSO (particle swarm optimization) algorithm is employed to find the optimal machining position for the best surface roughness. Experimental data is satisfied with the novel protection model for the tooth’s trajectory, and the final prediction accuracy is high enough, i.e. that the prediction surface roughness. Low prediction surface roughness error (1.37~15.04%) and position error (0.95~1.25 mm) indicate effectiveness of the model built in this work. The novel model may be used to determine the variation in surface roughness.


Introduction
During the incoming years, side milling technology with high feed speed would be widely used in moulds and machined parts processing, specifically in vertical walls of contours. For some metal materials, side milling is the final processing procedure [1,2]. Surface quality is one of the most important characteristics to establish high speed milling. Surface roughness is one of great importance for the performance of surface quality [3], which is mainly evaluated by R a (average roughness) and R z (peaks and valleys). It depends partly on the cutting conditions (especially feed per tooth), and partly on the tool (the factors which lead to differences in the cutting edge radii) and the machine. For example, the runout, the eccentricity, or the parallel axis offset and axis inclination (tilt angle) of the machine determine the undeformed chip thickness and its periodic distribution, leading to impact the surface roughness [4,5]. In addition, Y X (the straightness of the feed direction in its vertical direction) will directly affect the unde-formed chip thickness in different position, which would have a great influence on roughness.
Studies on the surface quality in the machining process have been developed during the recent decades. Numerous achievements have been published. As reported, Altintas and Budak [6] were early researchers on the study of surface roughness in the machining in the 1990s. Franco et al. [7] proposed that different tool teeth to imperfections in the machined surface are strongly influenced by tool errors such as radial and axial runouts. Chen et al. [8] developed a machining error prediction model based on the force-deformation coupling relationship. Niu et al. [9] studied the effects of tool nose radius on the formation mechanism of edge defects during milling; the results showed that the shorter and wider chips were found with the increment in tool nose radius. Li et al. [10,11] studied the slippage of crystal planes in ultra-precision machine and developed a theoretical model to predict the surface morphologies and surface roughness by considering the random distributions of the radius, location, and protrusion height of abrasive grits. Hao et al. [12] presented a method to predict milling force, taking runout into account. Chen et al. [13] analyzed the wear mechanism of forward and backward cutting edges, and thus obtained the change laws of cutting forces and hole-making quality in different tool wear conditions. Pan et al. [14] investigated two kinds of micro-structures grooved on the tool rake face during aluminium alloy cutting: linear grooves and V-shaped grooves. Hu et al. [15] studied an effective thread milling force prediction model considering instantaneous cutting thickness is presented based on the cylindrical thread milling simplified to the side milling process. Tomov et al. [16] developed mathematical algorithms for predicting the surface roughness during turning operations, the method which can be borrowed for side milling. In the face milling, Shi et al. [17] studied plane surface generation mechanism in flat end milling, confirming the availability of the model to predict the surface texture and roughness parameters precisely with back cutting effect. Tool runout and setting error played an important role in surface profile generation. Moreover, Franco et al. [18] studied the influence of radial and axial runouts on surface roughness. All above researchers achieved greet contributions on surface generation mechanisms; however, the formula of maximum undeformed chip thickness is not well performed.
To pursue the improved surface quality, countless engineers were ambitious to optimize the milling process. In the early times, they often relied on the use of available computeraided mathematical programming and numerical search techniques in attempts for the optimum parameters to improve surface roughness [19][20][21][22][23]. With the development of computer technology and algorithms, Zalnezhad et al. [24] put forward a surface roughness model for Al7075-T6 alloy with fuzzy logic method firstly. Chandrasekaran and Devarasiddappa developed an artificial neural network model to predict the surface roughness in cylindrical grinding [25]. Particle swarm optimization (PSO) algorithm is a kind of optimization algorithm of swarm intelligence in the field of computational intelligence. The algorithm was first proposed by Kennedy and Eberhart in 1995 [26]. Particle swarm optimization is suitable for continuous function extremum problems and has strong global searching ability for nonlinear and multi-modal problems.
In this work, a theoretical analysis of surface generation in side milling is presented, which is composed of the runout and straightness parameters. In the present study, a formula of maximum undeformed chip thickness h has been built for the optimization of the cutting strategy as well as the prediction of surface generation in side milling. As expected, the particle swarm optimization method is subsequently employed to optimize the machining position for the minimization of surface roughness.

General analyzes
In side milling, the factors playing significant roles on the achieved surface roughness can be divided into three parts: geometric factors of the tool, milling conditions, and the geometric factors of the machine. Especially in our work, geometric factors of the tool mainly refer to the cutter teeth (Z), tool radius (R t ), radial runout (ε Y ), and axial runout (ε X ) during milling. While tool feed speed (v), depth of cut (a p ), spindle speed (n), ambient temperature, and cooling conditions were all considered for the milling condition. Geometric factors of the machine is also necessary, owing to the straightness of the feeding direction in its vertical plane. The classification criteria for these affecting factors are summarized as follows: (1) For a two-teeth tool, one tooth is positioned at the maximum runout comparative to the other one. Runout is considered a certain value with a very small angle range. The factors produce some quantitative effects on the surface roughness, so that they can be directly modelled in theory.
(2) The milling conditions can be configured as a constant value in response to the requirements of machining, so that this part also can be calculated in theory.
The geometric factors of the machine mainly refer to the machine motion pairs, which are related to geometry error of the mould space. Unfortunately, straightness is inconclusive, whose contributes to the effect of roughness is variable depending on the location. Therefore, the relative coordinate system and the particle swarm optimization (PSO) algorithm could be used to select the machining location with the minimum roughness.
A computational programme was developed to simulate roughness topography in contour milling by cylindrical tool with helical edges (Fig. 1). Only geometric factors relative to workpiece-tool intersection, runout, tool radius, feed speed, spindle speed, and Y X were taken into account. Other factors such as flexion, vibrations, and plastic deformation of machined material were neglected.

Modelling
In this research, the value of R a and R z are used to represent surface roughness. The discrete roughness can be calculated according to Figs. 1 and 2 in an ideal situation.
where k is the number of points that are used to define the sampling length L r , y À is the mean of y i , and y max and y min are the maximum and minimum values of y i , respectively. In particular, R z adopted the definition of the maximum height of the contour, rather than the ten-point mean roughness in this study. Figure 2 shows the geometric intersection between milling tool edges and the mould, where h is residual height of the undeformed chip thickness and R t is the radius of the tooth end. Furthermore, as the geometry h can be obtained approximately by Eq. (3), the circular trajectory of the end of each tooth is given by Eq. (4).
In Eq. (3), h ≈ HC when the f Z is infinitely close to zero. Therefore, it is necessary to calculate the true value h. H T point is the extension of L in the direction of X-axis, in the position According to Taylor's expansion: When θ is very small, sin θ = θ. And Eq. (5) can be expressed as: We can have: Considering the runout as shown in Fig. 3, Eq. (4) can be changed into: Here ε Y (θ) and ε X (θ) are functioned by angle θ. In Fig. 3, for the two-teeth tool, one tooth is positioned at the maximum runout comparative to the other one. Runout is considered a certain value with a very small angle range, having ε Y (θ) = ε Y (max). At this point, the equation h = H T C is changed to h = H ′ C′. For a high feed speed v or feed f Z , the runout in the X direction ε X <<f Z , so ε X was ignored in this study.
Thus, Eq. (9) can be written as: Considering the influence of straightness in the machining direction as shown in Fig. 4, Y X = f(X); X = x i + Δs, Δs is the starting position of processing, which is the position of the starting point of the workpiece in the X direction. Equation (4) can be changed to Eq. (11). According to Eq. (4), the trajectory curve within one rotation was simulated at v = 800 and 10,000 mm min −1 , respectively. When the ε Y (max) = 0.001 mm and v = 800 mm min −1 , a two-dimensional cross-sectional diagram is simulated according to Eq. (10).
As shown in Fig. 3, according to Eqs. (7) and (8), h true was calculated by simulation and compared with h max calculated by Eq. (3), and the angle θ at the position H T compared with that calculated by Eq. (5).

The trajectory curve
In Figs. 5 and 6, it can be seen that with the increase of the feed speed v, successive teeth marks on the mould's surface will be very close to each other and the maximum machining residual height h will likely very small on the mould's surface at low feed. As feed speed increases, successive marks become more separated and the maximum machining residual height h higher on the mould's surface.  Figures 7b and 8b show that the tool revolutions have a very small angle where the two tooth trajectories intersect. In particular, for the second tooth with an angle of π between the two teeth of the cutter tool, it is the maximum runout position, and the runout is considered to be a certain value in a very small angle. At this point, taking the first tooth for reference, the trajectory of the second tooth forming the surface morphology of the material machined shows a runout in the Y direction, i.e. ε Y (θ) = ε Y (max).
This changes the position where H T (Fig. 2) occurs from x = f Z /2 = 0.2 mm to x = 0.2107 mm, and its value h = 0.0047 to h = 0.00521 mm, respectively. The runout ε Y (max) = 0.001 mm makes R Z = h change 0.00051 mm at R t = 4 mm, v = 800 mm min −1 and n = 1000 rpm.

Effect of feed speed v on surface roughness
Effect of feed speed v on h obtained at different feed values are presented in Fig. 9. We can know that with the increase of feed speed v, the error between the maximum undeformed chip thickness h (R Z ) calculated according to Formula (3) and the The error between the maximum undeformed chip thickness h (R Z ) calculated according to Eqs. (7) and (8) and the  Table 1.
The cylindrical tool having a nominal diameter D of 8 mm and 2 cutting edges were used. Tool overhang was 22 mm. A four-coordinate vertical CNC milling machine has been developed in our laboratory ( Table 2).
In terms of straightness, cutting conditions were cutting speed v = 600 and 800 mm min −1 and Δs = 0, 4, … , 32, and 36 mm, cooling with oil mist, at a constant temperature environment of 20°.

Tool runout error measurement
Tool (spindle) runout of edge errors were measured by means of inductive transducer, with resolution of 0.01 μm. These data were recorded every 30°at a point as the starting point.

Surface roughness measurement
A Taylor Hobson Form Talysurf (aspheric measurement system PGI 1240) roughness stylus profilometer was employed, with a conical diamond point radius of 0.002 mm, and with Taylor Hobson ultra software (v.5.18.2.5) provided with an Fig. 9 Effect of feed speed v on h and angle θ obtained for R t = 5 mm at runout ε Y (max) = 0 inductive gauge with a resolution of 16 nm. Measuring speed was 0.5 mm s −1 . A Gaussian filter was used, with high pass cut-off length of L c = 0.8 mm and low pass cut-off length of L s = 0.0025 mm, according to ISO4287-1997 [27]. The experiment was repeated three times for each parameter, and the average of the measurements was taken.

The Y X straightness error
The data in Fig. 10 were measured for the straightness of Y motion pair in the X direction. In general, the straightness error is random and difficult to describe as a function, and different machining locations have different effects on surface roughness. Therefore, the nonlinear fitting method can be used for approximate description, and the 5th degree polynomial fitting function is selected, as shown in Fig. 10d.  Table 3. Results are presented in Figs. 11 and 12. For a cutter with two teeth, as shown as in Fig. 11, turn 180°after the second tooth performed the maximum runout position. ε Y = 0.0012 mm is slightly higher than runout value ε Y = 0.001 mm.
R a and R z simulated values were obtained at different speed v values and at different tool runout errors. Experimental values were compared to simulated values at runout errors ε Y = 0.001mm. Results are presented in Fig. 12.
For R a , at feed speed of 300 mm min −1 or lower, experimental values remain low than simulated values (perhaps because the feed speed is low, the tool and the workpiece surface contact time is longer, and the higher temperature makes the workpiece surface smooth). At higher feed speed experimental values are slightly higher than simulated ones.
For R z , as the feed speed increases, experimental values are slightly higher than simulated ones. However, at the lower feed speed values, the experimental values are higher than the simulated ones than that of R a (also maybe the contact time is longer, the higher temperature makes the workpiece surface smooth).
For both R a and R z , the lower the feed speed, the more obvious the tool runout errors influence it.
At low feed speed, since roughness is low, effect of other causes not considered in the model becomes more evident.

Results of machining position experimental tests
The trajectory parameter equation considering runout and straightness has been established in the above section successfully. The PSO algorithm is employed in this section. The optimal position is studied, which is implemented by using a commercially available software MATLAB R2016a (V9.0.0.34.1360). Figure 13 shows an optimal position measuring results under straightness condition.
As presented in Table 4, it can be concluded that the optimal position is 5.25 mm, where R a = 0.7897 μm and R z = 3.3871 μm, at speed v = 600 mm min −1 . And position is 11.05 mm, where R a = 1.2572 μm and R z = 5.3211 μm, at speed v = 800 mm min −1 . In order to validate the efficiency of optimization, the machining experiments at different locations are performed. The machining position interval is 4 mm, and the  Fig. 11 The measurement data of surface roughness obtained for R t = 4 mm, Z = 2, and n = 1000 rpm at v = 800 mm min −1 Fig. 12 Ra values (experimental and simulated) for R t = 4 mm, Z = 2, and n = 1000 rpm at different feed speed values  experimental data with sampling length L r = 10 mm are presented at v = 600 and 800 mm min −1 (Fig. 14). The optimal position sampled surface roughnesses are listed in Table 4; relative errors in measurement were calculated. The results in Table 4 show that the maximal prediction error is 15.04% and minimal prediction error is 1.37%. The good results in Table 4 and Fig. 14 indicate that the established surface roughness prediction method with PSO algorithm is satisfied.

Conclusions
This work established a novel model to predict the theoretical surface roughness for the side milling. In terms of the modelling work and experimental validations, some important conclusions can be drawn as follows: (1) A theoretical analysis of surface generation and novel model is presented to predict the surface roughness achieved by side milling operations with cylindrical tools, which can simply and accurately calculate the tool trajectory and maximum undeformed chip thickness. (2) For tools with two teeth, the novel model to predict the surface roughness is satisfied with validation experiments with the trajectory influencing tool radial runout errors taken into consideration. For both R a and R z , the lower the feed speed, the more obvious the tool runout errors influence it. (3) The particle swarm optimization (PSO) algorithm be used to select the machining position with the minimum roughness, and the final prediction accuracy is high enough, i.e. that the prediction surface roughness error is only 1.37~15.04%, and the position error is 0.95~1.25 mm.