*2.5. 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.

**Figure 4.** Roughing strategies result (**a**); Finishing strategies result (**b**).

#### **3. 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.

**Figure 5.** Interdental gap points (**a**) and trajectories (**b**) representation.

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 *OWXWYWZW* 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.

**Figure 6.** Simulation area (**a**) and reference trajectory points (**b**) for the study definition.

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:

$$\frac{\mathbf{x} - \mathbf{x}\_j}{u\_j} = \frac{y - y\_j}{v\_j} = \frac{z - z\_j}{w\_j} \tag{1}$$

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:

$$\sqrt{\left(\mathbf{x} - \mathbf{x}\_{j}\right)^{2} + \left(y - y\_{j}\right)^{2} + \left(z - z\_{j}\right)^{2}} = R$$

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. The surface generated by the positions of the tool center point approximates to a surface parallel to the tool tip point positions.

**Figure 7.** Tool center points (red) in relation to tool tip points (black) and to tool axis orientation and local reference system *OWXWYWZW* attached to workpiece (gear tooth). (**a**) Tool center points position; (**b**) M point definition; (**c**) Reference trajectory; (**d**) Tool tip and center point positions; (**e**) Reference for the prediction of the topography generated in the surface of gear teeth; (**f**) Ball end mill geometry.

4. **Definition of workpiece local coordinate system.** In order to predict the surface topography generated in each simulation area, a local coordinate system *OWXWYWZW* 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 *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*:

$$x\_D = \frac{x\_A + x\_B}{2}; y\_D = \frac{y\_A + y\_B}{2}; z\_D = \frac{z\_A + z\_B}{2} \tag{3}$$

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:

$$\frac{\mathbf{x}\_M - \mathbf{x}\_D}{u\_{AB}} = \frac{y\_M - y\_D}{v\_{AB}} = \frac{z\_M - z\_D}{w\_{AB}} \tag{4}$$

$$\sqrt{\left(\mathbf{x}\_M - \mathbf{x}\_D\right)^2 + \left(y\_M - y\_D\right)^2 + \left(z\_M - z\_D\right)^2} = R \tag{5}$$

where (*uAB*, *vAB*, *wAB*) 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 *ZW* of the local system passes through this point *M*.

Next, the vector defining the direction of axis *ZW* is calculated by considering two unit vectors. A unit vector **u**ˆ = (*ux*, *uy*, *uz*) parallel to the tool linear motion direction between points *A* and *B* is defined as:

$$\hat{\mathbf{u}} = \frac{\mathbf{p}}{|\mathbf{p}|} \text{ where } \mathbf{p} = (\mathbf{x}\_B - \mathbf{x}\_{A\prime}, y\_B - y\_{A\prime}, z\_B - z\_A) \tag{6}$$

A second unit vector **q**ˆ = (*qx*, *qy*, *qz*) 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 **u**ˆ and **q**ˆ are obtained, a unit vector **w**ˆ = (*wx*, *wy*, *wz*) perpendicular to **u**ˆ and **q**ˆ is defined as follows:

$$
\hat{\mathfrak{u}} := \hat{\mathfrak{u}} \times \hat{\mathfrak{q}}\tag{7}
$$

This vector **w**ˆ is assumed to coincide with the direction of axis *ZW* (Figure 7d). In addition, in order to define the position of the origin *OW*, it is assumed that this point is located at a distance *R* from the point *M*. Therefore, taking into account that point *OW* is also located on a line passing through point *M* and parallel to vector **w**ˆ , the coordinates (*xOw*, *yOw*, *zOw*) of point *OW* are obtained by solving these equations:

$$\frac{x\_{\text{Ow}} - x\_M}{w\_x} = \frac{y\_{\text{Ow}} - y\_M}{w\_y} = \frac{z\_{\text{Ow}} - z\_M}{w\_z} \tag{8}$$

$$\sqrt{(\mathbf{x}\_{\text{Ow}} - \mathbf{x}\_{M})^2 + (y\_{\text{Ow}} - y\_{M})^2 + (z\_{\text{Ow}} - z\_{M})^2} = \mathbb{R} \tag{9}$$

Once the origin *OW* and the axis *ZW* have been obtained, axes *XW* and *YW* are defined. The axis *XW* is assumed to have the same direction as the unit vector **u**ˆ (Figure 7d). Therefore, the axis *XW* coincides with the feed direction of the tool between points *A* and *B*. Finally, the axis *YW* is perpendicular to axes *XW* and *ZW*. The direction of axis *YW* is defined by a unit vector ˆ**v** = (*vx*, *vy*, *vz*) calculated as the cross product between vectors **w**ˆ and **u**ˆ:

$$
\hat{\mathbf{v}} = \hat{\mathbf{w}} \times \hat{\mathbf{u}}\tag{10}
$$

Figure 7e shows an equivalent representation of Figure 7d. In Figure 7e, the local system *OWXWYWZW* 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 *XW* and *YW*, 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 *OWXWYWZW*.

In order to express the coordinates of a point in the local system *OWXWYWZW* from its coordinates in the workpiece system *XYZ*, a homogeneous transformation matrix **T** is defined as a function of the unit vectors **u**ˆ, **v**ˆ and **w**ˆ and the coordinates of the origin *OW* in the system *XYZ*. The coordinates (*xj*, *yj*, *zj*) of the tool tip point positions given in the machining program can be expressed in the local system *OWXWYWZW*, (*xj <sup>W</sup>*, *yj <sup>W</sup>*, *zj <sup>W</sup>*), as:

$$
\begin{bmatrix} x\_j \\ y\_j \\ z\_j \\ 1 \end{bmatrix} = \begin{bmatrix} u\_x & v\_x & w\_x & x\_{Ow} \\ u\_y & v\_y & w\_y & y\_{Ow} \\ u\_z & v\_z & w\_z & z\_{Ow} \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x\_j^W \\ y\_j^W \\ z\_j^W \\ 1 \end{bmatrix} = \mathbf{T} \begin{bmatrix} x\_j^W \\ y\_j^W \\ z\_j^W \\ 1 \end{bmatrix} \rightarrow \begin{bmatrix} x\_j^W \\ y\_j^W \\ z\_j^W \\ 1 \end{bmatrix} = \mathbf{T}^{-1} \begin{bmatrix} x\_j \\ y\_j \\ z\_j \\ 1 \end{bmatrix} \tag{11}
$$

Similarly, a direction vector (*uj*, *vj*, *wj*) given in the machining program can be expressed in the local system *OWXWYWZW*, (*uj <sup>W</sup>*, *vj <sup>W</sup>*, *wj <sup>W</sup>*) by means of a matrix **T**<sup>1</sup> depending on the unit vectors **u**ˆ, **v**ˆ and **w**ˆ

$$
\begin{bmatrix} u\_j \\ v\_j \\ w\_j \\ 1 \end{bmatrix} = \begin{bmatrix} u\_x & v\_x & w\_x & 0 \\ u\_y & v\_y & w\_y & 0 \\ u\_z & v\_z & w\_z & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} u\_j^W \\ v\_j^W \\ w\_j^W \\ 1 \end{bmatrix} = \mathbf{T}\_1 \begin{bmatrix} u\_j^W \\ v\_j^W \\ w\_j^W \\ 1 \end{bmatrix} \rightarrow \begin{bmatrix} u\_j^W \\ v\_j^W \\ w\_j^W \\ 1 \end{bmatrix} = \mathbf{T}\_1^{-1} \begin{bmatrix} u\_j \\ v\_j \\ w\_j \\ 1 \end{bmatrix} \tag{12}
$$

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. 

	- 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 *ϕ<sup>k</sup>* of cutting edge *k* with respect to axis *XT* can be expressed as:

$$
\varphi\_k = \frac{2\pi}{N\_t}(k-1) \tag{13}
$$

a) b)

**Figure 8.** Ball end mill geometry (**a**) and *k* edge geometry definition (**b**).

The position of a cutting edge point *P*(*i*, *k*), located at a height *zi* on the edge *k*, can be written in the tool reference system *OTXTYTZT* as a function of (a) the radius *Ri* and the position angle *β<sup>i</sup>* of cutting edge point at height *zi* and (b) the position angle *ϕ<sup>k</sup>* of edge *k* as follows:

$$\mathbf{x}\_{P(i,k)}^T = \boldsymbol{R}\_i \cdot \cos(\boldsymbol{\beta}\_i + \boldsymbol{\varphi}\_k) \tag{14}$$

$$\boldsymbol{y}\_{P(i,k)}^T = \boldsymbol{R}\_i \cdot \sin(\boldsymbol{\beta}\_i + \boldsymbol{\varphi}\_k) \tag{15}$$

$$z\_{P(i,k)}^T = z\_i \tag{16}$$

where, from ball end mill geometry, the radius *Ri* and the position angle *β<sup>i</sup>* are:

$$R\_i = \sqrt{2Rz\_i - \left(z\_i\right)^2} \tag{17}$$

$$\beta\_i = z\_i \cdot \tan(i\_0) / R \tag{18}$$

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:

$$f\left(\frac{\text{mm}}{\text{rev}}\right) = \frac{F(\text{mm}/\text{min})}{S(\text{rpm})}\tag{19}$$

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 (*xO*, *yO*, *zO*) and (*xI*, *yI*, *zI*) of points *O* and *I* and the direction vector (*uOI*, *vOI*, *wOI*) of tool axis orientation during this linear motion can be known. By means of the matrices given by Equations (11) and (12), the coordinates (*xO<sup>W</sup>*, *yO<sup>W</sup>*, *zO<sup>W</sup>*) and (*xI W*, *yI <sup>W</sup>*, *zI <sup>W</sup>*) of these points and the direction vector (*uOI<sup>W</sup>*, *vOI<sup>W</sup>*, *wOI<sup>W</sup>*) can be expressed in the local system *OWXWYWZW* attached to each simulation area.

Taking into account the feed direction of the ball end mill along the linear motion between points *O* and *I*, feed values *fx*, *fy* and *fz* along axes *XW*, *YW* and *ZW* can be defined. In order to achieve this, a unit vector **r**ˆ = (*rx*, *ry*, *rz*) that considers the tool feed direction between points *O* and *I*, is defined as a function of their coordinates:

$$\hat{\mathbf{r}} = \frac{\mathbf{q}}{|\mathbf{q}|} \text{ where } \mathbf{q} = \begin{pmatrix} x\_I^W - x\_O^W \ \ y\_I^W - y\_O^W \ \ z\_I^W - z\_O^W \end{pmatrix} \tag{20}$$

The components *fx*, *fy* and *fz* of the tool feed can be expressed as:

$$f\_{\mathbf{x}} = f r\_{\mathbf{x}} \tag{21}$$

$$f\_y = f r\_y \tag{22}$$

$$f\_z = f r\_z \tag{23}$$

By means of feed values *fx*, *fy* 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*<sup>1</sup> whose coordinates are:

$$\mathbf{x}\_{O1}^{W} = \mathbf{x}\_{O}^{W} + f\_{\mathbf{x}} \frac{\mathbf{a}}{2\pi} \tag{24}$$

$$y\_{O1}^{W} = \left. y\_O^{W} + f\_{\text{y}} \frac{\alpha}{2\pi} \right. \tag{25}$$

$$z\_{O1}^{W} = \left. z\_{O}^{W} + f\_{z} \frac{a}{2\pi} \right. \tag{26}$$

where the tool rotation angle *α* goes from 0 to *αI-αO*, being *α<sup>I</sup>* and *αO*, the tool rotation angles when the tool tip point is located at points *I* and *O*, respectively.

**Figure 9.** 5-axis milling scheme with tool tilt angle *β* and lead angle *γ*.

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 *γ*.


These angles *β* and *γ* can be written as function of the tool axis direction vector (*uOI<sup>W</sup>*, *vOI<sup>W</sup>*, *wOI<sup>W</sup>*):

$$\beta = \arccos(w\_{OI}^W) \tag{27}$$

$$\gamma = a \tan(-\frac{v\_{OL}^W}{u\_{OL}^W}) \tag{28}$$

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 *O*1*X*1*Y*1*Z*1, *O*2*X*2*Y*2*Z*<sup>2</sup> and *O*3*X*3*Y*3*Z*3, shown in Figure 10, are defined as a function of:

• The current position of the tool tip point given by the coordinates of point *O*<sup>1</sup> (Figure 9). A translation of system *O*1*X*1*Y*1*Z*<sup>1</sup> with respect to system *OWXWYWZW* (Figure 10a) is considered. The system *O*1*X*1*Y*1*Z*<sup>1</sup> is shifted in *XW*, *YW* and *ZW* by distances *xO*<sup>1</sup> *<sup>W</sup>*, *yO*<sup>1</sup> *<sup>W</sup>* and *zO*<sup>1</sup> *<sup>W</sup>* respectively. The homogeneous transformation matrix **T***W*1(*fx*, *fy*, *fz*, *α*) of this translation in *XW*, *YW* and *ZW* is:

$$\mathbf{T}\_{W1}(f\_{x'}, f\_{y'}, f\_{z'}, \mathbf{a}) = \begin{bmatrix} 1 & 0 & 0 & \mathbf{x}\_{O1}^W \\ 0 & 1 & 0 & y\_{O1}^W \\ 0 & 0 & 1 & \mathbf{z}\_{O1}^W \\ 0 & 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & \mathbf{x}\_O^W + f\_x \mathbf{a} / (2\pi) \\ 0 & 1 & 0 & y\_O^W + f\_y \mathbf{a} / (2\pi) \\ 0 & 0 & 1 & \mathbf{z}\_O^W + f\_z \mathbf{a} / (2\pi) \\ 0 & 0 & 0 & 1 \end{bmatrix} \tag{29}$$

• The lead angle *γ* (Figure 10b). The system *O*2*X*2*Y*2*Z*<sup>2</sup> is rotated by an angle *γ* about axis *Z*<sup>1</sup> in clockwise direction. The homogeneous transformation matrix **T**12(*γ*) of this rotation about *Z*1-axis is:

$$\mathbf{T}\_{12}(\gamma) = \begin{bmatrix} \cos(\gamma) & \sin(\gamma) & 0 & 0 \\ -\sin(\gamma) & \cos(\gamma) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \tag{30}$$

• The tilt angle *β* (Figure 10c). The system *O*3*X*3*Y*3*Z*<sup>3</sup> is rotated by an angle *β* about axis *Y*<sup>2</sup> in a clockwise direction. The homogeneous transformation matrix **T**23(*β*) of this rotation about *Y*2-axis is:

$$\mathbf{T}\_{23}(\beta) = \begin{bmatrix} \cos(\beta) & 0 & \sin(\beta) & 0 \\ 0 & 1 & 0 & 0 \\ -\sin(\beta) & 0 & \cos(\beta) & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \tag{31}$$

• The rotation angle *α* (Figure 10d). The tool system *OTXTYTZT* is rotated by an angle *α* about axis *Z*<sup>3</sup> in clockwise direction. The homogeneous transformation matrix **T**3*T*(*α*) of this rotation about *Z*3-axis is:

$$\mathbf{T}\_{\text{3T}}(\boldsymbol{a}) = \begin{bmatrix} \cos(\boldsymbol{a} + \boldsymbol{a}\_{O}) & \sin(\boldsymbol{a} + \boldsymbol{a}\_{O}) & 0 & 0 \\ -\sin(\boldsymbol{a} + \boldsymbol{a}\_{O}) & \cos(\boldsymbol{a} + \boldsymbol{a}\_{O}) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \tag{32}$$

where *α<sup>O</sup>* 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 *zi* on the edge *k*, as shown in Figure 8, is expressed in the system *OWXWYWZW* of the gear tooth (Figure 9) as a function of the previous transformation matrices **T***W*1(*fx*, *fy*, *fz*, *α*), **T**12(*γ*), **T**23(*β*) and **T**3*T*(*α*) and the coordinates of the cutting edge point *P(i*, *k)* in the tool system *OTXTYTZT* (Equations (14)–(16) in Step 5):

$$
\begin{bmatrix} \mathbf{x}\_{P(i,k)}^W\\\mathbf{y}\_{P(i,k)}^W\\\mathbf{z}\_{P(i,k)}^W\\\mathbf{1} \end{bmatrix} = \mathbf{T}\_{W1} \begin{bmatrix} f\_{x'} \ f\_{y'} \ f\_{z'} \ \mathbf{a} \end{bmatrix} \cdot \mathbf{T}\_{12}(\gamma) \cdot \mathbf{T}\_{23}(\boldsymbol{\beta}) \cdot \mathbf{T}\_{37}(\mathbf{a}) \cdot \begin{bmatrix} \mathbf{x}\_{P(i,k)}^T\\\mathbf{y}\_{P(i,k)}^T\\\mathbf{z}\_{P(i,k)}^T\\\mathbf{1} \end{bmatrix} \tag{33}
$$

Once the cutting edge trajectories are obtained, surface topographies generated in each simulation area are obtained through the procedure described in Step 7.

**Figure 10.** Definition of auxiliary systems *O*1*X*1*Y*1*Z*<sup>1</sup> (**a**,**b**; *O*2*X*2*Y*2*Z*<sup>2</sup> (**c**) and *O*3*X*3*Y*3*Z*<sup>3</sup> (**d**).

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.

**Figure 11.** 3D simulated surface topography (**a**); roughness profiles (**b**,**c**) and surface roughness (**d**): ball end mill with 3 mm diameter and *Nt* = 3 cutting edges and feed value *f* = 0.18 mm/rev.

### **4. 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.

#### *4.1. 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.


**Table 4.** Roughness measured results for gear teeth after finishing strategies.


**Table 4.** *Cont.*

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.

#### *4.2. 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 *XW*. 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–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 (*Ra* and *Rz*) 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 (*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 12.** Predicted roughness profiles for different feed values and for the same tool.


**Table 5.** Roughness predicted results for gear teeth.

**Figure 13.** Predicted roughness profiles for tools with different edge numbers and working with different feed values.

#### *4.3. Gear Roughness Predictive Model Validation*

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.** Roughness comparison of predictive model vs. measured roughness.

#### **5. 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, for3+2 axis machining, for both zig and zig-zag strategies, the obtained *Ra* and *Rz* 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 *Ra* and *Rz* 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 the3+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.

#### **6. 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.

**Author Contributions:** Á.Á. and A.C. designed and performed the experiments. Additionally, M.A. developed roughness model. A.C. wrote the paper. H.G. analyzed roughness measurements. Finally, L.N.L.d.L. contributed to the resources (machine, tools, material, etc.) and supervised all of the work carried out in this research.

**Funding:** This research received no external funding.

**Acknowledgments:** Thank you to the Department of Education, and to the Universities and Research program of the Basque Government for their financial support, by means of the ZABALDUZ program. We also thank the UFI in Mechanical Engineering department of the UPV/EHU for its support of this project.

**Conflicts of Interest:** The authors declare no conflict of interest. The founding sponsors had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; and in the decision to publish the results.
