Abstract
In order to increase the machining accuracy of slow tool servo turning of complex optical surface, the optimal design for tool path was studied. A comprehensive tool path generation strategy was proposed to optimize the tool path for machining complex surfaces. A new algorithm was designed for tool nose radius compensation which had less calculation error. Hermite segment interpolation was analyzed based on integrated multi-axes controller, and a new interpolation method referred to as triangle rotary method was put forward and was compared with the area method and three-point method. The machining simulation indicated that the triangle rotary method was significant in error reduction. The interpolation error of toric surface was reduced to 0.0015 µm from 0.06 µm and sinusoidal array surface’s interpolation error decreases to 0.37 µm from 1.5 µm. Finally, a toric surface was machined using optimum tool path generation method to evaluate the proposed tool path generation method.
Keywords
Introduction
Complex optical surfaces can be used in optical systems to acquire high-quality image, improve the performances, decrease the expense and reduce the size of the system. Ultra-precision machining of the complex optical surfaces has become very important in recent years because of the increased use of complex optical surfaces in many fields such as optics, medicine, and fiber telecommunication and life science. 1
At present, the machining methods for complex surfaces have been developed greatly in industrial and academic fields such as micro-milling, fly-cutting, fast tool servo (FTS) and slow tool servo (STS). Among these technologies, STS is widely utilized for machining many different types of freeform surfaces due to its advantages of high surface accuracy and high machining efficiency. A lot of research was carried out such as the machining experiments of new or complex surface, new lath structure and new application areas. Besides, machining parameters, control system algorithm and tool–workpiece vibration have significant effects on the tool wear and machining accuracy, so relevant research for STS/FTS was also studied.2 –4
Tool path generation (TPG) method has a direct impact on the surface accuracy for STS/FTS, so relative researches were carried out in recent years. Neo et al. 5 proposed an attractive solution with an integration of Visual Basic for Application programming interface into SolidWorks to generate spiral tool trajectory for STS/FTS turning of freeform surfaces. According to the surface scallop height, Liu et al. 6 described a changing feed-rate tool path for FTS, which is a creative idea for TPG for STS/FTS. Zhang et al. 7 used coordinate transformation to produce the tool path of off-axis aspheric mirrors and reduced the ratio of sag height to diameter. Keong et al. 8 described a novel FTS diamond turning method with layered tool trajectories to extend the limited stroke length without modifying an existing FTS system. Although there are many different types of TPG methods, the main route of the TPG can be summarized as the following three steps: cutting contact points (CCPs) discretization, tool geometry compensation and the interpolation among discrete cutting location points (CLPs).
Reasonable CCP discretization method is the basis of TPG. For three-axes turning freeform surfaces, spiral tool path is the most typical method. 9 Both equal angle discretization method and equal arc length discretization method can be used to create discrete rotation points during TPG for STS turning.10 –13 But the papers did not systematically studied the weakness of the two discretization methods and proposed the solution method. For tool geometry compensation, Fang et al. 14 used the vector mathematics method to compensate tool geometry, including the tool radius compensation and rake angle compensation, but the compensation algorithm is relatively complex. Guan 1 provided the X-stable method to compensate tool radius; however, he did not do the experiment to prove it. According to the X-stable method, Wang 15 proposed an algorithm to compensate the tool nose radius. Because the spline interpolation is used, the algorithm has relatively large calculation error. Hu et al. 16 used non-uniform rational B-spline (NURBS) interpolation to improve the surface accuracy of the freeform surface, but did not dealt with the interpolation among discrete CLPs. Zhang et al. 17 evaluated B-spline interpolation method, and B-spline does not pass specified interpolation nodes on the cutting location trajectory, so that the B-spline interpolation leads to relatively larger interpolation error. Guan 1 and Wang et al. 18 proposed Hermite interpolation method, but it cannot ensure the interpolation path two-order continuous.
In this article, the TPG method for STS turning was systematically studied. This method comprises the determination of CCPs, compensation of the tool geometry, analysis of the entrance parameter algorithm of position–velocity–time (PVT) mode, machining simulation study and validation of the actual machine.
STS turning technology
The STS turning technology is a precision turning method with high accuracy and high efficiency. Figure 1(a) shows the schematic diagram of the mechanical system setup of STS turning used in this study, which has a linear X-axis, a linear Z-axis and a rotary C-axis. The complex surface can be machined by controlling the X-axis, the Z-axis and the C-axis simultaneously. The schematic diagram for control system setup of the STS turning is shown in Figure 1(b). Because the motion accuracy of the Z-axis has most important influence on the machining error, Z-axis has both position feedback and speed feedback to ensure its motion accuracy. The numerical control (NC) program includes the information of the CLPs. According to the NC program, the integrated multi-axes controller (IMAC) performs an interpolation computation between two neighboring points and controls the three axes of the setup to generate the complex surfaces.

Schematic diagram of STS turning for complex surfaces: (a) mechanical system and (b) control system.
TPG
The TPG for turning complex surfaces mainly consists of mathematical expression of the complex surfaces, CLPs optimization and turning trajectory interpolation. Figure 2 is the schematic diagram of the TPG for turning complex surfaces. First, the complex surfaces should be expressed by scalar equation or parameter vector equation in polar coordinates or Cartesian coordinates. The CLPs optimized planning includes two steps: first, calculating the CCPs on the complex surface and then calculating the CLPs using the tool geometry compensation principles. There are three methods to discrete CCPs and two methods for compensating the tool geometry error. The discretization methods include the equal angle discretization method, the equal arc length discretization method and the integrated discretization method. The tool geometry compensation method includes normal direction compensation and Z-direction compensation. The IMAC can provide SPLINE method and PVT method to interpolate trajectory. 19 The SPLINE interpolation only needs the coordinate value of each axis and time interval between two adjacent CLPs to calculate the coordinate value of interpolation points. The PVT method needs to be provided velocity value of each CLP in addition. In order to acquire accurate cutting trajectory, three entrance parameter algorithms of the PVT method are analyzed: area method, three-point method and triangle rotary method; the triangle rotary method was put forward by the authors, which can create more accurate trajectory than the other methods. The verified NC program was exported finally.

Schematic diagram for STS tool path generation.
CCP generation
The CCPs are the position point on the workpiece’s surface, which contacts the diamond tool. The tool contact path represents the tangential trajectory between the diamond tool and the machined surface. Nowadays, the cutting tool path planning methods mainly contains equal parametric line method, equal section method, equal spacing method and equal residual height method. 15 The C-axis is the rotating axis, so the equal spacing method is the better option. In this case, the CCPs trajectory is uniformly distributed, which involves less calculation and possesses high machining efficiency. The CCPs trajectory is described in Cartesian coordinates as follows
where af is the feed rate of X-axis, θw is the angle between X-axis and the line from the CCPs to the workpiece center and zw = f (xw, yw) is the mathematical description of complex surface.
IMAC NC system can only process the movement between designated points, so the CCPs trajectory must be described. The tool contact path can be discretized by different methods, such as equal angle discretization, equal arc length discretization and integrated discretization.
Equal angle discretization method
As it is shown in Figure 3(a), equal angle discretization method means that the angle Δθ between adjacent CCPs is equal. The CCPs trajectory after equal angle discretization is as follows
where (rw, θw, zw) is the three-dimensional (3D) contour coordinate value of complex surface in cylindrical coordinate system, Dw is the diameter of workpiece, zw = f(rw, θw) is the cylindrical coordinate function of complex surface, rw is the distance between CCP and center of workpiece, θw is the angle which start counting from the “cut in point,” and Δθ is the increase in angle between adjacent points.

Schematic diagram of different discretization method: (a) equal angle discretization method, (b) equal arc length discretization method and (c) integrated discretization method.
The advantages of the equal angle discretization are the simple calculation and easy to evaluate. But the trajectory points close to the central region are too dense, and the points of the outer trajectory are relatively sparse. So, when the size of workpiece is larger, the discrete angle must be very small in order to decrease the discrete error. However, if the discretization angle is very small, the NC program becomes very large, which increases IMAC’s computation work.
Equal arc length method
As it is shown in Figure 3(b), equal arc length discretization means that the arc length between adjacent points is equal. The CCPs trajectory after fixed arc length discretization is as follows
where θi can be calculated by the equal arc length Δl and adjacent θi−1 as follows 1
where θw is the angle which starts counting from the “cut in point.”
But the calculation of the equal arc length discretization is more complicated than the equal angle discretization method. In addition, in this method, the CCPs near the center of workpiece become very sparse and the machining trajectory’s curvature in the center of the workpiece becomes large, which causes increase in the discretization error.
Integrated discretization method
Integrated discretization is a synthesis method of the above two discretization methods. As it is shown in Figure 3(c), outer trajectory is discretized by equal arc length method, when the discrete angle of two adjacent points is larger than specified maximum discrete angle, the inner trajectory is changed into equal angle discretization method. Integrated discretization not only avoids the program becoming large but also ensures the discrete error in acceptable range.
According to the above analysis, if the discretization angle θd is fixed and supposing the radius of workpiece is Rw, the arc length Loutside between two adjacent CCPs of the most outside trajectory approximately equals to Rw·θd, namely, Loutside is proportional to the workpiece’s radius Rw. So, assuming the workpiece’s size is small, Loutside is small, and in this condition, the interpolation error can be ensured relatively small. If the workpiece’s size is small, equal angle discretization method is the better choice because of the simple calculation of the equal angle discretization method and easy evaluation. But if the size of workpiece is large, Loutside is correspondingly large, which increases the workpiece’s interpolation error. Equal arc length discretization method has the significant weakness that the CCP near the center of workpiece becomes very sparse, which can lead to the interpolation error relatively large in the inner circle of workpiece. If the size of workpiece is large, the integrated method is the better choice because the integrated discretization can avoid the large interpolation error in both inner and outer circles and get the minimum interpolation error.
Cutting tool geometry compensation
In STS turning process, the point on the tip of tool which contacts the machining surface is changing every time. The main objective of the machining process is to control the position of the tool relative to the workpiece. The NC program cannot control the movement of each axis with the tool contact point directly. It is necessary to compensate tool geometry on the basic of CCPs to generate CLPs. Assuming the tool rake angle is zero, tool geometry compensation means tool radius compensation. The schematic diagram of tool geometry is shown in Figure 4.

Model of tool radius compensation: (a) 3D model, (b) plane model 1 and (c) plane model 2.
Figure 4(a) shows the condition of tool cutting workpiece’s surface. Where P is the CCP and curve CC is the intersection line between the XZ-plane and the complex surface. The vector
Figure 4(b) shows the XY-plane projection of Figure 4(a). The coordinate system shown in upper left corner in Figure 4(b) also represents lathe coordinate system. Xw-axis and Yw-axis are the axes of workpiece coordinate. The mathematical expression of complex surfaces is based on this coordinate. Point O is the center point of workpiece and point P represents tool contact point. Line CC is same as in Figure 4(a), which is coincident with X-axis. C+ shows the direction of C-axis rotation and θ represents the angle between Xw-axis and line CC. The color shows the height of the surface.
Figure 4(c) shows the XZ-plane projection of Figure 4(a), and there are four different CLPs to explain the tool radius compensation. Rt is the radius of the tool. Curve CC is the trajectory connected by the CLPs on XZ-plane, and CL is the trajectory connected by the CLPs on XZ-plane. There are two methods to compensate the tool radius error, which are normal direction method and Z-direction method. The first step of the both methods is to get the equation of curve CC. Assume that the equation of the complex surface is z = f(x, y) and y = kx, where k = tanθ and θ is the angle between line CC and X-axis. So, equation z = f(x, y) can be transferred to z = φ(x, k). The equation of curve CC can be calculated as follows
where Rw represents the diameter of the workpiece. After getting the equation of curve CC, it is easy to calculate the unit tangent vector
The normal direction compensation includes Z-direction compensation and X-direction compensation, and the normal compensation length can be described as
where i is the number of X-axis feed ring, if X-axis feed velocity is af, n = Rw/af. The projected length of Δ
After getting a series of tool location points, the piecewise cubic spline interpolation can be used to get the equation of curve CL. And then, the points Li′ (i = 1, 2, …, n) which have the same z coordinates value can be obtained. And the points Li′ (i = 1, 2, …, n) are the compensation points for Z-direction compensation. Cubic spline interpolation was used in Z-direction, which will cause interpolation error.
The two tool radius compensation methods have advantages and disadvantages when used in different applications. The mass of X-axis sliding platform is relatively large, so the dynamic characteristics of X-axis are not very accurate. When the Z-direction compensation is used, the X-direction compensation is zero and the X-axis moves at a constant speed, which can decrease the dynamic following error of X-axis and increase the machining accuracy. Normal compensation can be divided into X-axis compensation and Z-axis compensation. X-axis compensation makes X-axis to move with a slight oscillation and inconsistent speed, which can increase the dynamic following error. Therefore, if the dynamic characteristics of X-axis are not very accurate, Z-direction compensation is the better choice. Moreover, normal compensation is the simple calculation with less calculation error, so the normal compensation is the most suitable for the lathe which have good dynamic characteristics. Besides, equal arc length discretization and integrated method have a large amount of calculations, so normal compensation is more suitable in these conditions, because of its simple design and less calculation error.
Interpolation for STS
The IMAC can interpolate the machining trajectory according to the tool location generated above. The interpolation method supported by IMAC includes LINEAR, CIRTLE, SPLINE and PVT. 19 According to the feature of STS, SPLINE and PVT can be used for the interpolation of the machining trajectory. SPLINE interpolation curve do not pass through the interpolation nodes, which will result in a large interpolation error, so PVT is chosen as the interpolation method.
The essence of PVT mode is segment cubic Hermite interpolation, which can provide a method to direct control over the trajectory profile. As it is clear in Figure 5, in PVT mode, for each piece of movement, users should specify the end position or distance P1, the end velocity V1 and piece time T. From the specified parameters for the move piece, and the beginning position P0 and velocity V0, the IMAC computes the beginning acceleration A0, end acceleration A1 and the only third-order position trajectory path to meet the constraints.

PVT interpolation diagram of servo axis segmentation.
In order to make servo axis pass exactly through the discrete CLPs with specified velocity and generate smooth trajectory, three entrance parameter algorithms of PVT were analyzed.
Area method
The scale coefficient c was introduced to represent velocity change rate in area method. The position increment could be expressed as 1
where
For a specified time interval hk, the endpoint velocity for each segment could be computed using equation (7). Different second-order velocity curves were combined to get an approximate velocity curve that can control the arbitrary contour path, which passes exactly through point Pk+1 with a continuous velocity.
Three-point method
According to the above method, that is, (Pk+1, tk+1), (Pk, tk) and (Pk−1, tk−1), the velocity at point k could be computed as 18
Triangle rotary method
The same disadvantages of above two interpolation methods are they can only ensure the velocity of each cutting tool location point is continuous, but cannot guarantee the acceleration of each interpolation node is continuous, which will increase the interpolation error. In order to overcome above disadvantage, a new method referred to as triangle rotary method was put forward. This method can ensure that the equation of all axes is second-order continuous, that is, acceleration continuous. This transforms the segment Hermite interpolation to segment spline interpolation. First, considering the equation of segment cubic Hermite interpolation, the cubic Hermite interpolation polynomial for segment [xi, xi+1] can be described as 20
where i is the number of interpolation nodes, the total number of interpolation nodes is n + 1. mi means the derivatives of xi and yi are the function value of xi, and Sx is the interpolation function value of x for the segment [xi, xi+1].
By calculating the two-order derivative of the above equation, the velocity of each segment could be expressed as
where hi = xi+1 − xi; for xi, the following formula can be obtained
Letting
After consolidated and simplified the formulas (11)–(13), this formula was transformed to
where
In total, there are m + 1 unknown numbers to solve, namely, mi (i = 0, 1, 2, …, n), but only m − 1 equations were obtained above. So, introducing natural boundary conditions
The above m − 1 equations are transformed into matrix form as follows
Equation (17) is a tri-diagonal matrix, and “chasing method” could be used to solve the m − 1 equations to get the entrance diameter of PVT method.
Machining simulation study
For STS turning, the C-axis rotates uniformly and the X-axis moves with a constant speed or only with slight oscillation. From this point of view, the overall TPG and its motion characteristics in Z-axis were simulated and analyzed during STS turning. The toric surface and sinusoidal surfaces are chosen as the simulation cases.
Toric surface
As it is shown in Figure 6, if the orthogonal arc (radius is R) rotates around the axis which is on the same plane with the orthogonal arc but do not through the circle center of the orthogonal arc (orthogonal arc radius R > the basic arc radius a), the complete toric surface can be achieved. Figure 6(a) represents the complete toric surface and Figure 6(b) represents toric surface spectacle lenses. The surface in Figure 6(b) corresponds to the surface in the red circle in Figure 6(a). Figure 7 shows a designed toric surface. Where XwYwZw represents the workpiece coordinate system axes, R is the radius of the orthogonal arc, a is the radius of basic arc, P is a point on the toric surface, r represents the distance between P and the origin of coordinates and θ represents the angle between the point P and positive direction of Xw-axis. The designed toric surface can be expressed as follows 16

Diagram of toric surface: (a) complete toric surface and (b) toric surface spectacle lenses.

Designed toric surface: (a) YwZw plane and (b) XwYw plane.
The related parameters are defined in Table 1.
Parameters of machining toric surface simulation study.
Figure 8 describes the designed toric surface and the tool path of toric surface discretized by integrated method. The Z-axis trajectory is demonstrated in Figure 9(a), which contains the CCPs’ trajectory and CLPs’ trajectory. As it is shown in Figure 9(b), discretization method was equal angle method, and the Z-axis and X-axis trajectories of outermost circle were different under different tool radius compensation. Figure 9(c) indicates that if the Z-direction compensation was chosen as the tool radius compensation method, the velocity of X-axis was constant when the equal angle method was used. And if the normal direction compensation was used, the X-axis moves with a slight oscillation, and the oscillation was not conducive to STS. Figure 10 shows the typical error variation rule for different discretization methods: the interpolation error was relatively large in outer circle of equal discretization and the interpolation error was relatively large in inner circle for equal arc length discretization. The integrated method can avoid the shortcomings of the above two kinds of discretization methods and get the minimum interpolation error.

Designed surface and tool path of toric surface.

(a) Z-axis trajectory, (b) Z-axis trajectory of outmost circle and (c) X-axis trajectory of outermost three circles.

The typical error variation rule for different discretization methods: (a) equal angle discretization method, (b)equal arc length discretization method and (c) integrated method.
The velocity curve of Z-axis was different when using different methods to interpolation, as it is shown in Figure 11. Besides the area method (c = 1/2), other velocity curves were all very similar and smooth. Figure 12 shows the interpolation error of different algorithm for PVT; 1000 points from the “cutting in point” are analyzed. The maximum errors were summarized as follows: area method (c = 1/2) of 0.15 µm, (c = 2/3) of 0.3 µm, three-point method of 0.06 µm and triangle rotary method of 0.0015 µm. The simulation results indicated that triangle rotary method was the best algorithm, and three-point method was better than area method.

Z-axis velocity of different methods.

The error of Z-axis for toric surface in different interpolation method: (a) area method, c = 1/2, (b) area method, c = 2/3, (c) three-point method and (d) triangle rotary method.
Sinusoidal array surface
The mathematical expression of sinusoidal array surface is given as follows 1
The related parameters are described in Table 2.
Parameters of machining sinusoidal array surface simulation study.
Figure 13 shows the designed surface and tool path of sinusoidal array surface discreted by equal angle method. Figure 14 shows the interpolation error of different algorithm for PVT; 1000 points from the “cutting in point” are analyzed. The maximum errors of these methods were area method (c = 1/2) of 1.5 µm, (c = 2/3) of 1.9 µm, three-point method of 1.8 µm and triangle rotary method of 0.37 µm. The simulation results indicated that triangle rotary method was the best algorithm, and three-point method was better than the area method.

Designed surface and tool path of sinusoidal array surface.

The error of Z-axis for sinusoidal array surface in different interpolation methods: (a) area method, c = 1/2, (b) area method, c = 2/3, (c) three-point method and (d) triangle rotary method.
Case study
According to the above analysis, the integrated method could be chosen as the discretization method when the workpiece’s size was large, and the equal angle method was a better discretization method for small workpieces. In order to ensure the velocity of the X-axis was constant and reduce following error, the Z-direction compensation was suitable for equal angle method discretization. For integrated method, the normal direction method was a better option, which was simple in calculation with less compensation error. The triangle rotary method was a better interpolation method than the area method and three-point method. So, the toric surface cases were machined by the two methods as given in Table 3.
Parameters of machining sinusoidal array surface simulation study.
PVT: position–velocity–time.
The NC program for slow servo turning automatic generation program was written by C# language using the above-mentioned algorithm. For cases A and B, the material was polymeric methyl methacrylate (PMMA), the workpiece’s diameter was 40 mm, feed speed was 0.05 mm/r and the interpolation method was PVT interpolation method. For case A, the discretization angle was 5°. For case B, the discretization arc length was 1 mm and the discretization angle was 5°.
Figure 15 shows the machined workpieces. In order to evaluate the form accuracy of the machined toric surface workpieces, the toric surface was measured by MQ686 coordinate measuring machine. The form error is shown in Figure 16; the PV form error was about 0.0022 mm for case A and 0.0018 mm for case B, and root mean square (RMS) was about 0.0038 mm for the case A and 0.0034 mm for the case B. The surface roughness value was measured by a JB-4C instrument after dividing the machined lens surface into 12 aspects by the constant angle. The average value was used as the final roughness value, as shown in Figure 17, and the surface roughness of case A and case B was about 0.096 µm. The case study indicated that both the two TPG methods could be used to fabricate the complex surfaces by STS turning (Figures 16 and 17).

Machined result of toric surface: (a) case A and (b) case B.

Plane form error of toric surface: (a) case A and (b) case B.

Surface roughness result of toric surface: (a) case A and (b) case B.
Conclusion
This article systematically studied the TPG for the STS turning of complex optical surfaces. Based on the result, the following conclusions can be drawn:
For large-size lenses, the integrated method could be chosen as the discretization method, and the equal angle method was a better discretization method for small workpieces. In order to ensure that the velocity of the X-axis was constant and reduce following error, the Z-direction compensation was suitable for equal angle discretization method. For equal arc length discretization method and integrated method, the normal direction method was a better option, which included simple calculation and zero interpolation error.
The PVT interpolation method can be used to machine optical complex surfaces; the core of the PVT interpolation was how to calculate the velocity (entrance parameters) of every contact tool point. A new interpolation method referred to as triangle rotary method was put forward and was compared with the area method and three-point method. The machining simulation of toric surface and sinusoidal array surface proved that the triangle rotary method can reduce the interpolation error obviously, which was the most feasible for the PVT interpolation.
For the large-sized workpieces, the recommended TPG methods were equal arc length cutting point discretization, normal tool radius compensation and triangle rotary method PVT interpolation. For small-sized workpiece, the recommended TPG methods were equal angle cutting point discretization, Z-direction tool radius compensation and triangle rotary method PVT interpolation. The experiment of the machining toric surfaces indicated that both the kinds of TPG methods could be used: the form error is about 0.002 mm and the surface roughness was about 0.096 µm in both methods.
Footnotes
Appendix 1
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.
Funding
The project was supported by Research and Innovation Project for College Graduates of Jiangsu Province (grant no. KYLX15_0565).
