1 Introduction

As an efficient and simple transmission indexing mechanism, globoidal cam has broad application prospects. The globoidal cam mechanism is not only of high precision, compact structure, light weight and high yield, but also of strong carrying capacity, good dynamic performance and high reliability. Consequently globoidal cam mechanism plays a pivotal role in mechanical transmission, and widely served in automobile manufacturing, textile, packaging service, aerospace, automatic machine tools and other fields [1].

Globoidal cam is a precision mechanical element, and cam production is a complicated task [2]. The NC machining methods of globoidal cam are generally divided into two categories, i.e., equal diameter machining and non-equal diameter machining [3]. Most recently, the machining methods of globoidal cam are divided into two categories: equal diameter machining and non-equal diameter machining [4]. The tool with the same geometrical parameters as the roller surface is regularly devoted in equal diameter machining process, and then the tool and the workpiece moved in a conjugate motion by the mechanism meshing transmission so as to machine globoidal cam. Although equal diameter machining is implemented easily, its accuracy is poor. The non-equal diameter machining is that globoidal cam is machined with the smaller tool radius than the roller, which is generally superior to equal diameter machining. Compared with equal diameter machining, the machining efficiency can be improved with concurrently low production cost by using non-equal diameter machining.

The machining error cannot be disregarded during the machining process of globoidal cam. The machining accuracy is typically affected by the principal factors such as machining error, programming error, installation error and tool wear error. The machining method of globoidal cam was analyzed based upon the theoretical error. The original theoretical errors exist in resembling freeform surface machining and tool compensation method. For several decades, the focus of research has been on the tool position optimization of globoidal cam in non-equal diameter flank milling. An improved optimal deviation method to study the more reasonable allocation of globoidal cam mechanism tolerance was proposed by Yang Shiping [5]. The measuring principle of equidistant model was analyzed preliminarily, and then cam profile error of the equidistant model was evaluated through measuring the feature line [6]. A novel method was devised by Bu Fanhua [7] to refine the profile error, and then the minimum distance from a point on the actual profile machined to the desired one was defined as the profile error; ultimately, the mathematical model of the caused profile error was established through the rotational deviation of the workpiece. As claimed by the minimum deviation between the trajectory surface of tool axis and the equidistant surface of globoidal cam, subsequently an optimization algorithm was presented for calculating the tool position data of the single-sided NC machining of globoidal cam [8]. In order to resolve the problems of the approximation error resulted from data point discretization and great fluctuation of the ruled surface of tool path, a tool path optimization algorithm of spatial cam flank milling was conducted by HU [9] based upon NURBS surface. The normal error calculation of tool position compensation was carried out by Ge Rongyu [10]; consequently, the tool position control was effectively optimized and the machining error was reduced simultaneously. The bow height error was calculated by Rong-Shean Lee through generating method and resembling freeform surface method [11], and subsequently a tool path generating method to curb bow height error was discovered; thus, its error was reduced to large extent. Nevertheless, this method is just suitable for equal-step process; accordingly, the application range is much limited. The bow and chord height error during the machining process was investigated by J N Lee [12], and then a scheme to reduce the error was propounded. The large amount research achievements in profile error analysis and measurement of globoidal cam have been made by Xiangtan University [13]. The special machine tool to machine globoidal cam was analyzed, and then its error was evaluated by Zhang [14]. The relationship between the helical angle of globoidal cam and the tool radius compensation was established by Chaiqing [15]; subsequently, the X-axis and Z-axis were compensated, respectively; eventually, theoretical error of globoidal cam was eliminated to large extent. Based on the equidistant surface theory, the cam globoidal profile equation was derived and concurrently the mathematical model of the machining error was conducted by Ji Shuting [16], and the influence of the center distance error on the transmission accuracy and the meshing performance of cam was manipulated obviously. In the aforementioned literature, the real-time local errors during the machining process of globoidal cam was just considered, whereas the generation rules of the whole tool path were not investigated deeply in NC machining. In order to establish the equidistant surface of the cam profile, the theoretical tool path surface needs to be discretized primarily and then reconstructed. However, the initial samples data required are large, and the acquisition process is awkward and inefficiency. With the advancement of manufacturing technology and diversification of market demands, the machining methods of globoidal cam are increasingly multipliable. Complicated and rawness as the theory of non-equal diameter machining is, non-equal diameter machining is still of great significance to globoidal cam and other complex surfaces. Therefore, a novel tool position control technique based upon the adaptive method with the tool radius smaller than the roller was devised in order to effectively control the machining error of cam profile.

2 The mathematical model of globoidal cam

The simplified model of the globoidal cam mechanism is shown in Fig. 1, where \(o - xyz\) stands for a fixed coordinate system, \(z\) denotes the axis direction of the driven turntable, and \(x\)-axis direction is from the driven turntable center to the cam center. \(o_{1} - x_{1} y_{1} z_{1}\) denotes a dynamic coordinate system, which is connected to the driven turntable and rotates with it. \(x_{1}\) axis is coincided with the roller axis and turns around the point \(o\) with the roller, and \(\alpha_{1}\) means the angular displacement of the driven turntable. \(o_{2} - x_{2} y_{2} z_{2}\) denotes the dynamic coordinate system fixed with the cam and rotates around \(y_{2}\) axis with the cam. The \(\alpha_{2}\) means the angle between \(x_{2}\) and \(x\) axis, \(c\) denotes the center distance from the driven turntable to cam center, \(\beta\) is the contact angle of the roller and cam at the contact point \(D\), and the \(n_{1}\) represents the unit vector of the common normal at the point \(D\) between the roller and cam.

Fig. 1
figure 1

The simplified model of globoidal cam mechanism

The position vector of the contact point \(D\) on the roller in \(o_{1} - x_{1} y_{1} z_{1}\) can be expressed as follows:

$$\varvec{R}_{1} = (l_{0} + l,Rcos\beta ,Rsin\beta )^{\rm T}$$
(1)

where \(l_{0}\) denotes the distance from the driven turntable center to the roller inner end, and the \(l\) is the meshing depth, i.e., the distance from the roller inner end to the contact point \(D\).

In light of Ref. [17] and the meshing principle of conjugate surface, the relative velocity direction between the two surfaces is orthogonal to each other at the common normal. Then the unit normal vector of the contact point \(D\) on the roller of \(o_{1} - x_{1} y_{1} z_{1}\) is:

$$\varvec{n}_{1} = \frac{{\frac{{\partial R_{1} }}{\partial l} \times \frac{{\partial R_{1} }}{\partial \beta }}}{{\left| {\frac{{\partial R_{1} }}{\partial l} \times \frac{{\partial R_{1} }}{\partial \beta }} \right|}} = \left( {\begin{array}{*{20}c} 0 \\ {\cos \beta } \\ {\sin \beta } \\ \end{array} } \right) = \left( {0,\cos \beta ,\sin \beta } \right)^{\rm T}$$
(2)

Suppose \(F_{1}\) and \(F_{2}\) are, respectively, the angular velocity vectors of the roller and cam of the fixed coordinate system \(o - xyz\). Thus, the relative velocity at the contact point \(D\) of the meshing surface is drawn:

$$\varvec{v} = \varvec{F}_{1} \times \varvec{R}_{1} - \varvec{F}_{2} \times (\varvec{R}_{1} - \varvec{c})$$
(3)

where \(\varvec{c} = (c,0,0)^{\rm T}\).

The meshing equation of the conjugate surface between the roller work surface and the globoidal cam profile is as follows:

$$\tan \beta = \pm \frac{{(l + l_{0} )}}{{[c - (l + l_{0} )cos\alpha_{1} ]}}\left( {\frac{{\omega_{1} }}{{\omega_{2} }}} \right)$$
(4)

In Eq. (4), the “+” means a left-handed cam, “−” a right-handed one, \(\omega_{1}\) denotes the driven turntable angular velocity, and \(\omega_{2}\) represents globoidal cam angular velocity.

3 Tool position determination of the non-equal machining of globoidal cam

3.1 Machinability analysis of contact line

The globoidal cam profile at scale division is a non-developable space surface. When the tool error occurs, the theoretical meshing line of tool and cam and the actual meshing line of the roller and cam are non-coincident. The contact line between cam and roller is a curve along the roller surface rather than a straight line; subsequently, the curve of the cam cannot be machined with the desired one no matter how tool radius is compensated; eventually, the globoidal cam profile error will exist. Therefore, globoidal cam groove cannot be machined by the same tool compensation mode as planar cam. If the tool radius is smaller than the roller radius during the machining process, there still is programming error itself no matter how to control the tool position. Fortunately, the machining error can be refined though an appropriate control method of tool position. The error size of globoidal cam profile is determined by the position relationship between the theoretical contact line and the actual one. The two contact lines distance will closer and its coincidence degree is better concurrently through the proper tool position control technique; ultimately, the machining accuracy of the cam profile is more perfect.

The machining error is a significant index reflecting generally the machining accuracy of globoidal cam, and composed by tool error, programming error, theoretical error, actual error, etc. The machining error was also the other comprehensive result of all kinds of errors. Tool error was one of machining errors caused by tool position compensation, and the more difference between the tool and roller radius existed, the larger the machining error caused tool position compensation. Tool error was also the main influence factors of globoidal cam researched in this paper, and it consisted of under-cut and over-cut states, as shown in Fig. 2. An arbitrary contact line MN on the roller was taken and analyzed subsequently. When the generating surface of globoidal cam was non-developable, MN was a spatial curve on the roller surface. While a smaller cutter was adopted to machine cams, a certain offset compensation \(\Delta_{r} = R - r\) was implemented; subsequently, the cutter and roller were tangent to the generatrix L. The generatrix L and MN intersected at point B, which denoted that the tool can reach B point on the theoretical contact line at most. Therefore, all points except point B on MN were in over-cut or under-state, which resulted in tool position compensation error.

Fig. 2
figure 2

The tool compensation error status

The tool compensation method is carried out by tool position offset through the generating machining of cam profile so as to minimize the machining error [18]. The machining principle of the tool position compensation method is illustrated in Fig. 3 where \(R\) denotes the roller radius, \(r\) is the tool radius, \(A\) and \(D\), respectively, stand for the contact points of the tool and roller, the curve \(MN\) (i.e., the actual contact line) refers to the contact line of the roller and cam, \(PQ\) (i.e., the theoretical contact line) means the contact line between the tool and cam profile, \(B\) is the intersection point of the theoretical contact line and the actual one. When the tool radius is smaller than the roller, suppose it is offset by the compensation amount \(\Delta_{r} = R - r\), then the roller and tool are tangent at L. Besides, when the actual contact line during the machining process is only \(PQ\), the tool can reach to point \(B\)(i.e., zero machining error of tool radius compensation), while other points on the \(MN\) are in under-cut state, then under-cut error exists subsequently [19]. In this way, although the theoretical contact line and the actual one are on different cylinders, the two contact lines are intersected at a point \(B\) at half the length of the roller contact line; subsequently, the normal error of the profile of globoidal cam is 0; ultimately, the minimum error of the two contact line is realized.

Fig. 3
figure 3

The tool compensation diagram

3.2 The determination of tool position offset

In order to polish the adverse effects like tool wear, complicated cam groove widths, and the machining allowance, etc., consequently the non-equal diameter machining was adopted. Suppose the tool center is at a meshing angle \(\beta_{ 2}\) of half the width of roller, and its distance from the center of the roller is \(\Delta_{r}\). As shown in Fig. 4, \(\beta_{1}\) denotes the meshing angle at half of the tool axis between the tool and cam (also called the contact angle of equal diameter machining), where \(\beta_{2}\) refers to contact angle of the non-equal diameter machining, \(K\) represents the contact point between roller and the cam; \(H\) stands for the contact point between the non-equal diameter machining tool and the actual machining profile \(\varSigma_{1}\), \(G\) means the contact point between non-equal diameter machining tool and the theoretical machining profile \(\varSigma_{2}\), \(n_{2}\) is the normal at the contact point \(K\), \(n_{\text{f}}\) is the normal of the contact point of the actual work profile; \(n_{d}\) is the normal of the contact point of the theoretical work profile, \(\Delta_{r} sin\beta_{1}\) denotes the offset amount of the tool in the \(y\)-axis direction in the dynamic coordinate \(o_{1} - x_{1} y_{1} z_{1}\), \(\Delta_{r} cos\beta_{1}\) is the offset amount of the tool in the \(z\)-axis direction.

Fig. 4
figure 4

The tool center position of the non-equal diameter machining

In the coordinate system \(o_{1} - x_{1} y_{1} z_{1}\), the \(D\) vector coordinates at the meshing points of tool and cam in any cross-section \((l + l_{0} )\) can be derived:

$$(\varvec{R}_{H} )_{1} = \left[ {\begin{array}{*{20}c} { - (l + l_{0} )} \\ {\Delta _{r} \cos \beta_{1} + R\cos \beta_{2} } \\ {\Delta _{r} \sin \beta_{1} + R\sin \beta_{2} } \\ \end{array} } \right]$$
(5)

The coordinate transformation matrix of the meshing point \(D\) from the dynamic coordinate system \(o_{1} - x_{1} y_{1} z_{1}\) into the fixed coordinate system \(o - xyz\) is:

$$\varvec{M}_{10} = \left[ {\begin{array}{*{20}c} {\cos \alpha_{1} } & { - \sin \alpha_{1} } & 0 \\ 0 & 0 & 1 \\ {\sin \alpha_{1} } & {\cos \alpha_{1} } & 0 \\ \end{array} } \right]$$
(6)

In the dynamic coordinate system o1-x1y1z1, the unit normal vector over the meshing point \(D\) is:

$$\varvec{n}_{H1} = \left| {\begin{array}{*{20}c} i & j & k \\ {{{\partial a} \mathord{\left/ {\vphantom {{\partial a} {\partial l}}} \right. \kern-0pt} {\partial l}}} & {{{\partial b} \mathord{\left/ {\vphantom {{\partial b} {\partial l}}} \right. \kern-0pt} {\partial l}}} & {{{\partial c} \mathord{\left/ {\vphantom {{\partial c} {\partial l}}} \right. \kern-0pt} {\partial l}}} \\ {{{\partial a} \mathord{\left/ {\vphantom {{\partial a} {\partial \beta_{2} }}} \right. \kern-0pt} {\partial \beta_{2} }}} & {{{\partial b} \mathord{\left/ {\vphantom {{\partial b} {\partial \beta_{2} }}} \right. \kern-0pt} {\partial \beta_{2} }}} & {{{\partial c} \mathord{\left/ {\vphantom {{\partial c} {\partial \beta_{2} }}} \right. \kern-0pt} {\partial \beta_{2} }}} \\ \end{array} } \right| = \cos \beta_{1} \varvec{j} + sin\beta_{1} \varvec{k}$$
(7)

where \(a = - \left( {l + l_{0} } \right),b = \Delta_{r} cos\beta_{1} + Rcos\beta ,c = \Delta_{r} sin\beta_{1} + Rsin\beta_{2} .\) Then the actual machining working profile equation of the non-equal diameter machining of globoidal cam was drawn.

$$\left( {\begin{array}{*{20}c} {x_{1} } \\ {y_{1} } \\ {z_{1} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}l} {[c - \cos \alpha _{1} (l + l_{0} ) - (Rcos\beta _{0} + {\Delta }_{r} cos\beta _{1} )} \hfill \\ {sin\alpha _{1} ]\cos \alpha _{2} - (Rsin\beta _{0} + {\Delta }_{r} sin\beta _{1} )sin\alpha _{2} } \hfill \\ {[c - \cos \alpha _{1} (l + l_{0} ) - (Rcos\beta _{0} + {\Delta }_{r} cos\beta _{1} )} \hfill \\ {sin\alpha _{1} ]{\text{ + }}(Rsin\beta _{0} + {\Delta }_{r} sin\beta _{1} )sin\alpha _{2} } \hfill \\ { - \sin \alpha _{1} (l + l_{0} ){\text{ + }}(Rcos\beta _{0} + {\Delta }_{r} \cos \beta _{1} )sin\alpha _{2} } \hfill \\ \end{array} } \right)$$
(8)

Consequently, the meshing equation of the non-equal diameter machining of globoidal cam was derived.

$$\beta_{0} = \text{arctg} \frac{{\frac{{d\alpha_{1} }}{{d\alpha_{2} }}(l + l_{0} ) -\Delta _{r} \sin \alpha_{1} \sin \beta_{1} }}{{c - \cos \alpha_{1} (l + l_{0} )\Delta _{r} \cos \beta_{1} \sin \alpha_{2} }}$$
(9)

where \(\beta_{0}\) and \(\pi + \beta_{0}\) correspond to the upper and lower profile of globoidal cam, respectively.

3.3 The normal error calculation of cam profile

As illuminated in Fig. 4, the theoretical machining profile \(\varSigma_{2}\) and the actual machining profile \(\varSigma_{1}\) both were equidistant curved surfaces. It is drawn that the normal \(n_{f}\) at the contact point of the actual machining profile is approximately parallel to the normal \(n_{d}\) at the contact point of theoretical one. Suppose the normal over any point \(P\) on the actual machining profile \(\varSigma_{1}\) intersects with the theoretical one \(\varSigma_{2}\) at point \(Q\), and thus \(\left| {PQ} \right|\) is the normal error of globoidal cam at point \(P\). Consequently, the normal equation of the \(P\) was derived.

$$\frac{{x - x_{P} }}{{p_{x} }} = \frac{{y - y_{P} }}{{p_{y} }} = \frac{{z - z_{P} }}{{p_{z} }}$$
(10)
$$\left( {\begin{array}{*{20}c} {p_{x} } \\ {p_{y} } \\ {p_{z} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} { - \sin \alpha_{1} \cos \alpha_{2} \cos \beta - \sin \alpha_{2} \sin \beta } \\ {\sin \alpha_{1} \sin \alpha_{2} \cos \beta - \cos \alpha_{2} \sin \beta } \\ {\cos \alpha_{1} \cos \beta } \\ \end{array} } \right)$$
(11)

According to the meshing principle of the roller and cam profile, when the machining error exists, the point \(H\) on the actual profile surface is in meshing state, whereas the point \(G\) on the theoretical profile may not in meshing state or has already been entered meshing state. Therefore, Eq. (10) can be transformed to:

$$\left\{ {\begin{array}{*{20}c} {x = x_{P} + \frac{{p_{x} }}{{p_{y} }}(y - y_{P} )} \\ {z = z_{P} + \frac{{p_{z} }}{{p_{z} }}(y - y_{P} )} \\ \end{array} } \right.$$
(12)

Equation (12) was a set of binary nonlinear equations with respect to \(\alpha (k)\) , \(l(k)\), it can be solved by the Newton iteration method, and the point \(P\) was the initial point of the iteration.

$$\left\{ {\begin{array}{*{20}c} {f_{1} = x - x_{P} - \frac{{p_{x} }}{{p_{y} }}(y - y_{P} )} \\ {f_{2} = z - z_{P} - \frac{{p_{x} }}{{p_{y} }}(y - y_{P} )} \\ \end{array} } \right.$$
(13)

Equation (14) was derived through expanded Eq. (13) by using upon Newton’s iteration method.

$$\left\{ {\begin{array}{*{20}c} {\frac{{\partial f_{1} }}{{\partial \alpha_{2} }}(\alpha_{20} ,l_{0} )\Delta \alpha_{2} + \frac{{\partial f_{1} }}{\partial l}(\alpha_{20} ,l_{0} )\Delta l = - f_{1} (\alpha_{20} ,l_{0} )} \\ {\frac{{\partial f_{2} }}{{\partial \alpha_{2} }}(\alpha_{20} ,l_{0} )\Delta \alpha_{2} + \frac{{\partial f_{2} }}{\partial l}(\alpha_{20} ,l_{0} )\Delta l = - f_{2} (\alpha_{20} ,l_{0} )} \\ \end{array} } \right.$$
(14)

where

$$\Delta = \left| {\begin{array}{*{20}c} {\frac{{\partial f_{1} }}{{\partial \alpha_{2} }}} & {\frac{{\partial f_{1} }}{\partial l}} \\ {\frac{{\partial f_{2} }}{{\partial \alpha_{2} }}} & {\frac{{\partial f_{2} }}{\partial l}} \\ \end{array} } \right|,\quad \xi = \left| {\begin{array}{*{20}c} { - f_{1} } & {\frac{{\partial f_{1} }}{\partial l}} \\ { - f_{2} } & {\frac{{\partial f_{2} }}{\partial l}} \\ \end{array} } \right|,\quad \psi = \left| {\begin{array}{*{20}c} {\frac{{\partial f_{1} }}{{\partial \alpha_{2} }}} & { - f_{1} } \\ {\frac{{\partial f_{2} }}{{\partial \alpha_{2} }}} & { - f_{2} } \\ \end{array} } \right|,\quad \left\{ {\begin{array}{*{20}c} {\Delta \alpha_{2} = \frac{\zeta }{\Delta }} \\ {\Delta l = \frac{\psi }{\Delta }} \\ \end{array} } \right..$$

where \(\alpha_{20}\), \(l_{0}\) mean the initial value of iteration, i.e., the parameters of the actual working profile of globoidal cam corresponding to point \(P\). In the actual machining process, the machining error was generally small, which ensures the convergence of the nonlinear equations. When \(\left| {\alpha_{i + 1} - \alpha_{i} } \right| \le 10^{ - 6}\) and \(\left| {l_{i + 1} - l_{i} } \right| \le 10^{ - 6}\), the iteration was completed, and the parameters \(\alpha_{2n}\) and \(l_{2n}\) with regard to intersection point \(G\) of the theoretical profile \(\varSigma_{2}\) can be obtained. Consequently, \(\alpha_{2n} = \alpha_{i + 1}\),\(l_{2n} = l_{i + 1}\), and the normal error of cam profile was calculated:

$$\Delta n = \left| {PQ} \right| = \sqrt {(x_{p} - x_{Q} )^{2} + (y_{P} - y_{Q} )^{2} {\text{ + (z}}_{P} - {\text{z}}_{Q} )^{2} }$$
(15)

4 The optimization algorithm of adaptive compensation of tool position

An instantaneous \(\alpha_{2}\) of the cam was given, and thus the profile equation was expressed as a spatial curve \(MN\) (in Fig. 2) along the roller axis through tool position compensation. Suppose that the tool position compensation was performed along the normal direction at point \(B\) on the theoretical contact line, besides the direction was \(O_{1} B\), and the contact angle in this direction was \(\beta (l,\alpha )\); consequently, \(O_{1} O_{2}\) was the compensation amount. The compensation amount was set to \(\Delta_{r}\) uniformly in order to establish the tool position optimization model. Eventually, the actual contact line \(PQ\) was drawn after tool position compensation. As for the determination of compensated tool center position, the tool center coordinates in cam coordinate system were obtained through coordinate transformation based upon the rotation transformation tensor method and the differential geometry principle. As shown in Fig. 5, \(o_{1} - x_{1} y_{1} z_{1}\) denotes a dynamic coordinate system fixed to the driven turntable and rotates with it. The \(x_{1}\) coincides with the roller axis and rotates around \(O\) point with the roller, and the \(\alpha_{1}\) means the angular displacement of the driven turntable. \(o_{2} - x_{2} y_{2} z_{2}\) represents a dynamic coordinate system fixed to the cam and rotates around the \(y_{2}\)-axis with the cam, where \(\alpha_{2}\) stands for the angle between \(x_{2}\)and \(x\). \(W'\) means a point on the roller axis, also known as the tool center position before compensation, while the point \(W\) refers to the tool center position after compensation. The vertical distance from the tool center cross-section to the \(O_{1}\) of the \(o_{1} - x_{1} y_{1} z_{1}\)coordinate system was set \(l\), and the tool feed rate in each step was set to a fixed value \(l'\).

Fig. 5
figure 5

The tool center coordinates in compensation process

In roller coordinate system, the vector of tool center position \(W'\) before compensation was \(t_{1}\), and it was also a function with regard to the feed rate parameter \(l'\) in each machining step. Eventually, the tool center vector \(W\) after tool position compensation was derived.

$$\left. {t_{1}^{'} (\alpha_{2} )} \right|_{{l^{'} }} = t_{1} (l^{'} ) + \Delta_{r} \cdot n(l,\alpha_{2} )$$
(16)

where \(n(l,\alpha_{2} )\) denotes the compensation direction, \(\Delta_{r}\) represents the tool radius compensation amount. During the error control process, the compensation direction of tool position was generally the normal vector direction at any point on the theoretical contact line, and thus \(n(l,\alpha_{2} )\) was a binary function with regard to the parameter \(l\) along tool axis and the cam angle \(\alpha_{2}\). In light of transformation matrix \(\varvec{M}_{10}\) from the dynamic coordinate system \(o_{1} - x_{1} y_{1} z_{1}\) to the fixed coordinate system \(o - xyz\), consequently the tool center position in the cam machining process was derived.

$$\left. {t_{2} (\alpha_{2} )} \right|_{{l^{'} }} = M_{10} \cdot \left. {t_{1} (l^{'} )} \right|_{{l^{'} }}$$
(17)

The selection of tool position compensation direction and amount plays a pivotal role in non-equal diameter machining of globoidal cam. In the machining process, if the compensation amount Δr and compensation direction \(n(l,\alpha_{2} )\) were optimized and compensated reasonably, the normal error \(\Delta n\) was a binary function with regard to the compensation amount and direction. Then the minimum value of the normal error was taken as the objective function; eventually, the optimized value can be obtained through the adaptive compensation optimization of tool position. The tool position selection and compensation of a certain point on the contact line were optimized properly based upon the adaptive method optimization. In order to effectively shorten the optimization compensation time, a small section of the middle position of the radial effective length of the roller was regarded as the domain of the compensation parameter \(l \in (D/2,\sigma )\) during the selection process of compensation direction. As for compensation amount, a small section of radius difference \(\Delta_{r}\) between the tool and roller was served as a domain, i.e., \(\Delta \in C(\Delta_{r} ,\sigma )\). Subsequently, the optimization algorithm of the tool position compensation was transformed into the optimization problem of two-dimension nonlinear constraint interval. Ultimately, the optimal solution can be solved by using the fmicon function in the optimization toolbox of MATLAB, i.e., the optimal tool compensation amount and direction were obtained.

5 The comparison between theoretical error and simulation of globoidal cam

In order to effectively verify the validity of adaptive tool position control method proposed for compensating cam profile machining error, the simulation experiment was performed subsequently. In view of the tool path surface of globoidal cam working profile, the different tool radius compensation was served to machine the cam profile. The accurate errors value in Table 1 were acquired by the coordinate measuring machine (CMM), while the approximate errors were obtained through the adaptive method programming by MATLAB. The normal errors in Figs. 7 and 8 were calculated by Eq. 15 in Chapter 3. Eventually, the normal error of cam profile was analyzed and compared concomitantly through the error distribution drawings of the reconstruction method and adaptive method, respectively.

Table 1 The optimization results of the adaptive cutter compensation

The error calculation of a cam profile was analyzed through a specific globoidal cam mechanism. The parameters are as follows: center distance c = 180 mm, 77 mm ≤ l0 ≤ 97 mm, roller radius R = 20 mm, roller width 20 mm, cam rest angle 240°, and the number of driven turntable roller 8, and the modified sine acceleration was considered as the periodic rule of turntable indexing. For different tool radius compensation amounts of \(\Delta_{r}\), the precision value of the normal error of cam profile caused by the tool wear error and the approximate value of the simulation experiment are, respectively, shown in Table 1. The rule can be drawn easily from Table 2 is that the profile error is apparently proportional to \(\Delta_{r}\).

Table 2 The error types of globoidal cam

According to the results in Table 2 and the tool position determination through the adaptive optimization method, consequently the difference between the maximum normal error and the approximate value is very small, which is 10−5 mm order of magnitude; besides, the optimal compensation is gained when \(\Delta_{r}\) = 3 mm. The relationship between the optimal compensation position through the adaptive optimization method and the cam angle is illustrated in Fig. 6.

Fig. 6
figure 6

The relationship between optimal compensation position and cam angle

As shown in Table 2, the profile error escalates gradually with the increase in tool radius compensation, and the maximum error is distributed linearly. So as to effectively reduce the normal error of the cam profile caused by the tool and maintain its accuracy, the tool radius compensation \(\Delta_{r}\) = 3 mm was selected. The distribution of normal error along the roller axis cross-section is shown in Fig. 6.

In Fig. 7, when the tool radius compensation is different, the profile normal error curve is parabolic with the elevation of the roller cross-section position, and the intermediate error is nearly 0. The trajectory surface of the roller axis is concave, and thus the modified drum roller can be served to carry out the meshing transmission. It can be drawn a striking conclusion from Fig. 7 that when the tool radius compensation is \(\Delta_{r}\) = 3 mm, the normal error of the globoidal cam is significantly lower than when the tool radius compensation is \(\Delta_{r}\) = 4 mm and 5 mm. In addition, when tool radius compensation is \(\Delta_{r}\) = 3 mm and concomitantly the cam angle is 80°, the minimum of the normal error almost approaches 0. The maximum normal error \(\Delta n\) = 0.015154 mm of the cam is also calculated by the adaptive compensation method, and only occurs once.

Fig. 7
figure 7

The normal error distribution of the roller axis section

In addition, in order to clearly verify the superiority of the adaptive compensation method, then globoidal cam is machined by the average contact angle compensation method, the roller midpoint compensation method and the adaptive compensation method, respectively; eventually, the maximum normal error is worked out. The variation of the maximum normal error with respect to cam angle of the three compensation methods is described in Fig. 8. It is clearly observed that the adaptive compensation method is apparently superior to the roller midpoint compensation method and the average contact angle compensation method. The machining error of the average contact angle compensation method is 12.8% less than the roller midpoint compensation method, while the machining error of the adaptive compensation method is 9.73% less than the average contact angle compensation method. Consequently, the profile error of globoidal cam is significantly reduced by using adaptive tool position compensation method.

Fig. 8
figure 8

\(\Delta_{r}\) = 3 mm, the comparison of normal errors

So as to further verify the validity of the adaptive method proposed and simulation results in this paper, the 3D model of globoidal cam mechanism was obtained by importing the model parameters and related data into UG8.5 parametric design module. Let the radius of driven turntable be 20 mm and the length be 180 mm, the movement cycle of the turntable be a curve of sines, and the indexing cycle of the globoidal cam be 120°, and thus a 3D model of globoidal cam mechanism was exported as shown in Fig. 8. Suppose the tool radius is 6 mm, then the data points of the profile were collected by discrete method, and thus the theoretical machining profile was obtained by surface reconstruction. The critical condition of machining error is set to 0.01 mm in light of the requirement of machining accuracy (Fig. 9). The reconstructed profile error distribution map is shown in Fig. 10, while the profile error distribution map compensated by the adaptive compensation method is shown in Fig. 11. The dim part denotes that the fitting error is inferior to the critical value, while the yellow part is superior to the critical value. The revised tool path drawing is obtained through the machining data compensated imported into the machining module based on the adaptive method, such as illustrated in Fig. 11. Comparing Fig. 10 with Fig. 11, the remarkable conclusion is drawn that the machining error can be effectively controlled through the tool path compensated by the adaptive method (Fig. 12).

Fig. 9
figure 9

The 3D model of globiodal indexing cam mechanism

Fig. 10
figure 10

The profile error distribution after reconstruction

Fig. 11
figure 11

The profile error distribution after compensation with the adaptive method

Fig. 12
figure 12

The adaptive optimization tool path

6 Conclusion

  1. (1)

    The novel tool position control method is subtly adopted so as to perfectly machine globoidal cam, and then the machining error of cam profile caused by tool position compensation is reduced greatly; ultimately, the machining accuracy of cam profile is further elevated simultaneously.

  2. (2)

    The machined profile error of the globoidal cam can be analyzed and controlled concurrently within the allowable tolerance range more effectively in real time according to derived calculation of the normal error of globoidal cam.

  3. (3)

    The applicable range and service life are enlarged, respectively, by presented method; besides, the tool cost is saved to large extent concomitantly.