Spiral Bevel Gears Face Roughness Prediction Produced by CNC End Milling Centers

The emergence of multitasking machines in the machine tool sector presents new opportunities for the machining of large size gears and short production series in these machines. However, the possibility of using standard tools in conventional machines for gears machining represents a technological challenge from the point of view of workpiece quality. Machining conditions in order to achieve both dimensional and surface quality requirements need to be determined. With these considerations in mind, computer numerical control (CNC) methods to provide useful tools for gear processing are studied. Thus, a model for the prediction of surface roughness obtained on the teeth surface of a machined spiral bevel gear in a multiprocess machine is presented. Machining strategies and optimal machining parameters were studied, and the roughness model is validated for 3 + 2 axes and 5 continuous axes machining strategies.


Introduction
Large size spiral bevel gears are frequently used in applications [1,2] that require smooth and silent high-power transmission. This is the case for equipment dedicated to thermal energy generation, ship propulsion systems, wind turbines or power transmission in the aeronautical sector, among many others. Nowadays, there is a continuous demand for energy, and consequently, there has been an increase in the amount of equipment dedicated to energy generation and its components, such as large sized spiral gear. Traditionally, these types of gears have been manufactured with specific gear cutting machines. There are different methods for traditional gear cutting, for example, some of the most commonly used are: (1) gear hobbing with perimeter cut (Gleason) [3]; (2) continuous generation by spiral hobbing with perimeter cut (Cyclo-Palloid from Klingelnberg and Oerlikon) [4]; and (3) continuous generation by spiral hobbing with conic type cut (Palloid from Klingelnberg) [5].
However, the eruption in the market of multitasking or multiprocess machines [6], and the continuous improvement experienced in the area of numerical controls and CAM software, has led to the appearance of a suitable medium for the manufacturing of these complex geometric elements in general purpose machines and with standard tools [7,8]. This type of technology is especially Table 1. Spiral bevel gear geometry and parameters.

Spiral Bevel Gearing Design and Parameters
Materials 2018, 11, x FOR PEER REVIEW 3 of 20 In this particular case, the "3d spiral bevel gear software" was used for the design of the gear geometry. The main reason for choosing this software was the reduced cost of the license in comparison to other software. Specifically, this program allows the design of the spiral bevel geometry, with the option to choose between Gleason and Klingelnberg manufacturing methods.
A spiral bevel gear geometry was selected (Table 1) according to the Gleason method, since it is the most used method. The objective was to choose a complex and large dimension geometry to validate the capacity of general purpose multiprocessing machines for gear manufacturing. The selected material is a commonly used steel for manufacturing gears, F-1550 (18CrMo4) (C 0.186%, Si 0.259%, Mn 0.805%, P 0.011%, S 0.028%, Cr 1.071%, Mo 0.155%), and it reaches values up to 47 HRC (Rockwell Scale of Hardness, part C).
First, geometric parameters were introduced into the design software (module, gear ratio, gear direction, teeth number, pressure angle, etc.). With this information, the software generated the geometry of one of the teeth, from which the three-dimensional gear was generated.

Manufacturing
Once the geometry was obtained and analyzed, the machining strategies were designed. In this case, the CAM software used was NX10 from Siemens.

Equipment-Multiprocess Machine
A multi-process machine ZVH38/L1600 ( Figure 1) from Ibarmia (Azkoitia, Spain) was used for gear manufacturing. The machine includes turning and milling capabilities by the integration of 3 linear axes (X, Y, Z) in a mobile column and 2 rotary axes, one of them in a rotating head (B) and the other in a rotary table (C). The main advantage of multitasking machines is that the number of machines and setups required for workpiece manufacturing are reduced and often limited to one.

Machining Strategies
Machining strategies were programmed with Siemens ® NX manufacturing module. First of all, the roughing operation was programmed with the aim of reducing machining time, chip thickness and cutting forces [18] as much as possible and obtaining a near to net shape geometry. As can be seen in Table 2, the roughing operation ( Figure 2) consisted of two different steps. First, a cavity mill The selected material is a commonly used steel for manufacturing gears, F-1550 (18CrMo4) (C 0.186%, Si 0.259%, Mn 0.805%, P 0.011%, S 0.028%, Cr 1.071%, Mo 0.155%), and it reaches values up to 47 HRC (Rockwell Scale of Hardness, part C).
First, geometric parameters were introduced into the design software (module, gear ratio, gear direction, teeth number, pressure angle, etc.). With this information, the software generated the geometry of one of the teeth, from which the three-dimensional gear was generated.

Manufacturing
Once the geometry was obtained and analyzed, the machining strategies were designed. In this case, the CAM software used was NX10 from Siemens.

Equipment-Multiprocess Machine
A multi-process machine ZVH38/L1600 ( Figure 1) from Ibarmia (Azkoitia, Spain) was used for gear manufacturing. The machine includes turning and milling capabilities by the integration of 3 linear axes (X, Y, Z) in a mobile column and 2 rotary axes, one of them in a rotating head (B) and the other in a rotary table (C). The main advantage of multitasking machines is that the number of machines and setups required for workpiece manufacturing are reduced and often limited to one. In this particular case, the "3d spiral bevel gear software" was used for the design of the gear geometry. The main reason for choosing this software was the reduced cost of the license in comparison to other software. Specifically, this program allows the design of the spiral bevel geometry, with the option to choose between Gleason and Klingelnberg manufacturing methods.
A spiral bevel gear geometry was selected (Table 1) according to the Gleason method, since it is the most used method. The objective was to choose a complex and large dimension geometry to validate the capacity of general purpose multiprocessing machines for gear manufacturing. The selected material is a commonly used steel for manufacturing gears, F-1550 (18CrMo4) (C 0.186%, Si 0.259%, Mn 0.805%, P 0.011%, S 0.028%, Cr 1.071%, Mo 0.155%), and it reaches values up to 47 HRC (Rockwell Scale of Hardness, part C).
First, geometric parameters were introduced into the design software (module, gear ratio, gear direction, teeth number, pressure angle, etc.). With this information, the software generated the geometry of one of the teeth, from which the three-dimensional gear was generated.

Manufacturing
Once the geometry was obtained and analyzed, the machining strategies were designed. In this case, the CAM software used was NX10 from Siemens.

Equipment-Multiprocess Machine
A multi-process machine ZVH38/L1600 ( Figure 1) from Ibarmia (Azkoitia, Spain) was used for gear manufacturing. The machine includes turning and milling capabilities by the integration of 3 linear axes (X, Y, Z) in a mobile column and 2 rotary axes, one of them in a rotating head (B) and the other in a rotary table (C). The main advantage of multitasking machines is that the number of machines and setups required for workpiece manufacturing are reduced and often limited to one.

Machining Strategies
Machining strategies were programmed with Siemens ® NX manufacturing module. First of all, the roughing operation was programmed with the aim of reducing machining time, chip thickness and cutting forces [18] as much as possible and obtaining a near to net shape geometry. As can be seen in Table 2, the roughing operation ( Figure 2) consisted of two different steps. First, a cavity mill

Machining Strategies
Machining strategies were programmed with Siemens ® NX manufacturing module. First of all, the roughing operation was programmed with the aim of reducing machining time, chip thickness and cutting forces [18] as much as possible and obtaining a near to net shape geometry. As can be seen in Table 2, the roughing operation ( Figure 2) consisted of two different steps. First, a cavity mill strategy was performed, and then, a variable contour strategy was used in order to obtain a near to net shape geometry for finishing strategies. In R-I a frontal mill was used and in R-II a conical mill. strategy was performed, and then, a variable contour strategy was used in order to obtain a near to net shape geometry for finishing strategies. In R-I a frontal mill was used and in R-II a conical mill.  For finishing operations (Table 3), different strategies and conditions were tested for the gear teeth. Different radial depths and cut patterns (zig and zig-zag) were evaluated, for both 5 continuous axes (F-II) machining operations and 3 + 2 axes (F-I) machining. In the latter machining operation (3 + 2), the tool axis is fixed and perpendicular to the head of each tooth, as can be seen in Figure 3. Machining conditions were S = 11,900 rpm and F = 400 mm/min.   For finishing operations (Table 3), different strategies and conditions were tested for the gear teeth. Different radial depths and cut patterns (zig and zig-zag) were evaluated, for both 5 continuous axes (F-II) machining operations and 3 + 2 axes (F-I) machining. In the latter machining operation (3 + 2), the tool axis is fixed and perpendicular to the head of each tooth, as can be seen in Figure 3. Machining conditions were S = 11,900 rpm and F = 400 mm/min. strategy was performed, and then, a variable contour strategy was used in order to obtain a near to net shape geometry for finishing strategies. In R-I a frontal mill was used and in R-II a conical mill.  For finishing operations (Table 3), different strategies and conditions were tested for the gear teeth. Different radial depths and cut patterns (zig and zig-zag) were evaluated, for both 5 continuous axes (F-II) machining operations and 3 + 2 axes (F-I) machining. In the latter machining operation (3 + 2), the tool axis is fixed and perpendicular to the head of each tooth, as can be seen in Figure 3. Machining conditions were S = 11,900 rpm and F = 400 mm/min.

Machining
Finally, the gear was machined. After the roughing and finishing operations, the resultant gear is shown in Figure 4. Machined strategies were R-I (cavity mill) for teeth 1-25 and R-II (variable contour) after R-I and for teeth 1-25. For the finishing strategies: F-I for teeth 1-12, and F-II for teeth 13-25. Materials 2018, 11, x FOR PEER REVIEW 5 of 20

Machining
Finally, the gear was machined. After the roughing and finishing operations, the resultant gear is shown in Figure 4. Machined strategies were R-I (cavity mill) for teeth 1-25 and R-II (variable contour) after R-I and for teeth 1-25. For the finishing strategies: F-I for teeth 1-12, and F-II for teeth 13-25.

Predictive Model of Topography on Gear Flank
The developed model estimates the gear teeth surface topography depending on machining parameters such as tool inclination and orientation, cutting geometric parameters and tool feed and speed values. The model was tested for two different finishing operations; a 5 continuous axes machining operation and a 3 + 2 axes machining operation in order to determine the influence of the machining number of axes on the surface finish.
The model follows the following steps: 1. Interdental gap points and trajectories representation ( Figure 5). In this first step, for each interpolation point the model obtains from the machining program (CL data): the tool tip point position (xj, yj, zj) and the tool axis orientation defined by a direction vector (uj, vj, wj) in the workpiece reference system XYZ.
Milling trajectories can be obtained by means of the coordinates of successive tool tip points. Figure 5a shows the tool tip point positions obtained from the machining program of an interdental gap. In Figure 5b, the milling trajectories are represented. In the next steps, milling trajectories are evaluated after the elimination of initial and final noncutting movements, as shown in Figure 6a. 2. Simulation area definition ( Figure 6). Secondly, as can be seen in Figure 6a, five simulation areas are defined (in black) in the feed direction. Each of these simulation areas is defined by 6 points in the feed direction and about 30 points in the direction perpendicular to the feed direction. The dimension of the simulation area depends on the programmer's criteria. The

Predictive Model of Topography on Gear Flank
The developed model estimates the gear teeth surface topography depending on machining parameters such as tool inclination and orientation, cutting geometric parameters and tool feed and speed values. The model was tested for two different finishing operations; a 5 continuous axes machining operation and a 3 + 2 axes machining operation in order to determine the influence of the machining number of axes on the surface finish.
The model follows the following steps:

1.
Interdental gap points and trajectories representation ( Figure 5). In this first step, for each interpolation point the model obtains from the machining program (CL data): the tool tip point position (x j , y j , z j ) and the tool axis orientation defined by a direction vector (u j , v j , w j ) in the workpiece reference system XYZ.
Milling trajectories can be obtained by means of the coordinates of successive tool tip points. Figure 5a shows the tool tip point positions obtained from the machining program of an interdental gap. In Figure 5b, the milling trajectories are represented. In the next steps, milling trajectories are evaluated after the elimination of initial and final noncutting movements, as shown in Figure 6a.

Machining
Finally, the gear was machined. After the roughing and finishing operations, the resultant gear is shown in Figure 4. Machined strategies were R-I (cavity mill) for teeth 1-25 and R-II (variable contour) after R-I and for teeth 1-25. For the finishing strategies: F-I for teeth 1-12, and F-II for teeth 13-25.

Predictive Model of Topography on Gear Flank
The developed model estimates the gear teeth surface topography depending on machining parameters such as tool inclination and orientation, cutting geometric parameters and tool feed and speed values. The model was tested for two different finishing operations; a 5 continuous axes machining operation and a 3 + 2 axes machining operation in order to determine the influence of the machining number of axes on the surface finish.
The model follows the following steps: 1. Interdental gap points and trajectories representation ( Figure 5). In this first step, for each interpolation point the model obtains from the machining program (CL data): the tool tip point position (xj, yj, zj) and the tool axis orientation defined by a direction vector (uj, vj, wj) in the workpiece reference system XYZ.
Milling trajectories can be obtained by means of the coordinates of successive tool tip points. Figure 5a shows the tool tip point positions obtained from the machining program of an interdental gap. In Figure 5b, the milling trajectories are represented. In the next steps, milling trajectories are evaluated after the elimination of initial and final noncutting movements, as shown in Figure 6a. 2. Simulation area definition ( Figure 6). Secondly, as can be seen in Figure 6a, five simulation areas are defined (in black) in the feed direction. Each of these simulation areas is defined by 6 points in the feed direction and about 30 points in the direction perpendicular to the feed direction. The dimension of the simulation area depends on the programmer's criteria. The

2.
Simulation area definition ( Figure 6). Secondly, as can be seen in Figure 6a, five simulation areas are defined (in black) in the feed direction. Each of these simulation areas is defined by 6 points in the feed direction and about 30 points in the direction perpendicular to the feed direction.
The dimension of the simulation area depends on the programmer's criteria. The reference trajectory for the study is defined in magenta, corresponding to the one located in the middle of the simulation area. As an example, Figure 6b shows the milling trajectories followed by the tool tip in one of the simulation areas considered in Figure 6a. Black points in each milling trajectory represent the interpolation points given by the machining program for the selected simulation area. Next, the surface topography generated in each simulation area is predicted. In order to achieve this, a local reference system O W X W Y W Z W is defined for each simulation area (Step 4). First, the positions of the tool center point (C) in the selected simulation area are deduced in Step 3.
Materials 2018, 11, x FOR PEER REVIEW 6 of 20 reference trajectory for the study is defined in magenta, corresponding to the one located in the middle of the simulation area. As an example, Figure 6b shows the milling trajectories followed by the tool tip in one of the simulation areas considered in Figure 6a. Black points in each milling trajectory represent the interpolation points given by the machining program for the selected simulation area. Next, the surface topography generated in each simulation area is predicted. In order to achieve this, a local reference system O W X W Y W Z W is defined for each simulation area (Step 4). First, the positions of the tool center point (C) in the selected simulation area are deduced in Step 3. 3. Tool center position determination ( Figure 7). In order to obtain the coordinates of the tool center point (C) (Figure 7f), tool tip point coordinates (xj, yj, zj) and tool axis direction vector (uj, vj, wj) given in the machining program and the ball end mill, radius R needs to be taken into account. First, the line passing through the point (xj, yj, zj) and parallel to the vector (uj, vj, wj) is considered by means of the following equation: x-x j Next, taking into account that the tool center point (C) is located at a distance equal to the tool radius R from the tool tip point of coordinates (xj, yj, zj), the coordinates (x, y, z) of the tool center point must fulfill this equation: Therefore, in order to obtain the coordinates (x, y, z) of the tool center point when the tool tip point is located at a point of coordinates (xj, yj, zj) and tool axis vector is (uj, vj, wj), Equations (1) and (2) must be solved for x, y and z.
The red points shown in Figure 7a represent the positions of the tool center point (C) for the simulation area shown in Figure 6b

3.
Tool center position determination ( Figure 7). In order to obtain the coordinates of the tool center point (C) (Figure 7f), tool tip point coordinates (x j , y j , z j ) and tool axis direction vector (u j , v j , w j ) given in the machining program and the ball end mill, radius R needs to be taken into account. First, the line passing through the point (x j , y j , z j ) and parallel to the vector (u j , v j , w j ) is considered by means of the following equation: Next, taking into account that the tool center point (C) is located at a distance equal to the tool radius R from the tool tip point of coordinates (x j , y j , z j ), the coordinates (x, y, z) of the tool center point must fulfill this equation: Therefore, in order to obtain the coordinates (x, y, z) of the tool center point when the tool tip point is located at a point of coordinates (x j , y j , z j ) and tool axis vector is (u j , v j , w j ), Equations (1) and (2) must be solved for x, y and z.
The red points shown in Figure 7a represent the positions of the tool center point (C) for the simulation area shown in Figure 6b The origin OW and the axis ZW are the elements of this system that are obtained first. In order to achieve this, a set of auxiliary elements (a point M and two unit vectors u and q ) is considered. Firstly, two interpolation points, named A and B, which are located in the center of the reference trajectory ( Figure 7b) are selected. The middle point D of the linear interpolation between points A and B is considered. The coordinates (xD, yD, zD) of point D are calculated as a function of the coordinates (xA, yA, zA) and (xB, yB, zB) of points A and B: Taking into account the tool axis orientation when the tool tip goes from point A to point B, the position of the tool center point when the tool tip point is located at point D can be calculated through Equations (1) and (2). Therefore, this position defined in this paper as point M (Figure 7b), with coordinates (xM, yM, zM), can be obtained from the resolution of the following equations: where (

4.
Definition of workpiece local coordinate system. In order to predict the surface topography generated in each simulation area, a local coordinate system O W X W Y W Z W attached to the workpiece (gear tooth surface) is defined. The definition of this local coordinate system for each simulation area is based on the tool tip point positions and the tool axis orientations given in the machining program for the reference milling trajectory shown in magenta in Figures 6 and 7. The origin O W and the axis Z W are the elements of this system that are obtained first. In order to achieve this, a set of auxiliary elements (a point M and two unit vectorsû andq) is considered. Firstly, two interpolation points, named A and B, which are located in the center of the reference trajectory ( Figure 7b) are selected. The middle point D of the linear interpolation between points A and B is considered. The coordinates (x D , y D , z D ) of point D are calculated as a function of the coordinates (x A , y A , z A ) and (x B , y B , z B ) of points A and B: Taking into account the tool axis orientation when the tool tip goes from point A to point B, the position of the tool center point when the tool tip point is located at point D can be calculated through Equations (1) and (2). Therefore, this position defined in this paper as point M (Figure 7b), with coordinates (x M , y M , z M ), can be obtained from the resolution of the following equations: where (u AB , v AB , w AB ) is the direction vector of tool axis, given by the machining program, when the tool tip goes from point A to point B. The point M is calculated for each simulation area and employed for the definition of the local system attached to each simulation area. In this paper, it is assumed that axis Z W of the local system passes through this point M.
Next, the vector defining the direction of axis Z W is calculated by considering two unit vectors. A unit vectorû = (u x , u y , u z ) parallel to the tool linear motion direction between points A and B is defined as: A second unit vectorq = (q x , q y , q z ) that takes into account the direction at point M of the middle points of the milling trajectories selected in the simulation area is also defined (Figure 7c). Once the unit vectorsû andq are obtained, a unit vectorŵ = (w x , w y , w z ) perpendicular toû andq is defined as follows:û =û ×q This vectorŵ is assumed to coincide with the direction of axis Z W (Figure 7d). In addition, in order to define the position of the origin O W , it is assumed that this point is located at a distance R from the point M. Therefore, taking into account that point O W is also located on a line passing through point M and parallel to vectorŵ, the coordinates (x Ow , y Ow , z Ow ) of point O W are obtained by solving these equations: x Once the origin O W and the axis Z W have been obtained, axes X W and Y W are defined. The axis X W is assumed to have the same direction as the unit vectorû ( Figure 7d). Therefore, the axis X W coincides with the feed direction of the tool between points A and B. Finally, the axis Y W is perpendicular to axes X W and Z W . The direction of axis Y W is defined by a unit vectorv = (v x , v y , v z ) calculated as the cross product between vectorsŵ andû:v =ŵ ×û (10) Figure 7e shows an equivalent representation of Figure 7d. In Figure 7e, the local system O W X W Y W Z W is taken as a reference for the prediction of the topography generated in the surface of gear teeth. The surface topography will be simulated in a rectangular area defined along axes X W and Y W , as shown in Figure 7e. In order to model the surface roughness, the equations expressing the trajectories of tool cutting edges in this local system are deduced in Step 6 as a function of the ball end mill geometry (Step 5), the tool axis orientation and the milling trajectories followed by the tool in the simulation area. Firstly, the coordinates of points defining the milling trajectories and the direction vector of tool axis orientations expressed in the workpiece system XYZ (given by the machining program and obtained in Step 1) must be transformed into the local system O W X W Y W Z W .
In order to express the coordinates of a point in the local system O W X W Y W Z W from its coordinates in the workpiece system XYZ, a homogeneous transformation matrix T is defined as a function of the unit vectorsû,v andŵ and the coordinates of the origin O W in the system XYZ. The coordinates (x j , y j , z j ) of the tool tip point positions given in the machining program can be expressed in the local system O W X W Y W Z W , (x j W , y j W , z j W ), as: Similarly, a direction vector (u j , v j , w j ) given in the machining program can be expressed in the local system O W X W Y W Z W , (u j W , v j W , w j W ) by means of a matrix T 1 depending on the unit vectorsû,v Once the tool tip point positions and the tool axis orientations are expressed in the local system O W X W Y W Z W , the equations for the cutting edge trajectory are deduced. In order to achieve this, the geometry of the tool cutting edges is first modeled.

5.
Tool geometric modelization (Figure 8). The roughness model is developed for a ball end mill geometry, whose behavior resembles that of a conical tool that only cuts with the spherical area of the tool tip for gear teeth finishing trajectories. Figure 8a shows schematically the 3D geometry of a ball end mill of radius R and helix angle i 0 . For simplicity, only one of the edges is represented in the figure (Figure 8b), but the developed model is generalized for a N t edge mill. It is assumed that the cutting edge represented in this figure represents one of the edges of the milling cutter, which is referred to as a k edge, where k = 1, 2, ..., N t . To define the position of a point located on the edge k, a reference system O T X T Y T Z T attached to the ball end mill is defined: The axis Y T is perpendicular to axes X T and Y T forming a right-handed system.
The position angle ϕ k of cutting edge k with respect to axis X T can be expressed as: Similarly, a direction vector (uj, vj, wj) given in the machining program can be expressed in the local system OWXWYWZW, (uj W , vj W , wj W ) by means of a matrix T1 depending on the unit vectors u , v and w : Once the tool tip point positions and the tool axis orientations are expressed in the local system OWXWYWZW, the equations for the cutting edge trajectory are deduced. In order to achieve this, the geometry of the tool cutting edges is first modeled. (Figure 8). The roughness model is developed for a ball end mill geometry, whose behavior resembles that of a conical tool that only cuts with the spherical area of the tool tip for gear teeth finishing trajectories. Figure 8a shows schematically the 3D geometry of a ball end mill of radius R and helix angle i0. For simplicity, only one of the edges is represented in the figure (Figure 8b), but the developed model is generalized for a Nt edge mill. It is assumed that the cutting edge represented in this figure represents one of the edges of the milling cutter, which is referred to as a k edge, where k = 1, 2, ..., Nt. To define the position of a point located on the edge k, a reference system OTXTYTZT attached to the ball end mill is defined: 

Tool geometric modelization
The reference system origin OT is located on the tool tip being coincident with the tool axis  The axis ZT corresponds to the tool axis  The axis XT is radial and tangent to edge 1 projection in the plane containing point OT and perpendicular to ZT axis  The axis YT is perpendicular to axes XT and YT forming a right-handed system.
The position angle ϕ k of cutting edge k with respect to axis XT can be expressed as: The position of a cutting edge point P(i, k), located at a height z i on the edge k, can be written in the tool reference system O T X T Y T Z T as a function of (a) the radius R i and the position angle β i of cutting edge point at height z i and (b) the position angle ϕ k of edge k as follows: where, from ball end mill geometry, the radius R i and the position angle β i are: Next, the equations of trajectories followed by cutting edge points are deduced.

6.
Tool axis orientation and points trajectories determination (Figures 9 and 10). In this step, the trajectory followed by any cutting edge point in a five-axis milling operation is expressed as a function of cutting parameters, tool axis orientation and milling trajectories defined in the machining program. The cutting parameters are the feed value (F) in mm/min and the spindle speed (S) in rpm. Therefore, the tool feed in mm per revolution can be calculated as: In order to define the cutting trajectories, as an example, the linear motion shown in Figure 7e, when the tool tip point goes from a point O to a point I in a milling trajectory of the simulation area, is considered. The procedure presented below is carried out in every section of the milling trajectories located inside the simulation area.
From the machining program, the coordinates (x O , y O , z O ) and (x I , y I , z I ) of points O and I and the direction vector (u OI , v OI , w OI ) of tool axis orientation during this linear motion can be known. By means of the matrices given by Equations (11) and (12) Taking into account the feed direction of the ball end mill along the linear motion between points O and I, feed values f x , f y and fz along axes X W , Y W and Z W can be defined. In order to achieve this, a unit vectorr = (r x , r y , r z ) that considers the tool feed direction between points O and I, is defined as a function of their coordinates: The components f x , f y and fz of the tool feed can be expressed as: f y = f r y (22) f z = f r z By means of feed values f x , f y and fz, the position of the tool tip point along the linear displacement between points O and I is expressed as a function of the tool rotation angle α in radians. In Figure 9, it is assumed that the tool tip point is located at a point O 1 whose coordinates are: where the tool rotation angle α goes from 0 to α I -α O , being α I and α O , the tool rotation angles when the tool tip point is located at points I and O, respectively.
where the tool rotation angle α goes from 0 to αI-αO, being αI and αO, the tool rotation angles when the tool tip point is located at points I and O, respectively. In order to simplify the deduction of cutting edge trajectories, the tool axis orientation is defined in this step by means of two angles, which are represented in Figure 9: a tilt angle β and a lead angle γ.


The tilt angle β is defined as the angle between the tool rotating axis and the axis Z1, which is parallel to axis ZW.  The lead angle γ is the angle between the projection of the tool rotating axis into plane X1Y1 (which is parallel to plane XWYW) with respect to axis XW direction.
These angles β and γ can be written as function of the tool axis direction vector (uOI W , vOI W , wOI W ): In order to obtain the equations expressing the trajectory of cutting edge points in the local system OWXWYWZW from their coordinates in the tool system OTXTYTZT, three auxiliary systems O1X1Y1Z1, O2X2Y2Z2 and O3X3Y3Z3, shown in Figure 10, are defined as a function of: • The current position of the tool tip point given by the coordinates of point O1 (Figure 9). A translation of system O1X1Y1Z1 with respect to system OWXWYWZW (Figure 10a) is considered.
The system O1X1Y1Z1 is shifted in XW, YW and ZW by distances xO1 W , yO1 W and zO1 W respectively. The homogeneous transformation matrix TW1(fx, fy, fz, α) of this translation in XW, YW and ZW is:  In order to simplify the deduction of cutting edge trajectories, the tool axis orientation is defined in this step by means of two angles, which are represented in Figure 9: a tilt angle β and a lead angle γ.
The tilt angle β is defined as the angle between the tool rotating axis and the axis Z 1 , which is parallel to axis Z W . The lead angle γ is the angle between the projection of the tool rotating axis into plane X 1 Y 1 (which is parallel to plane X W Y W ) with respect to axis X W direction.
These angles β and γ can be written as function of the tool axis direction vector (u OI W , v OI W , w OI W ): In order to obtain the equations expressing the trajectory of cutting edge points in the local system O W X W Y W Z W from their coordinates in the tool system O T X T Y T Z T , three auxiliary systems Figure 10, are defined as a function of: • The current position of the tool tip point given by the coordinates of point O 1 (Figure 9). A translation of system O 1 X 1 Y 1 Z 1 with respect to system O W X W Y W Z W (Figure 10a) is considered.
The system O 1 X 1 Y 1 Z 1 is shifted in X W , Y W and Z W by distances x O1 W , y O1 W and z O1 W respectively.
The homogeneous transformation matrix T W1 (f x , f y , f z , α) of this translation in X W , Y W and Z W is: • The lead angle γ (Figure 10b). The system O 2 X 2 Y 2 Z 2 is rotated by an angle γ about axis Z 1 in clockwise direction. The homogeneous transformation matrix T 12 (γ) of this rotation about Z 1 -axis is: • The tilt angle β (Figure 10c). The system O 3 X 3 Y 3 Z 3 is rotated by an angle β about axis Y 2 in a clockwise direction. The homogeneous transformation matrix T 23 (β) of this rotation about Y 2 -axis is: • The rotation angle α (Figure 10d). The tool system O T X T Y T Z T is rotated by an angle α about axis Z 3 in clockwise direction. The homogeneous transformation matrix T 3T (α) of this rotation about Z 3 -axis is: where α O is the tool rotation angle when the tool tip point is located at point O.
Finally, the trajectory of any cutting edge point P(i, k) located at a height z i on the edge k, as shown in Figure 8, is expressed in the system O W X W Y W Z W of the gear tooth ( Figure 9) as a function of the previous transformation matrices T W1 (f x , f y , f z , α), T 12 (γ), T 23 (β) and T 3T (α) and the coordinates of the cutting edge point P(i, k) in the tool system O T X T Y T Z T (Equations (14)-(16) in Step 5): Once the cutting edge trajectories are obtained, surface topographies generated in each simulation area are obtained through the procedure described in Step 7.
Once the cutting edge trajectories are obtained, surface topographies generated in each simulation area are obtained through the procedure described in Step 7.
(a) 7. Surface topographies determination (Figure 11). The surface topography in the gear teeth is obtained from successive point positions of cutting edge points located on the Nt edges with the tool rotating movement. The surface topography is simulated in a rectangular area defined along axes XW and YW, as shown in Figure 7e. This area is divided into a discrete number of planes perpendicular to axes XW and YW. For each plane, taking into account the trajectories of cutting edge points given by Equation (33), the model predicts the area swept by the tool cutting edges during the tool rotation and feed motion. The profile generated at each plane is obtained from the lowest positions of marks left by cutting edge points. By considering the profiles generated in those planes, the 3D surface topography in the rectangular area can be predicted. This allows the profiles generated along axes XW and YW to be analyzed. As an example, Figure 11 shows the surface topography predicted for the simulation area selected in Figure 6b. In Figure 11a, a 3D representation of the predicted surface topography is shown. When the 2D profiles generated at two planes (YW = 0 and XW = 0) are considered (Figure 11b,c), it can be observed that profiles are not only composed of roughness marks left by tool cutting edges. In Figure 11b, the straight sections defining the tool trajectory (red line) can be observed. In Figure 11c, the form of the gear tooth surface can also be observed. In order to analyze the surface roughness, the effect of tool trajectory in each milling pass is removed for each profile predicted along YW-axis. As a consequence, roughness profiles (in black) are obtained. In Figure 11c, the form of the gear surface is also removed from the predicted profile and the roughness profile in black is obtained. In Figure 11d, the predicted surface roughness without the influence of the milling trajectory is shown. It can be observed that the step over between milling passes has a significant influence on the topography and the roughness peak-to-valley values. However, for this case, the effect of tool feed on roughness is less.

7.
Surface topographies determination (Figure 11). The surface topography in the gear teeth is obtained from successive point positions of cutting edge points located on the N t edges with the tool rotating movement. The surface topography is simulated in a rectangular area defined along axes X W and Y W , as shown in Figure 7e. This area is divided into a discrete number of planes perpendicular to axes X W and Y W . For each plane, taking into account the trajectories of cutting edge points given by Equation (33), the model predicts the area swept by the tool cutting edges during the tool rotation and feed motion. The profile generated at each plane is obtained from the lowest positions of marks left by cutting edge points. By considering the profiles generated in those planes, the 3D surface topography in the rectangular area can be predicted. This allows the profiles generated along axes X W and Y W to be analyzed. As an example, Figure 11 shows the surface topography predicted for the simulation area selected in Figure 6b. In Figure 11a, a 3D representation of the predicted surface topography is shown. When the 2D profiles generated at two planes (Y W = 0 and X W = 0) are considered (Figure 11b,c), it can be observed that profiles are not only composed of roughness marks left by tool cutting edges. In Figure 11b, the straight sections defining the tool trajectory (red line) can be observed. In Figure 11c, the form of the gear tooth surface can also be observed. In order to analyze the surface roughness, the effect of tool trajectory in each milling pass is removed for each profile predicted along Y W -axis. As a consequence, roughness profiles (in black) are obtained. In Figure 11c, the form of the gear surface is also removed from the predicted profile and the roughness profile in black is obtained. In Figure 11d, the predicted surface roughness without the influence of the milling trajectory is shown. It can be observed that the step over between milling passes has a significant influence on the topography and the roughness peak-to-valley values. However, for this case, the effect of tool feed on roughness is less.
trajectory in each milling pass is removed for each profile predicted along YW-axis. As a consequence, roughness profiles (in black) are obtained. In Figure 11c, the form of the gear surface is also removed from the predicted profile and the roughness profile in black is obtained. In Figure 11d, the predicted surface roughness without the influence of the milling trajectory is shown. It can be observed that the step over between milling passes has a significant influence on the topography and the roughness peak-to-valley values. However, for this case, the effect of tool feed on roughness is less.

Model Validation Results
In order to validate the surface roughness predictive model explained in the previous section, measured roughness after gear machining, and model predicted roughness, were compared.

Gear Roughness Measurement
For measuring gear surface roughness (Ra and Rz) ( Table 4), confocal tridimensional Leica ® DMC 3D and contact profilometer Taylor Hobson ® Form Taylorsurf were used for the 3D and 2D roughness measurement, respectively.

Model Validation Results
In order to validate the surface roughness predictive model explained in the previous section, measured roughness after gear machining, and model predicted roughness, were compared.

Gear Roughness Measurement
For measuring gear surface roughness (R a and R z ) ( Table 4), confocal tridimensional Leica ® DMC 3D and contact profilometer Taylor Hobson ® Form Taylorsurf were used for the 3D and 2D roughness measurement, respectively.  As it is mentioned in Section 3, the developed model predicts surface roughness in 5 different gear tooth zones. Nevertheless, surface roughness is only measured in two zones, always avoiding tooth edges (zones 1 and 5) and coinciding with the intermediate tooth zone. This fact must be taken into consideration when comparing predicted and measured roughness values. Therefore, for model validation, measured roughness values were compared to predicted values from zones 2-4.

Gear Roughness Prediction
The developed roughness model analyses 5 gear tooth zones and predicts surface roughness and generates surface topography and roughness profiles in each of these 5 zones. Thanks to this, different roughness profiles are predicted along tool feed direction X W . They are simulated for different tool edges number (Nt) and feed values (f ) as can be seen in Figures 10 and 11.
In Table 5, roughness values for each gear tooth flank depending on machining type, cutting patterns and programmed scallop height are shown. These values also depend on tooth flank (concave or convex), and on the analyzed zone (1)(2)(3)(4)(5). In Table 5, the first of the rows corresponds to the concave flanks and the second to convex ones.
In this case, taking into account that the selected gear design method corresponds to the Gleason method, the roughness values (R a and R z ) are slightly different in the 5 analyzed zones. This is a consequence of the Gleason method, which generates a gear with a variable gearing height. For this reason, in the areas closest to the outer diameter, the obtained roughness values are higher.
The shape of the roughness profiles is a consequence of the straight sections between two points of the machining program (interpolation points) that define tool trajectory. The distance between the different interpolation points within the same path is approximately 0.56 mm.
In the left-side figures (Figures 12 and 13), the straight sections defined by machining G1 (linear movement) are represented by a red line. The blue color represents the roughness profile. As can be seen, the roughness profile depends on the tool edge number (N t ) and programmed tool feed value (f ). In the right-side figures (Figures 12 and 13), the form associated to workpiece component is eliminated, and for each roughness profile, both the arithmetic mean roughness parameter (R a ) and the average roughness parameter (R z ) are obtained. different interpolation points within the same path is approximately 0.56 mm.
In the left-side figures (Figures 12 and 13), the straight sections defined by machining G1 (linear movement) are represented by a red line. The blue color represents the roughness profile. As can be seen, the roughness profile depends on the tool edge number (Nt) and programmed tool feed value (f). In the right-side figures (Figures 12 and 13), the form associated to workpiece component is eliminated, and for each roughness profile, both the arithmetic mean roughness parameter (Ra) and the average roughness parameter (Rz) are obtained.     Figure 14 shows a comparison, for the same gear tooth, between the profile generated after gear measurement (after the machining process) and the profile generated by the developed roughness predictive model. The variations shown in some roughness profiles peaks correspond to the trajectory when interpolating between the different interpolation points that make up the same machining path.  Figure 14 shows a comparison, for the same gear tooth, between the profile generated after gear measurement (after the machining process) and the profile generated by the developed roughness predictive model. The variations shown in some roughness profiles peaks correspond to the trajectory when interpolating between the different interpolation points that make up the same machining path.

Discussion
The obtained roughness results, which determine gear quality, agree with cited works related to gear manufacturing in CNC machines, and, indicate improved surface quality and process versatility. Moreover, more detailed results are added in this work for optimal machining strategies and predicting roughness.
There are several aspects to mention in relation to machining strategies, cutting parameters and roughness results. On one hand, for 3 + 2 axis machining, for both zig and zig-zag strategies, the

Discussion
The obtained roughness results, which determine gear quality, agree with cited works related to gear manufacturing in CNC machines, and, indicate improved surface quality and process versatility. Moreover, more detailed results are added in this work for optimal machining strategies and predicting roughness.
There are several aspects to mention in relation to machining strategies, cutting parameters and roughness results. On one hand, for 3 + 2 axis machining, for both zig and zig-zag strategies, the obtained R a and R z values are slightly different for the zig strategy. The tool works down milling and machining time is increased due to non-cutting movements. Machining time is almost doubled. For 5 continuous axis machining, obtained results show differences that need to be taken into account. For zig cutting patterns, obtained roughness values for R a and R z are considerably lower than the ones obtained for zig-zag cutting patterns, about 50% lower. If both, 3 + 2 axis and 5 continuous axis machining are compared, better surface roughness values were obtained for 5 continuous axis machining with zig cutting pattern. On the contrary, the worst surface roughness results are obtained for 5 continuous axis machining with zig-zag cutting pattern. In relation to programmed stepovers, when programmed stepovers are reduced and the tool works up milling, the tool tends to go back to already machined path increasing roughness values. This is called 'rail effect' and is a consequence of tool deflection, which could explain why surface roughness values are higher for those machining trajectories with zig-zag cutting patterns.
The surface roughness prediction model was also used to analyze 5 axes and 3 + 2 axes machining strategies behavior. In the 3 + 2 axes machining case, the roughness values obtained from concave and convex gear flanks were similar. Instead, in the 5 continuous axis machining case, obtained surface roughness values were higher in convex gear flanks. Thanks to the developed roughness model, this problem can be corrected by changing the tool axis attack angle in the machining surface in order to improve surface roughness. Indirectly, the model also detects the so-called 'rail effect' previously mentioned, that is, the obtained roughness values almost doubled. The presented model also determined the influence of cutting parameters such as tool feed values (mm/rev) and tool edge number. Thus, it can be concluded, that for a higher tool edge number (maintaining tool feed values), the obtained roughness results were significantly lower. Clearly there is a direct link between programmed feed values and obtained roughness results. The results showed that a small increase in the feed value has a significant effect on the final surface quality obtained. After roughness values analysis in the tool feed direction and comparing these with those generated in the direction perpendicular to it, it is clear that the roughness due to the application of the different stepovers, for the same feed value programmed, is always higher. This makes it a more restrictive parameter, which is why it is measured in each of the different machined flanks.

Conclusions
In recent years, technological advances have enabled gear manufacturing in general purpose machines. This is a feasible process that is less limited to gear size and geometry than traditional technologies. The machining of gears in multitasking machines is presented here as a real application for this type of technology due to its flexibility, size and the variety of geometries that can be machined in this type of machine. It can be concluded that the presented roughness predictive model fulfills its function, making it possible to predict and control the cutting strategies and parameters to obtain the required surface finish. The use of standard tools for the machining of gears requires less time for tool supply, provides a greater variety range and competitive time and costs. In addition, it is possible to exchange tools between different machines. Specific gear manufacturing machines require 'blank' material for gear manufacturing. On the contrary, general purpose machines with multitasking technology enable the entire gear machining in a single machine and take a single reference in the workpiece. This ensures tight execution times and the required quality consecution. Therefore, the presented study has demonstrated that although spiral bevel gears geometry is a complex geometry, it is possible to machine it with 3 + 2 machining axes kinematics. The rotary axis can be positioned and fixed from the beginning for a more robust process. The obtained surface roughness values are acceptable in this case. Moreover, 3 + 2 machining is cheaper because less interpolated axes are required. Also, 3 + 2 axes programming is not as challenging as 5 axes programming. This work validates the developed surface topography model for a ball mill. There is concordance between experimentally obtained values and theoretical values obtained by the model. Moreover, the obtained values for different programmed stepovers maintain the same tendency. Topographical simulation becomes an essential tool after the programming of each of the finishing strategies because it optimizes machining results without resorting to the trial and error method. Thus, costs and time is reduced, which is desirable under current market conditions.