On the milling strategy in machining curved surfaces based on minimum stress concentration by a 3-axis machining center

Three-axis computer numerical control machining centers are commonly used in machining due to their simple operations. When machining curved surfaces, the 3-axis CNC machining centers use interpolation line segment to fit the curved surfaces. The quality of the machined surface is affected by the length of the interpolation line segment. Sharp corners are formed at the junction of straight segments. The appearance of sharp corners will lead to increased stress concentration. To study the relationship between machined surface quality and interpolation straight line, this paper establishes the mathematical model of surface topography in ball-end milling multi-curved surfaces by a 3-axis milling center with considering the acceleration and deceleration controls. Based on the surface topography model, the stress concentration factor is analyzed in machining curved surfaces with different lengths of interpolation lines. The results show that the stress concentration factor decreases with the increase of the central angle when the length of interpolation lines and the radius of curvature are kept in constant, while decreases with the increase of the radius of curvature when the length of the interpolation lines and the central angle are held on. Moreover, the stress concentration factor increases as the length of the interpolation lines increases when the radius of curvature and the central angle are kept in constant. A method for selecting proper length of interpolation lines based on the stress concentration is proposed. In addition, the quality of the machined surfaces can be improved through the optimization of the tool path.


Instruction
To reduce wind resistance, more and more curved surfaces conforming to fluid mechanics have been designed. When machining curved surfaces, ball-end milling is often used. The 3-axis CNC machining center uses lines segment to fit the curved surfaces. Too large interpolation line length will cause the form tolerances not to meet the requirements. Too small interpolation straight-line length will cause frequent acceleration and deceleration of the CNC machining center, and in turn, cause a reduction in surface quality. As a matter of fact, the metal cutting processes should aim at achieving both higher productivity and improved surface quality [1].
Scholars at home and abroad have optimized some cutting parameters by establishing surface roughness/topography models for turning or milling. Rao and Rao [2] established a model of tooth track and machining geometry in the process of surface edge milling. Real tooth lines are considered in the geometric model of the surface milling process. The mathematical expressions of feed, tooth entry and exit angles, undeformed chip thickness, and surfaces error along the tool contact path were derived, and the effects of workpiece curvature on these variables were studied. Wei et al. [3] discretized the entire cutting process into a series of small lines milling along the tool path. A mathematical model is established for the process of segmented cutting. Zhang and Liu [4] established a turning surfaces model of Wiper inserts. Mohammad and Mohammad [5] proposed an analytical model for calculating the tool-workpiece meshing boundary during the finish milling of the curved surfaces. Li et al. [6] proposed an improved Z-MAP algorithm based on the time-step method to simulate the surface topography of ball-end milling.
In addition, some scholars have considered factors such as vibration and machining strategy to predict and improve the surface quality. Dhokia et al. [7] established a prediction model for the surface morphology in ball-end milling polypropylene. It can make a confident prediction of surface roughness. But this model is only suitable for soft materials such as polypropylene. Quinsat et al. [8] proposed a model to characterize the three-dimensional surface topography in 5-axis ball milling. The results show that the inclination of the tool has a significant effect on the surface quality. However, this model has only been verified in plane milling. Vyboishchik [9] studied the three strategies of "along the track," "cross-track," and "angle to track" in rough machining, and proposed a model for the combination of topological trajectories of machining surfaces. This model can predict cutting force and further improve surface accuracy. Xu et al. [10] proposed a scanning method for surface topography modeling of ball-end milling. An accurate method for calculating the height of arbirary point on workpiece is proposed based on interpolation. Vu et al. [11] took the three-axis end milling of free-formed surface as the research object and optimized the tool path design. A method of generating different tool paths in other machined surfaces using a toroidal milling cutter is proposed. Lotfi et al. [12] established a multiaxis ball-end milling surface topography model based on the machining tool trajectory and the actual trajectory of the cutting edge relative to the workpiece and the tool-totool meshing area. The results show that the orientation of the tool plays a vital role in the surface topography. This model does not consider the two influencing factors of tool wear and tool vibration. Arizmendi and Jiménez [13] proposed a kinematics method for predicting the threedimensional shape of the milling surfaces in face milling of different geometric shapes considering the axial and radial runout. By simulating the three-dimensional surface topography, the roughness peak and valley can be predicted during the cutting process. Torta et al. [14] established a three-dimensional surface shape prediction model for the milling process. The model is suitable for actual cutting vibration. A specific program has been developed to measure each cutting edge's exact position and shape to achieve accurate surface geometry reproduction. Cai et al. [15] established a surface topography prediction model for external milling. This model adds factors such as tool static deflection and chatter. It can accurately predict the surface topography of flat-end milling. Most of them are turning surface topography models, surface topography models of milling plane, and a few surface topography models that fit curved surfaces through interpolation of equidistant lines. In this paper, the tool trajectory of equidistant line interpolation to fit the curved surfaces is established. In addition, the acceleration and deceleration of the machine tool are considered. At last, the surface's topography coordinates are obtained by retaining the minimum Z coordinate to form the machined surfaces.
The processed surfaces are generally characterized by roughness and stress concentration factor. Roughness reflects the quality of the surfaces, while the stress concentration factor can reflect the defects of the surfaces, and also provide a more reliable estimate of the fatigue of the parts [16]. Urbikain and de Lacalle [17] proposed a shape prediction method based on the time-domain model for circular milling inclined plane. Their works provides the methods for tool integrity characterization and surfaces roughness prediction. This model can predict the roughness of any combination of geometry and cutting parameters. Zeng et al. [18] considered the non-uniformity and instantaneous stress distribution characteristics along the cutting edge during milling. The notch wears depth prediction model considering the influence of stress concentration is established. Yang et al. [19] found a prediction model of surface roughness and work hardening by using the regression analysis method. It provides a theoretical basis for improving the cutting performance and surface quality of cemented carbide tools. Zhou and Yang [16] established an analysis model for the residual stress generated by the milling of complex curved surfaces. The analytical model is used to predict the temperature field of the workpiece during the milling process. Li et al. [20] revealed the mechanism of surface deformation of high-speed milling ball heads based on the characteristics of high-speed milling ball heads and metal cutting theory. The polynomial fitting equation of the surface's residual stress under high-speed milling conditions are established. De Castro et al. [21] mentioned that notches could cause local stress concentration effects and affect various failure mechanisms. Tabriz and Barrans [22] analyzed the stress concentration formed by the sharp point of the ball end milling cutter. Studies have shown that the stress concentration factor increases significantly as the depth of cut increases; the smaller the radius of curvature, the higher the stress concentration factor. Felhőa et al. [23] proposed a new method to determine the expected value of surface roughness parameters during face milling. This method can analyze the theoretical morphology of grinding surfaces and determine the theoretical roughness of any point on the surfaces. Chen et al. [24] studied the effect of the UVHM process on the compressive residual stress of the hole and improve the surface compressive residual stress by 63.5%. This paper uses ANSYS to analyze the surface topography model. According to actual working conditions, constraints and pressure are applied to obtain the maximum stress and average stress of the surface's topography, and then, the stress concentration factor is obtained.
To find the best fitting straight line segments from the toolpath of the curved surface, this paper establishes a surface topography model of the ball-end milling surface based on acceleration and deceleration control. And through the joint simulation of MATLAB and ANSYS, the relationship between the radius of curvature, the machining error, the length of interpolation lines, and the stress concentration factor are obtained. It is proposed to optimize the length of the interpolation lines for different curvature, machining error range, and stress concentration coefficient, and then to optimize the tool path.

Establishment of the coordinate system
In 3-axis CNC machining, the machine tool's spindle moves in the Z direction, and the worktable moves in the X and Y directions. The essence of cutting is the relative motion of the workpiece and the cutting tool. Assuming that the workpiece is stationary, the tool feeds in the X, Y, and Z directions relative to the workpiece. The coordinate systems of the workpiece and cutting tool are established at the center of the workpiece and ball milling cutter, and the axis directions of the two coordinate systems are the same. As shown in Fig. 1, O − XYZ represents the workpiece coordinate system and O � − X � Y � Z � represents the coordinate tool system.

Coordinate transformation matrix
The coordinate transformation matrix can transform the coordinates of one coordinate system into another one. The starting phase angle of the coordinate tool system and the workpiece coordinate system are the same. When the cutting tool rotates, the angle between the X-axes in cutting tool and workpiece coordinate systems changes with machining time. Assuming that the angle between the X′-axis and the X-axis is θ, the coordinate transformation matrix can be changed to.
where = t = 2 nt∕60 = nt∕30 and n is the spindle speed of the CNC machining center. X 0 , Y 0 , Z 0 are the coordinates of the coordinate origin in the workpiece coordinate system. (X � , Y � , Z � ) are the coordinates of any point in the cutting tool coordinate system.

The motion path equation of the tool sphere center in the workpiece coordinate system
When milling a curved surface along the interpolation lines, the motion path equation of the center point of the tool is as follows: (1) where K i is the slope of each interpolation line.
According to the triangulation relationship.
represents the total time spent processing to X i . V f represents the feed rate. R represents the radius of curvature of the surfaces. r represents the radius of the ball end mill. a p represents the depth of cut. i is the angle between the lines formed by the endpoint of the interpolation lines and the center of the circle of curvature and the positive X axis. t represents discrete processing time. When machining curved surfaces, the machined surfaces are divided into small areas. [ X i , X i+1 ] is the interval range, as shown in Fig. 2. In machining, to avoid the tip of the tool from participating in the cutting, it is necessary to ensure that the cutting point is tangent to the curved surfaces. So [X i + rcos i , X i+1 + rcos i+1 ] is the interval range of the center point of the tool. First, calculate the length of X based on time. Then determine which range of X is in. Finally, find the coordinate of Z according to the linear equation.
In machining, the acceleration and deceleration of the CNC machining center is an unavoidable factor. T-type control is a typical acceleration and deceleration control method in the 3-axis CNC machining center. It divides the movement process into three processes of acceleration-uniform speed-deceleration to ensure the consistency of motion. The length of an interpolated line is composed of three stages: acceleration-constant speed-deceleration.
As shown in Fig. 3, assuming that the feed rate in the deceleration phase is 1800 mm/min, the feed rate in the constant speed phase is 2000 mm/min, and the time during the acceleration and deceleration phase is 0.05 s. According to the speed-displacement formula, the acceleration is 200/3 mm/s, and the acceleration (deceleration) length is 19/12 mm.
When considering the acceleration and deceleration for each interpolation line, the interval of the acceleration phase is X i + rcos i , X i + rcos i + (19∕12) × tan i . The interval of the uniform speed stage is X i + rcos i + 19 12 tan i , X i+1 + rcos i+1 − 19 12 tan i . The interval of the deceleration phase is X i+1 + rcos i+1 − 19 12 tan i , X i+1 + rcos i+1 . The number of judgment intervals is 3(i − 1). As shown in Fig. 2, due to too much times change, the overall programming is more complicated. Capture a small area for simulation. The length of the adjacent interpolation lines is similar. In the intercepted part, replace all interpolation lines with the length and time of the intermediate interpolation lines. The flowchart of writing X0 is shown in Fig. 4.
In the case of acceleration and deceleration, formula (2) can be changed to L represents the coordinates of the starting point of cutting. l represents the X coordinate where the endpoint of the interpolation line is projected on the x-axis and also the farthest from the center. X00 represents the length of an integer multiple of the interpolation lines. X000 represents the length of the remaining interpolation lines.

Coordinates of the cutting edge of the cutting tool
In the cutting tool coordinate system, the coordinates of any cutting point on the cutting edge are Finally, the coordinates of any cutting point at any time can be expressed by the formula (5). (3)

Surface topography simulation
MATLAB software was used to simulate surface topography. First, a cube model of the workpiece is created and discretized. Then, the motion trajectory equation of the sphere center of the cutting tool is established. Finally, the coordinates of the cutting edge and the workpiece in the Z direction are compared with each other and stored in a matrix. The machined surface topography is generated based on the matrix. The process is shown in Fig. 5. Figure 6 shows the simulation of surface topography under the radius of curvature of 1000 mm, the central angle of 45.6°, and the length of the interpolation lines of 10 mm.

Stress concentration simulation
The central angle of the selected area is 84.26° (arc cos 0.1), 72.54° (arc cos 0.3), 60° (arc cos 0.5), and 45.57° (arc cos 0.7), as shown in Fig. 7, In MATLAB, the coordinate points of the simulated surfaces are extracted. Then, use the command stream instructions in ANSYS to reconstruct the machined surfaces.
Import the machined surfaces model into the WORK-BENCH, and then define the properties of the material. The defined material properties are shown in Table 1. Set the thickness of the surfaces as 0.1 mm, and apply fixed constraints at both ends. Pressure is applied to the interpolated lines connection. The direction of the force is perpendicular to the normal line at the connection point of the interpolation line.
Change the length of the interpolation lines, curvature's size, and the angle of the center angle for single factor simulation. The simulation parameters are shown in Table 2.
Keep the length of the interpolation lines as 10 mm and the central angle as 45.6° in constant; the stress distributions under different curvatures are shown in Fig. 8.

Stress concentration of curved surfaces with variable curvatures
The stress concentration factor can be obtained according to the formula: Kt = σ1/σm. where σ1 is the maximum stress, and σm is the average stress.
When the length of the interpolation lines is 10 mm, the maximum stress and average stress under different central angles and curvatures are shown in Fig. 10. The stress concentration factor is shown in Fig. 11.
When the curvature is kept constant, the maximum stress decreases as the central angle increases. When the central angle and the length of the interpolation lines are held constant, the maximum stress increases with the increase of radius of curvature. But when the central angle is large, the increasing trend of the maximum stress is not obvious. As shown in Fig. 10, when the central angle and the length of the interpolation lines are kept constant, the stress concentration factor decreases with the increase of radius of curvature.

Stress concentration with variable interpolation lines length
When the radius of curvature is 3000 mm, the maximum stress and the average stress under different central angles and different length of interpolated lines are shown in Fig. 12. When the curvature is kept constant, the stress concentration factor for changing the length of the interpolation straight lines is shown in Fig. 13. When the central angle and curvature are kept constant, the maximum stress decreases as the length of interpolation lines increases. However, when the central angle is too large, the reduction trend of the maximum stress is not obvious. As shown in Fig. 12, when the radius of curvature and length of the interpolation lines are kept constant, the stress concentration factor decreases as the central angle increases. When the central angle and curvature are held constant, the stress concentration factor increases with the rise in the length of the interpolation lines, as shown in Fig. 13.

Maximum stress and average stress
When the central angle is kept constant, changing the curvature and the length of interpolation lines will change the stress concentration. The greater the stress concentration factor, the smaller the maximum stress, which is significant at the central angle of 45.6°. To study the reasons, we assumed the processed surfaces as a smooth flat plate structure, as shown in Fig. 14.
Decompose the force into Fx and Fz, and convert it into lateral bending conditions. The maximum normal stress was defined according to the formula: 1 = M max ∕W , where Mmax is the maximum bending moment. M max = 1∕2 × F z × b . W is the bending section coefficient. When the cross-section is rectangular, the bending section coefficient can be expressed as W = (b × h 2 )∕6 , where b is the width of the section and h is the height of the section. Thus, . Because F and h are kept constant, the numerical of σ1 is related to sin( − )∕(cos ) 2 . Adopting F is 1 N, h is 0.01 mm; the results of the σ1 are shown in Figs. 15 and 16. σ1 increases as the radius of curvature increases, and decreases as the length of interpolation line increases. The reason is because the simulated surfaces are in the shape of small pits. With the rise of ξ, the error in a numerical value is more significant.

Relationship between sharp angle and stress concentration factor
When fitting a curved surface with interpolation lines, sharp corners will be formed at the joint of the interpolation lines. As shown in Fig. 17, the value of E/F is utilized to indicate the angle at which the interpolation straight lines form a sharp corner. When E/F is larger, the angle at the joint of the interpolation lines becomes smaller.
Solve the values of E/F under different curvatures, the length of interpolation lines, and center angles. The stress concentration factor is linearly related to E/F. As shown in Fig. 18, the greater the value of E/F, the greater the stress concentration factor.

Relationship between machining error and stress concentration factor
When fitting a curved surface with interpolation lines, the machining error δ is also unavoidable. According to the formula:      Fig. 19, the error by machining is generally controlled within 0.03 mm. In Fig. 19, the stress concentration factor within 0.03 mm  Of course, the residual height formed in the step direction also affects the stress concentration. Li et al. [20] conducted related research. The diameter of the ball-end milling cutter used in this article is 25 mm, and the step distance is 0.5 mm. The residual height is about 0.00125 mm. Because the residual height is too small, it has been ignored in this article.

Selection of interpolation line length based on stress concentration
Based on the above research, a method for selecting the length of the interpolation lines when fitting a curved surface is proposed. First, according to the curvature and tolerance, the maximum interpolation straight-line length is solved according to the formula L max = 2 √ 2R . This article regards the chord length as the length of the bisecting curve. This will cause the error in some parts to exceed the set value. When the error exceeds the set value, the dichotomy method reduces the length of interpolation lines. Finally, when the error satisfies the set value, the stress concentration factor of some parts is too large, and it needs to be further adjusted by dichotomy. When the stress concentration factor decreases, the maximum stress will increase. By ensuring that the maximum stress is lower than the allowable stress, the minimum length of the interpolation lines can be determined, as shown in Fig. 20.

Conclusion
In this paper, the surface morphology model in ball milling with considering acceleration and deceleration is established. Through the surface morphology model and stress simulation, the relationships among curvature, interpolation line, center angle, and stress concentration factor are revealed. The length of interpolation lines is optimized through the radius of curvature, the central angle, and the stress concentration factor. This model does not consider the vibration factor and the surface with small central angles (too steep). The conclusions of this study are as follows: 1. When the length of the interpolation lines and the central angle are kept constant, the maximum value of stress increases with the increase of radius of curvature, and the stress concentration factor decreases with the increase of radius of curvature. When the central angle is 45.6°, and the length of the interpolation lines is 10 mm, the maximum stresses with the radius of curvature of 2000 mm, 3000 mm, and 4000 mm are increased by 5.8%, 6.2%, and 6.3%, respectively, relative to the maximum stresses with the radius of curvature of 1000 mm, and the stress concentration factors were reduced by 7.6%, 9.7%, and 10.4%, respectively. 2. When the radius of curvature and the central angle is kept constant, the maximum stress decreases with the increase of the length of the interpolation lines, and the stress concentration factor increases with the increase of the length of the interpolation lines. When the central angle is 45.6° and the radius of curvature is 3000 mm, the maximum stress of the interpolation line length of 15 mm, 20 mm, and 25 mm is reduced by 0.4%, 1.8%, and 3.9%, respectively, compared with the maximum stress of the interpolation line length of 10 mm, and the stress concentration factors increased by 2.36%, 4.81%, and 7.16%, respectively.
3. When the radius of curvature and the length of the interpolation straight lines are kept constant, the maximum stress increases with the decrease of the central angle, and the stress concentration factor increases as the central angle decreases. When the radius of curvature is 1000 mm and the length of the interpolation lines is 10 mm, the maximum stresses with a central angle of 72.5°, 60°, and 45.6° are increased by 4.6%, 12.8%, and 30.8%, respectively, compared to the maximum stress with a central angle of 84.3°, and the stress concentration factors increased by 1.3%, 1.6%, and 6.3%, respectively.

Declarations
Ethics approval and consent to participate Not availability.

Consent for publication
The authors declare that they all consent to publication.

Conflict of interest
The authors declare no competing interests.