1. Introduction
With the rapid development of astronomy, space exploration, and advanced optical instruments, optical elements are being increasingly widely used. The application demands for high-quality and high-efficiency elements present distinct higher requirements for the process technology used in such elements [
1]. Computer-controlled optical surfacing (CCOS) has been successfully applied in industrial production, as it can precisely correct the surface error by converting the dwell time of the polishing tool into the feed-rate along the polishing trajectory. Therefore, a trajectory planning method is the key factor affecting high-quality, high-efficiency polishing.
Despite the extent of research on path planning in some fields [
2,
3,
4], investigation of optical polishing has been rather limited. Although the problem of discontinuous surfaces between the adjacent mm-sized short line segments has attracted wide concern when using parametric curve theory [
5,
6,
7], frequent acceleration and deceleration result in poor realisation precision of dwell time, i.e., the runtime of trajectory (hereafter referred to as runtime), which further influences the polishing quality of elements and the convergence rate of surfaces [
8]. The main focus of this paper is to investigate an interpolation scheme to overcome the above problem, which has two main progressive aspects: fitting and interpolation of parametric curves.
The fitting of parametric curves is a process of converting discrete short line segments into parametric curves. At present, many scholars have carried out research based on the dominant points using a non-uniform rational B-spline (NURBS). Park [
9,
10] proposed a method for determining the dominant points according to the discrete curvature. Zhou [
11] and Xu [
12] improved this method by taking concave-convex turning points and extreme points on the curvature curve as dominant points. To improve the fitting precision, Zhao [
13] proposed curve fitting taking squared distance minimisation (SDM) as the evaluation index. Although the dominant points based method is easy with regard to calculation and interpolation, it may result in the loss of runtime at non-dominant points. Thus, only the global fitting method is suitable to the optical polishing. To do so, Yang [
14] proposed an optimisation algorithm by establishing the evaluation function for deviation of the fitted distance. Li [
15] and Lin [
16] classified the trajectory into the different forms of NURBS and then employed a piecewise fitting method for real-time implementation. Based on Gaussian elimination and the continuous short block (CSB) look-ahead algorithm, Tsai [
17] and Wang [
18] realised the on-line transformation from short line segments to NURBS: however, for the global fitting method, the simplified strategy that setting all the weight factors as 1 eliminates the regulating effect on the fairness of curves and easily causes curvature saltation on the trajectory. Therefore, generating a fair trajectory based on NURBS is the first problem facing the polishing trajectory planning technique.
The interpolation of parametric curves is a process that discretises the NURBS into numerical control (NC) commands. Speed planning, as the critical step in the interpolation process, has been an area of research for numerous scholars: this can be classified into the time-optimal approach and the non-time-optimal approach. The time-optimal approach deals with the planning problem by taking the minimisation of the motion time as the objective to promote manufacturing efficiency [
19,
20]. For example, Timar [
21] proposed a speed planning scheme for NC interpolation by the use of the optimal control theory. On this basis, Sencer [
22] and Lu [
23] considered the driving capacity constraint and trajectory precision constraint in the interpolation, respectively. The non-time-optimal approach usually deals with the planning problem by taking the minimisation of speed fluctuations as the objective [
24]. Various methods, such as the feed-rate evolutionary algorithm [
25], the equidistance quaternion method [
26], and the improved Adams-Malton algorithm [
27] are employed to decrease speed fluctuations and guarantee steady, continuous-trajectory operation. Although the effectiveness of the method has been validated experimentally, is cannot be applied directly to optical polishing because the effect of acceleration and deceleration on the realisation precision of runtime is not considered.
Driven by the practical needs to improve the quality of optical polishing, this paper presents a systematic trajectory planning method that particularly enhances the realisation precision of runtime. Following this introduction,
Section 2 calculates all the control points of NURBS through numerical solution to overcome the problem of calculation efficiency. In
Section 3, an optimisation algorithm of fairing NURBS is established by taking the shear jerk of trajectory as an evaluation index.
Section 4 then proposes an interpolation scheme with which to minimise the realisation error of runtime by planning the feed-rate of trajectory according to the given runtime between adjacent NC codes.
Section 5 reports experiments on a prototype machine which shows that the proposed trajectory planning method is more accurate than the linear interpolation method. Conclusions are drawn in
Section 6.
2. Trajectory Fitting Based on the NURBS Curve
In this section, according to the given NC codes, all the control points of NURBS are solved, which provides the necessary mathematical model for the interpolation of parametric curves. The basic settings are as follows:
(1) Considering the stability, ease of use and calculation efficiency, cubic NURBS is employed as the fitting tool. (2) The uniform parametric method is used for trajectory fitting, because the polishing elements have a large radius of curvature and the chord lengths between NC codes are distributed uniformly. (3) All weight factors are set to 1. In this case, the NURBS can be treated as a cubic B-spline to simplify the calculation process.
According to the basic theory of the NURBS, a segment of NURBS
can be determined based on the four adjacent control points
. As shown in
Figure 1,
and
separately refer to the start point and the end point of the NURBS segment. Based on the aforementioned setting, the NURBS segment can be directly written as:
Thus, point
can be expressed as:
where
denotes the
ith NC code in the
lines of NC codes and also is taken as the start point of the
ith NURBS segment.
respectively denote the three control points corresponding to
. To calculate
and
, it is defined that on the condition that
, then
and on the condition that
, then
. Equations (3) and (4) can thus be obtained:
Rewriting Equations (2)–(4) in matrix notation yields:
If the traditional solution methods such as Gauss elimination method and LU decomposition are directly applied to the Equation (5), it may lead to some undesirable phenomena (such as excessive calculation time) due to the large quantity of NC codes for polishing. Hence, the SOR iterative algorithm [
28] is used to find stable numerical solutions of Equation (5) as described below.
The coefficient matrix
can be divided into:
where
,
denotes a strictly lower triangular matrix, whose elements below the principal diagonal are corresponding elements of
.
denotes a strictly upper triangular matrix, whose elements above the principal diagonal are corresponding elements of
. Owing to the matrix
being invertible, Equation (5) can be modified to:
In this case, corner marks
and
are added in Equation (7) to identify the number of iterations. Then, the elementary iterative scheme of
can be written as:
where
. The component form of Equation (8) can be expressed as:
which is also known as the Jacobi iteration scheme, noting that, before calculating
, the iterative values of the first
components in
have been generated, which are more approximate to the true value than the results obtained by the previous iteration. Therefore,
can be replaced by
to make
closer to the true value. To improve the convergence rate of the iteration further, a proper parameter
is selected to conduct the weighted averaging on the aforementioned iterative scheme:
with:
Substituting Equation (11) into Equation (10) leads to the SOR iteration scheme:
Note that
is a tridiagonal positive definite matrix, so the optimal value
of the relaxation factor can be expressed as [
29]:
where
denotes the spectral radius of
.
It is worth noting that, for a flat element, the aforementioned method can be directly applied to calculate the NURBS trajectory, but for a curved element, the polishing shaft should always lie along the normal direction of the element. In this case, it is necessary to solve two trajectories of end-point and reference-point on the polishing shaft to determine the polishing attitude (for more details, please see [
21]).
3. Fairing of the NURBS
Although the constructed cubic NURBS by the above method satisfies the G2 continuity characteristics, i.e., the second-order derivative functions of the trajectory is continuous, the motion stability of the trajectory is still influenced by curvature saltation. In this section, a fairing optimisation method is proposed by adjusting the weight factors of NURBS.
The fairing optimisation can be classified into two categories, i.e., global and local fairing according to the number of the adjusted point on NURBS. Considering the significant computational burden of global fairing caused by the large quantity of NC codes for polishing, it is more reasonable to modify the outlier points with curvature saltation by the use of local fairing, which are selected from all NC codes [
30]. A filtering process is needed to eliminate the influence of curvature fluctuations caused by discrete calculation.
In the fairing optimisation, the shear jerk of the outlier point is taken as the evaluation index:
where
denotes the curvature at the
jth outlier point
,
and
denote the curvature of the
and
, which are on two adjacent sides of the outlier point. The index indicates the curvature changes of the adjacent outlier points.
To generate the weight factors of the various outlier points, the objective function is defined as:
where
denotes the
jth outlier point before optimisation. It can be seen from Equation (15) that the objective function is composed of two parts: part one is the curvature changes of the outlier point after optimisation, and part two is the adjustment amplitude of outlier points before, and after, optimisation. Thus, the objective function means that fairing optimisation is performed on the premise of modifying the NURBS as little as possible.
According to affine invariant principle of NURBS [
31], the four-dimensional (4D) space constructed by the control points and weight factors can be expressed as:
Then, the NURBS defined by Equation (1) can be regarded as the projection of the curve
in 4D space on the centre of the hyperplane
. Based on Equation (2), it can be seen that:
where
denotes the control point corresponding to the
jth outlier point and
and
denote the control points on the two adjacent sides of the control point
, respectively.
Furthermore, Equation (15) can be written in 4D space as:
where
can be equivalently simplified as
and
can be approximately expressed as [
32]:
where
denotes the second derivative of the NURBS at
,
and
. Substituting Equation (21) into Equation (20) yields:
To calculate the minimum value of
, the partial derivative of Equation (22) about
is set to 0:
Then, the equations for
can be expressed as:
According to Equation (24), the optimised control points and weight factors corresponding to the outlier points can then be generated.
4. NURBS Interpolation
The NURBS interpolation is used to discretise the parametric curve to the NC commands based on the planned feed-rate. In this section, an interpolation method for optical polishing is proposed aiming to minimise the realisation error of the trajectory runtime.
4.1. Feed-Rate Planning
Feed-rate planning is the main influencing factor in interpolating the NC commands along the trajectory. For the optical polishing, to guarantee the desired runtime of trajectory, the specific method is displayed as follows:
Step 1: considering that now there is no analytical solution to calculate the length of NURBS, the Simpson formula is used to obtain the estimation of the length through numerical iteration:
with:
where
respectively denote the first-order derivatives of
, which are the one-dimensional curves of
along
axes.
and
denote the upper and lower boundaries of
,
.
Step 2: the length between the two points corresponding to the parameters
and
is calculated:
Step 3: the error between the aforementioned two lengths is calculated:
The convergence threshold is given. If , let and repeat Steps 1 and 2. If , turn to Step 4.
Step 4: the parameter interval
was sectioned by the equivalent distance
to generate the knot vector
. Thus, the length of the NURBS is:
Equipped with the length at hand, the S-curve motion law is invoked to guarantee that the feed-rates of the adjacent NURBS segments are changed smoothly. Moreover, the initial sections of the trajectory segments are defined as the feed-rate transition zone. Then, the feed-rates remain constant until the end of the trajectory segments. In this case [
33]:
where
and
denote the initial and final feed-rates of the trajectory segment.
,
and
denote the jerk, acceleration (deceleration) time and the uniform motion time, respectively. Thus, the runtime of the trajectory segment is
.
It is worth noting that previous studies have shown that the feed-rates, when limited by the runtime of the trajectory segments, are much lower than the maximum value which is constrained by the chord error and the driving capacity. Therefore, there is no need to check the feed-rate again.
4.2. NURBS Interpolation
The essence of interpolation is to generate the NC command along the trajectory according to the period . As each interpolation point of the NURBS corresponds to one curve parameter, only the curve parameters need to be solved.
Taking
as the function of
, the second-order Taylor expansion can be expressed as:
The feed-rate
can be written as:
Calculating the derivative of Equation (34):
where:
Substituting Equations (33)–(35) into Equation (32) gives:
Substituting
into the curve equation obtained through the fairing optimisation described in
Section 3, the next interpolation point can be acquired. Repeating this process until:
where
denotes an integer that is rounded up. In this way, interpolation of all trajectory segment can be completed.
5. Experiments
Both simulation and experiments were carried out to validate the effectiveness of the presented method on the prototype of the hybrid polishing robot. As shown in
Figure 2, it is mainly composed of a 6-DOF (degrees of freedom) hybrid robot, a polishing effector, a magnetic worktable, a column, and a CNC system. The hybrid robot is composed of a 3-DOF (3U
PS and UP) parallel mechanism and a 3-DOF wrist. The UP limb and the wrist form a UP
S or UP
RRR limb. Here, R, U, S, and P represent, respectively, revolute, universal, spherical, and prismatic joints, and the underlined
P,
S, and
R denote the actuated prismatic, spherical, and revolute joints, respectively. The CNC system is built upon an IPC+PMAC open architecture, consisting of a host control computer responsible for reconstruction of the parametric curves, trajectory interpolation, and NC command generation, and a PMAC motion controller for servo-control of the actuated joints.
Without loss of generality, a segment of NC codes was taken from the polishing trajectory to validate the effectiveness of the proposed interpolation method. According to the SOR iterative scheme mentioned in
Section 2,
Figure 3 shows the two fitted trajectories. Then, the optimisation algorithm described in
Section 3 is used to smooth the curvature of the trajectory. The change threshold of curvature for judging outlier points is given as 0.01. As shown in
Table 1, the fairness of the two trajectories is both significantly improved. The maximum curvatures of the two trajectories are reduced by as much as 79.7% and 63.3% and the maximum absolute values of shear jerks are decreased by 91.2% and 90.2%, correspondingly. Considering the optimisation and interpolation methods for the two trajectories are same, experimental results of the end-point trajectory are just shown in the following discussion for the sake of simplicity.
Based on the optimisation trajectory shown in
Figure 4, the discrete NC command sequences were generated and sent to the PMAC motion controller, which were mapped into the servo-command of actuated joints through an inverse kinematic model. The PMAC motion controller synchronously gathered the positions and velocities fed back from the servo-motors. The interpolation and sampling periods are 10 and 20 ms, respectively. To validate the effectiveness of the method, a comparison experiment was carried out utilizing the linear interpolation method.
Figure 5 shows the experimental result, which is computed by the feedback positions of all the actuated joints. It can be seen from the partial enlarged view that the NC commands generated by the proposed method are closer to the NC codes than those found using linear interpolation, which means that the removal position of polishing process can be reached more accurately.
Figure 6 and
Figure 7 show the runtime between the adjacent NC nodes. Compared with the desired value, the proposed method is able to realise the runtime more precisely, which indicates that the removal quantity during the polishing process can be more precisely controlled, correspondingly. To evaluate the effect of the interpolation method, the indices are defined as the interpolation error (
) and the runtime error of the trajectory (
):
where
and
denote the
ith desired NC code and actual NC code after interpolation,
and
denote the desired runtime and the actual runtime between the
i − 1th and
ith NC codes. It can be seen from
Table 2 that, compared to the linear interpolation method, the interpolation error and the runtime error generated through the proposed method are an order of magnitude smaller. These data further imply that the proposed interpolation method has more precision than the linear interpolation method in the polishing process.
To validate the modification effect of the interpolation method on the surface error of optical elements, polishing experiments were carried out on fused silica elements by, respectively, using the linear interpolation method and the proposed interpolation method, as shown in
Figure 8. Using the Nanovea contour graph, the polished zone (70 mm × 70 mm) of the elements was detected. The experimental results obtained using the two interpolation methods are displayed in
Figure 9 and
Figure 10, respectively. It can be seen, from the figures, that, after conducting linear interpolation-based polishing, the surface error (PV) decreases from
to
. In contrast, using the proposed interpolation method, the surface error (PV) is reduced from
to
. The convergence rate of the surface error is increased from 37.59% to 44.44%, which further verifies the effectiveness of the proposed method.
6. Conclusions
A new trajectory planning method for optical polishing is proposed in this paper. It is developed to generate NC commands that can decrease the interpolation error and the runtime error. First, to obtain the NURBS trajectory without loss of the information about the runtime, a global fitting method is presented based on SOR iteration theory to deal with the problem of the computational burden arising from the large quantity of NC codes for polishing. Then, taking the shear jerk of the NURBS as the evaluation index, a fairing optimisation method is carried out to smooth the curvature saltation of the trajectory. Finally, the feed-rate planning method and the path interpolation scheme are proposed to reduce the realisation error of the trajectory runtime.
Simulation results verify that the fairing optimisation proposed in this research can modify the curvature saltation at the expense of trajectory accuracy compared to the given NC codes; however, the curvature saltation only occurs at the turning point of the trajectory and the trajectory error magnitude generated by the optimisation algorithm is consistent with the linear interpolation. Therefore, the trajectory accuracy is not treated as the index with which to evaluate the smoothing effect in
Section 5. The effect of the optimisation algorithm on the optical polishing will be investigated in future work.
It can be seen from
Figure 5,
Figure 6 and
Figure 7, and
Table 2, that the runtime error of the proposed interpolation method arises because the trajectory runtime cannot be divided exactly by the interpolation period and is rounded up to an integer. In contrast, the runtime error of the linear interpolation method arises as a result of the acceleration and deceleration that occurs frequently between adjacent short line segments. Similar to the runtime error, the interpolation error of the proposed interpolation method is a result of the numerical calculation error of the trajectory length and that of the linear interpolation method is due to the transition for the discontinuity of the adjacent short line segments. Then the convergence rate of the surface error is increased with the help of the improvement in the interpolation, and runtime, errors, validating the effectiveness of the proposed interpolation process. For the aforementioned error, their individual effects on the optical polishing need to be further indicated in future work.