Study on the Algorithm for Real-Time Interpolation of NURBS Curve

In order to meet the needs of high speed and high precision computerized numerical control machining, a calculation based on the control of contour error and feeding acceleration for the real-time interpolation of Non-uniform rational B-spline (NURBS) curves was presented in this paper. On the premise of meeting the error requirement, machine can process parts with the highest feeding speed to achieve interpolation precision and interpolation speed optimization, and improve processing quality and efficiency.


Introduction
With the computer aided design (CAD) technology becoming more and more popular in modern design, parametric curve and surface has become a general description form of comparing surface parts in CAD system. Based on the Non-uniform rational B-spline(NURBS)curves' accurate standard and free analysis, as well as its flexible shape control [1], great interest has been focused on the free curve and surface modeling techniques with the internal description of NURBS.
Nowadays, most upscale CAD software have the functions of complex free-form curve and surface design , in which the internal description of NURBS is applied, but the numerical control (NC)machining for complex shape of work piece remains unsatisfactory. The main reason lies in that most NC systems only have the function of second curve interpolation, such as straight line, arc and parabola interpolation, and the solution is that the computer aided manufacturing (CAM) system could handle the complex curve and surface generated by CAD system with off-line interpolation, and use a large number of small line segments to approximate the original complex curve, and then the CAM system begins to compile NC machining program and finish NC machining. However, this approach will bring some shortcomings [2,3] ,such as huge program files , low machining precision and feeding speed. Therefore, it becomes a key problem to develop real-time interpolation of NURBS curve techniques for high precision computerized numerical control (CNC) at high speed.

NURBS Curve Geometric Model
A NURBS curve is a vector-valued rational polynomial defined by the following form [4] where u is a scalar parameter which varies from 0 to 1, ) , is the knot vector.
Based on Eq. (1) and (2), a NURBS curve can be defined when i d , i ω , k and knot vector are given certain values.

NURBS Curve Interpolation Theory
Curve interpolation is the process that using time series { } n t t t , , , to cut apart parameters variable to form parameters sequence{ } n u u u , , , , and then sequence of interpolation points can be obtained.
According to the data of sampling interpolation principle, the relevant coefficients of trajectory calculation formula by some spline geometric information received from CAD/CAM can be firstly determined. If the feed speed error and deceleration requirements are available, the interpolation track space line segment to approach interpolation curve in each interpolation cycle can be calculated. The line segment is mapped to parameter variable space to obtain its corresponding parametric space in the small line segments, namely, the incremental value of the variable parameters, and the space in the current point coordinates through the integration of parametric or parametric recursive will be found. Finally, a trace space maps points which is corresponding to the current point in parametric space can be stricken to get coordinates of current point in interpolation trajectory.
For B-spline, cubic spline, NURBS and other parametric curves, the classical iterative method for the general interpolation is:

NURBS Curve Real-time Interpolation Algorithm
NURBS Data Pre-processing. Since the distribution along the parameter shaft of node parameter of NURBS spline function are generally uniform, and different nodes vector can form different B spline functions, all these calculation require a separate processing. Moreover, the increased power factor makes that curve track points calculation is relatively complicated and time-consuming. In order to improve the speed of NURBS curve interpolation, the problem can be solved by the , this problem can be solved by the improved algorithm. Before real-time interpolation, each factor of NURBS expression on the straight was firstly calculated on the basis of the control points, power factor and node vector. Define . If NURBS curve is the third order, 3 = K , then the i th section of curve can be represented by matrix as follows [5]:  Expand every term of this matrix and define: 3 has nothing to do with parameters and can be calculated before the interpolation of the i th section of curve.Since only the incremental value t ∆ of parameter t needs to be calculated during interpolation, the calculation will be accelerated greatly.

Real-time interpolation calculation .
According to the current state and constraint conditions , real-time interpolation computing needs to calculate the speed of next interpolation points and the length of the interpolation in current period. Based on the spline curve data sampling interpolation theory, NURBS curve direct interpolation process will be completed by two major steps: parameters of dense and trajectory calculation.

Emerging Engineering Approaches and Applications
Parameters of Dense. Parameters of dense are that feed step length in track space is mapped to parameter space to obtain a parameter and the next increment parameter coordinates Methods commonly used involve Taylor expansion, nonlinear equation and Adam he differential equation method. In this paper, Taylor expansion method [6,7] will be illustrated.
is the sampling interval.
The curve speed ) (t F can be represented as dt du du u dp dt Considering that most of the interpolation tracks are non-acceleration and deceleration phases, one times Taylor expansion can satisfy the requirement of average interpolation process. The final iteration formula can be described as: is the current feed step in a interpolation cycle, i F is the feed rate which is given. In can get down the corresponding parameters by pointing out the current cut bolts, from which the interpolation results can be derived. Trajectory Calculation. By substituting the new parameters obtained from Eq. (6) into Eq. (1), it can get the location of the next interpolation points. Repeating the above two big real-time interpolation steps until end, the whole curve discretization NURBS curve interpolation track can be obtained.
Adaptive Feeding Speed Determination. The size of the feeding speed is shown as the feed step-length length in each cycle. In order to ensure both processing efficiency and accuracy, dynamic step interpolation methods were used, namely, in considering contour error and feed acceleration control, to determine the premise of each interpolation micro segment of the feed step length.
Feed Rate Controlled by Contour Error 1 i V . During the interpolation process of NURBS curve, since the interpolation points are accurate in curve machining process, there is no accumulative error. However, the error only come from the inevitable bow high error which is caused by using short lines regarding that as unit to approximate the actual curve.
Step-length, based on contour error control, has improved the situation. The basic principle is: monitor contour error during the process of interpolation, when the error is the allowed range, the feed rate still base upon the calculation of a given feed rate 0 V . If the error exceeds the allowable value max ε , the calculation of the feed rate 1 i V by the permissible error makes that the practical feeding speed can varies with the radius i R of curvature to ensure interpolation contour error control within permitted. The maximum feed rate due to the confined contour error ε is represented as: where ε is contour error , i R is the curvature radius at point

Advanced Engineering Forum Vol. 1 265
Feed Rate Controlled by Normal Acceleration 2 i V . Since the curvature of NURBS curve is changing , it makes normal acceleration vary during curve processing. With the feeding speed in high-speed and ultra-high speed processing improving constantly, normal acceleration will continuously increase during curve processing, especially in larger curvature processing areas, it may cause very big to surpass the design capacity of the dynamic stiffness of machine tool feed system. Therefore, high speed curve processing interpolation must have the function of real-time monitoring to adjust the acceleration. If the normal acceleration surpasses the permitted value, the real-time monitoring adjusts the feed rate 2 i V to required acceleration. The maximum permitted speed is: where max N a is maximum allowable normal acceleration. Suppose the maximum allowable feeding speed of a machine is max V , and a smaller starting velocity 0 V at the beginning of the curve interpolation, the machine speeds up at an accelerate of a which can be accepted by the ability of the machine, and the interpolation feed rate of the i th interpolation point is to be interpolation feeding speed. According to the feed rate of current interpolation points , the next interpolation points parameters will be further calculated until the next calculated parameters is equal to or greater than 1, and the interpolation ends.
It is obvious that the adaptive interpolation algorithm can solve the conflict between the precision and speed. However, through analyzing adaptive area, a problem that the speed in this area is changing constantly and the machine tools must accelerate and decelerate constantly has been found. If let it be, the high speed could cause greater vibration and impact to machine and finally affect the surface quality of the parts. Therefore, the acceleration and deceleration of machine need to be controlled by introduction the adaptive mechanism feeding speed. Method usually used is to adopt more flexible and deceleration mechanism (such as s-type deceleration control mode) to deal with the speed smoothly and processing quality higher.
Adaptive NURBS Curve Interpolation Algorithm Process. By NURBS interpolation principle and real-time interpolation algorithm, the NURBS interpolation subroutines process is shown in figure 1, from which it is clear that the specific interpolation process includes the following steps: (1) Inputting relevant curve information and processing information to determine the trajectory calculation formula about coefficient; (2) Having an adaptive processing, adjusting interpolation feeding speed; (3) Handling feed rate with s curve smoothly, determining the form of acceleration and deceleration distribution, forecasting deceleration point and calculation the speed distribution.

266
Emerging Engineering Approaches and Applications

Conclusions
Interpolation technique is control core of achieve high speed and high precision CNC machining, while NURBS curve real-time interpolation is one of the typical feature for modern high-performance NC system. The feeding speed adaptive NURBS curve real-time interpolation algorithm presented in this paper not only save the computational time greatly, insure the interpolation algorithm in real-time, but also improve the interpolation speed during ensuring interpolation precision. Therefore, combining this algorithm with high-speed and high-precision drive systems, and servo systems in CNC systems is significant to achieve a smooth and stable rate of speed and precision machining.