The Research of the NURBS Curve Interpolation Algorithm

In this article, the definition, the nature and the parameter of the NURBS (Non-Uniform Rational B-spline) curves are defined, the more thorough analysis and research of the real-time NURBS curve interpolation algorithm and the feed rate adaptive control are carried out.


The significance of NURBS curve interpolation in high-speed high-precision CNC machining
In the current CAD/CAM system, the complex shape parts such as molds, aircraft wings, and wheels are commonly expressed with the parametric equation. Because the conventional CNC machine tools only provide the linear and circular interpolation, CAD/CAM systems have to divide the parameter curve into a large number of tiny segments. The treatment has the following drawbacks [1 2] .
(1) There is always a conflict between the accuracy and data generation, the higher the precision the larger the data generate, and reducing the amount of data will decrease the manufacturing accuracy. (2) In terms of manufacturing process, the division of the curve into short straight lines affects the part contour curve first order derivative continuity and the surface smooth.
(3) In terms of processing efficiency, the usage of a large number of tiny lines to approximate the contour curve of the part will cause the difficulty of the processing speed to reach the program feed rate.
NURBS curve interpolation can directly transfer the curve to CNC system, there is no need to break down the curve into tiny segments. It has the following advantages [3] .
(1) Unified mathematic model The method can not only express the freedom of curves and surfaces, but also can accurately represent conical surface curves and surfaces, which provide an unified mathematic model for CAD/CAM system.
(2) Flexible shape control By modifying the control vertex, weighted factor or node value, to modify and control the shape of the curve or surface, which provide sufficient flexibility for a variety of shapes design.
(3) Powerful modeling capability The method has a series of powerful geometric shaping technologies (including node insertion, subdivision, etc.), which can be used for all aspects of the design, analysis and processing.

Curve express for NURBS
Concept of the NURBS curve. The parameter equation of the 3-dimensin curve is A NURBS curve (as shown in Figure 1) can be defined as following formulas.
Where, C i (i=0,1,…,n) are the points controlled, every point has a weighted factor W i (i=0,1,…,n). N i, k (u) is k-regulate B-spline basis function, it can be recursived calculation by following formula。 Where, U={u 0 ,u 1 ,…,u n+k+1 } are called node vectors. For NURBS curves, the node vectors are U=[α，α，…α，,u k+1 , ……, u n , β, β, …β,]. In most cases, u is the argument for NURBS curves. NURBS curves can be considered as the B-spline curve, which has one dimension more than the curvilinear coordinate space, the extra one-dimension is the weighted factor corresponding to the control point. For example if the coordinates (x, y, z) weighted factor is W, it can be expressed as the odd form of coordinates (Wx, Wy, Wz). If a set of controlled points C i =[x i ，y i ，z i ]，i=0，1...，and the weighted factor W i ,i=0，1...，n, are given, then the NURBS curves can defined as follow steps.
, As shown, a NURBS curve can be defined by four parameters: control points, weighted factors, node vector and exponent of the basis functions. These four parameters are a part of NC program instructions. The NURBS curve is generated by CNC system. This is the NURBS curve interpolation.
Determination of NURBS curve node vector. The non-uniform B-spline node vector is determined by Riesenfeld algorithm [4] . The node vector of a k-dimensional non-rational B-spline curve can be determined.

Interpolation algorithm for NURBS curve
The implementation of the interpolation algorithm. The computing of the real-time interpolation needs to be done in one interpolation cycle, according to the current feeding status and constraints to calculate the next interpolation point interpolation feed rate and the current interpolation length. According to the data sampling interpolation theory, NURBS curve interpolation process needs two steps to complete: three-dimensional trajectory space to the space of one-dimensional parametric mapping --parameters intensifying, and the one-dimensional parameter space into three-dimensional trajectory space mapping --trajectory calculation [5] .
(1) Parameters intensifying. In the parametric interpolation mode, the process of the data intensifying is the process of the parameters intensifying. Suppose P(u)=(x(u),y(u),z(u)) (10) The Taylor expansion of parameter u to time t, the corresponding approximated algorithm can be obtained.
The first order derivative is In most non-acceleration and deceleration section ( ) 0 = dt t dV , overlooking the high entry.
(2) Trajectory calculation. That is mapping it to the three-dimensional trajectory space from the one-dimensional parametric space. From the first step of the above real-time interpolation, the following format is obtained. u i+1 =u i +△u i (20) Trajectory calculation is about to map the next parameters of the parametric space, which is computed in the process of the parameter intensifying, to the three-dimensional trajectory space: a new parameter u i+1 is substituted into the NURBS curve equation, the next interpolation point is located. After the parameter intensifying and the trajectory calculation, the two steps, in the same period, the CNC system obtained the next interpolation location, and sent out feed command to the axis of the servo system to drive the actuated equipment and to complete the cycle interpolation task. Repeating the above real-time interpolation steps until the end point of the curve, the whole discretization NURBS curve interpolation trajectory is obtained ( Figure 2).

Summary
The article briefly introduced the NURBS curve. Starting from the definition of NURBS curves, the method of calculating vector derivative is presented, through this method, the basis functions and their first order and second order derivatives can be easily calculated and further to compute p(u), p ' (u), p '' (u) at one point of the curve.