Next Article in Journal
Robust Adaptive Robotic Visual Servo Grasping with Guaranteed Field of View Constraints
Previous Article in Journal
PEMFC Gas-Feeding Control: Critical Insights and Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Interpolator for a Non-Uniform Rational B-Spline Curve with a High Efficiency and Accuracy Using Polynomial Representations

1
School of Economics & Management, Fuzhou University, Fuzhou 350116, China
2
School of Mechanical Engineering and Automation, Fuzhou University, Fuzhou 350116, China
*
Author to whom correspondence should be addressed.
Actuators 2024, 13(11), 456; https://doi.org/10.3390/act13110456
Submission received: 25 September 2024 / Revised: 11 November 2024 / Accepted: 12 November 2024 / Published: 13 November 2024
(This article belongs to the Section Actuators for Manufacturing Systems)

Abstract

:
This paper introduces an efficient and accurate interpolator for NURBS (non-uniform rational B-spline) curves, addressing the challenge of regulating feedrate under machining accuracy and dynamic constraints, particularly at sensitive corners. A recursive matrix representation and polynomial conversion are utilized to enhance the computation of NURBS curve intermediate points and derivatives. An improved adaptive planning method is presented to adjust the feedrate at sensitive corners, ensuring that chord error and dynamic constraints are met. The method integrates linear acceleration and deceleration stages to mitigate abrupt changes in acceleration and jerk. Additionally, a prediction–correction scheme-based interpolator is developed, employing an asynchronous mechanism to improve computational efficiency. The proposed method’s effectiveness and correctness are validated through simulation tests and machining experiments.

1. Introduction

NURBS curves have emerged as the industry standard for curve and surface modeling, popularized by their unified mathematical representation of both standard and free-form shapes [1]. This representation allows for efficient evaluation through numerically stable and accurate algorithms, leading to the widespread adoption of NURBS curves in the design of interpolators for high-speed, high-accuracy machining in modern manufacturing systems.
The primary function of an interpolator within a CNC (computer numerical controller) system is to discretize the tool path into segments of limited length. For NURBS curves, characterized by their parametric representation, the computation of intermediate parameters is essential to determine the corresponding interpolation points. Given the absence of an analytical solution for determining the length of NURBS curve parameters, numerical methods are employed to approximate these values. Among these, Taylor’s expansion (TE) is prevalent [2,3,4], utilizing previously computed parameters to estimate subsequent ones. While methods such as the predictor–corrector (PC) [5,6,7], polynomial-fitting (PF) [8,9,10], and augmented Taylor’s expansion (ATE) [11] offer increased accuracy by compensating for truncation errors in TE, TE remains sufficiently precise for most applications when considering derivatives up to the second order. Interpolation is conducted at each sample period, with each axis’ incremental motion serving as discrete position commands for the servo loop, ultimately guiding the tool along a polyline path composed of connected line segments. Shorter line segments are preferred for higher machining accuracy, posing a challenge for interpolator development due to the significant computational demands involved in calculating intermediate points and the first and second derivatives of NURBS curves. Enhancing computational efficiency, particularly when employing the TE method, is thus crucial to meet the growing precision requirements of modern manufacturing.
Furthermore, the chord error, resulting from the replacement of arc curves between interpolation points with line segments, is inevitable and proportional to the curvature [12]. This error may exceed the allowable limits when encountering a sensitive corner (SC) with high curvature. Additionally, the centrifugal acceleration in these areas could surpass the servo system’s capacity, leading to tool path overshoot. Therefore, the feedrate must be reduced prior to reaching a sensitive corner in order to satisfy the demands of machining accuracy and dynamics. Adaptive feedrate planning [13,14,15] has been recognized as a sophisticated solution, allowing the feedrate to be adjusted based on the curvature of the NURBS curve at sensitive corners, thereby achieving a uniform feedrate and controlled chord error. Jerk-limited feedrate planning [16,17,18] has also been developed to create a smooth, S-shaped feedrate profile at sensitive corners, integrating machining dynamics into the interpolation stage. This method involves several linear acceleration or deceleration stages, maintaining a constant jerk as the tool moves along the sensitive corner. While high-order continuity feedrate planning methods, such as the jounce-limited method [19] and the sinusoid method [20], are applied to further reduce feedrate and acceleration fluctuations, they necessitate a longer sample period for heavy computation. Given the limited response time of mechanical systems, which include ball screws, servo motors, and other components, conventional adaptive and jerk-limited planning remain cost-effective for regulating feedrate profiles at sensitive corners. Although adaptive feedrate planning can achieve high efficiency due to its maximum value constraint within chord error limits, it may result in abrupt changes in acceleration and jerk at the start and end of the feedrate profile [13]. Jerk-limited planning can provide a smoother feedrate profile, but at the cost of longer machining times. Consequently, there is a need to develop a comprehensive feedrate planning solution that balances machining efficiency and stationarity.
In this paper, Taylor’s expansion to the second order, along with a recursive matrix expression that substitutes the B-spline basis function via the de Boor algorithm, is applied for the interpolation of parametric NURBS curves to enhance computational efficiency. Meanwhile, an improved adaptive planning method is presented to adjust the feedrate at sensitive corners, integrating linear deceleration and acceleration stages to eliminate abrupt changes in acceleration and jerk, ensuring that jerk remains within predefined machining dynamics. The feedrate profile at the linear acceleration stage, after adjustment by the improved adaptive planning, matches the endpoint values of the linear deceleration stage, eliminating dynamic jumps and allowing for the reuse of the feedrate profile calculated by the look-ahead module, thus improving the computation efficiency of NURBS interpolation. The proposed method’s effectiveness and correctness are confirmed through simulation tests and machining experiments.

2. Representation for NURBS Curves

2.1. Recursive Matrix Representation

NURBS curves, characterized by their parametric representation, necessitate the prior calculation of parametric values to determine the increments of the motion axes. Unfortunately, the parametric value has a non-linear relationship to the curve length [21], and it could not be interpolated by linear equation as the line or circle. Normally, Taylor’s expansion is used to calculate the intermediate parameter of a NURBS curve. The approximation up to the second order of derivative can be expressed as shown in Equation (1).
u i + 1 = u i + v i C ( u i ) v i T s 2 2 C ( u i ) C " ( u i ) C ( u i ) 2 Δ x , Δ y , Δ z , T = C ( u i + 1 ) C ( u i )
where T s is the sample time and v i refers to the command feedrate or the desired curve speed. If there is a k-degree NURBS curve defined by the knot vector u 0 , , u i , , u n + k + 1 , control points P 0 , , P i , P n , and weight vector ω 0 , , ω i , , ω n , this can be represented by Equation (2).
C ( u ) = i = 0 n ω i P i N i , k ( u ) i = 0 n ω i N i , k ( u )
where N i , k ( u ) represents the B-spline basis function, which is complicated and inefficient as it has to be recalculated in every sample period with a substantial amount of computation. In this paper, the recursive matrix formula [22,23] is introduced to describe the NURBS curve, in order to improve computation efficiency.
Actually, a k-degree NURBS curve with n + 1 control points can be divided into n − k + 1 segments of individual NURBS curve. Then, the i-th segment of this NURBS curve can be defined by the knot vector u i k , u i k + 1 , , u i , control points P i k , P i k + 1 , P i , and weight vector ω i k , ω i k + 1 , , ω i , as shown in Equation (3).
C ( t ) = C u u i u i + 1 u i = 1 , t , , t k M k ( i ) ω i k P i k , , ω i P i T 1 , t , t k M k ( i ) ω i k , , ω i T
where t = u u i u i + 1 u i , t [ 0 , 1 ) , and the i-th coefficient matrix Mk(i) can be expressed by Equation (4) in a recursive manner.
M k ( i ) = M k 1 ( i ) 0 1 d 0 , i k + 1 d 0 , i k + 1   0   1 d 0 , i k + 2 d 0 , i k + 2       0   1 d 0 , i d 0 , i       + 0 M k 1 ( i ) d 1 , i k + 1 d 1 , i k + 1   0   d 1 , i k + 2 d 1 , i k + 2       0   d 1 , i d 1 , i M 0 ( i ) = [ 1 ]
where d 0 , j = u i u j u i + k u j ,   d 1 , j = u i + 1 u i u j + k u j + 1 with convention 0 0 = 0 , P i is the control point, ω i is the weight, and u represents the parameter within the knot vector u i , u i + 1 . As demonstrated in Equation (3), the recursive matrix M k i , referred to as the i-th coefficient matrix, is used to substitute the B-spline basis function with the de Boor or Cox–de Boor recursive algorithm. Obviously, during the interpolation process, it keeps constant within the knot vector u i , u i + 1 no matter what the value of the parameter u is, and it just needs to be refreshed nk + 1 times when a NURBS curve is defined by n + 1 control points. In contrast, in the traditional way, the B-spline basis function should be refreshed in every sample period once the parameter u has changed. Consequently, the representation for a NURBS curve in the matrix form could significantly promote the efficiency when interpolating a NURBS curve.

2.2. Polynomial Representation for NURBS Curves

Moving to a forward step, a NURBS curve could be further translated to the polynomial representation, as shown in Equation (5).
A ( t ) = 1 , t , , t k M k ( i ) ω i k P i k , , ω i P i T = a k t k + a k 1 t k 1 + + a 0 B ( t ) = 1 , t , , t k M k ( i ) ω i k , , ω i T = b k t k + b k 1 t k 1 + + b 0
Then, Equation (3) can be simplified to the polynomial representation expressed in Equation (6).
C ( t ) = A ( t ) B ( t ) = a k t k + a k 1 t k 1 + + a 0 b k t k + b k 1 t k 1 + + b 0
The first and second order derivative can be obtained using Equation (7), as follows:
C ( t ) = A ( t ) C ( t ) B ( t ) B ( t ) C ( t ) = A ( t ) 2 C ( t ) B ( t ) C ( t ) B ( t ) B ( t )
where A ( t ) , A ( t ) , B ( t ) , and B ( t ) can be calculated using Equation (8).
A ( t ) = a k k t k 1 + a k 1 ( k 1 ) t k 2 + + a 1 A ( t ) = a k k ( k 1 ) t k 2 + a k 1 ( k 1 ) ( k 2 ) t k 3 + + 2 a 2 B ( t ) = b k k t k 1 + b k 1 ( k 1 ) t k 2 + + b 1 B ( t ) = b k k ( k 1 ) t k 2 + b k 1 ( k 1 ) ( k 2 ) t k 3 + + 2 b 2
Taking t = u u i u i + 1 u i , t [ 0 , 1 ) into account, the first and second order derivative should be changed according to Equation (9).
C ( u ) = d C t d u = d C ( t ) d t d t d u = 1 ( u i + 1 u i ) C ( t ) C ( u ) = 1 ( u i + 1 u i ) C ( t ) = 1 ( u i + 1 u i ) 2 C ( t )
From the calculation process above, if a k-degree NURBS curve has n + 1 control points, then it has nk + 1 segments of individual NURBS curve. Meanwhile, the polynomial coefficients a i and b i of C ( u ) remain constant in a single segment. In other words, it clearly shows that a i and b i only need to be calculated nk + 1 times when using Equation (1) to interpolate the whole curve. Thus, the polynomial representation for NURBS curves presented in this paper can simplify the calculation process, thus improving the efficiency.
As shown in Figure 1, a 2D curve with a diamond shape is taken as an example to test the proposed representation method when interpolating the NURBS curve. The curve is defined as follows: control points (150, 300, 0), (300, 400, 0), (450, 300, 0), (600, 200, 0), (450, 100, 0), (300, 0, 0), (150, 100, 0), (0, 200, 0), (150, 300, 0); knot vector (0, 0, 0, 0.25, 0.25, 0.5, 0.5, 0.75, 0.75, 1, 1, 1); and weights {1, 10, 1, 10, 1, 10, 1, 10, 1}. In the simulation process of interpolation, the command feedrate v c m d is set at 200 mm/s, while the sampling time Ts is defined as 2 ms.
The NURBS interpolator is tested on a personal computer with the Windows10 system. Three types of NURBS curve representations, the proposed polynomial method, amd the de Boor recursive algorithm and Cox–de Boor algorithm are applied to evaluate the calculation efficiency using Matlab 2018b. The simulation results are listed in Table 1.
As indicated in Table 1, the proposed polynomial method outperforms other algorithms, requiring only one-tenth of the calculation time of the de Boor algorithm and one-seventh that of the Cox–de Boor method, thereby significantly enhancing computational efficiency in NURBS curve interpolation. The recursive basis function of the de Boor method consumes more time than the sample time during interpolation, while the Cox–de Boor method, though improved, remains close to the sample time. This implies that a longer sample time is necessary for implementing the interpolator on hardware with limited computation capacities, potentially compromising tool path accuracy and feedrate. Thus, the proposed polynomial representation enables the development of a real-time, high-speed, and high-accuracy NURBS interpolator.

3. Feedrate Planning at Sensitive Corners

3.1. Sensitive Corners on NUBRS Curves

When NURBS curves are discretized into segments of a predetermined length by an interpolator, chord errors are an inevitable consequence. If there are some sensitive corners on a curve, the chord error cannot be guaranteed within a given tolerance.
The relationship between chord error δ i and feedrate V i at the i t h interpolation point can be calculated using Equation (10).
δ i = 1 k i 1 1 V i T k i 2 k i = C ( u i ) × C ( u i ) C ( u i ) 3
where δ i , k i , and v i are the chord error, curvature, and feedrate at parameter u i , respectively.
Adaptive feedrate planning is a widely used approach that adjusts the feedrate with the changes in curvature at a sensitive corner. It ensures that the chord error always stays in the tolerance zone. The adaptive feedrate v u i can be written as shown in Equation (11).
v u i = 2 T s 1 k i 2 1 k i δ max 2
During the process of interpolation, the adaptive feedrate is calculated in every sample period, and then it will be compared with the command feedrate. A sensitive corner is met when the adaptive feedrate is smaller than the command one. Then, the adaptive feedrate, instead of the command one, will play the role of driving the tool along this sensitive corner. In this way, the feedrate remains constant for most of the machining time, and adaptively slows down at the sensitive corners. Taking the diamond shape as an example (Figure 1), the profiles of feedrate, acceleration/deceleration, and jerk after adaptive feedrate planning are shown in Figure 2.
However, the abrupt changes in acceleration and jerk can be observed at the start and end of the sensitive corner after adaptive feedrate planning. These changes have the potential to surpass the threshold limits of the machining dynamics. Therefore, we need a proper method to eliminate the abrupt changes in the feedrate profile generated by adaptive planning, whereby a balance point among machining accuracy, efficiency, and dynamics can be achieved, thus giving full play to the machine capacity and shortening the machining time.

3.2. Improved Adaptive Feedrate Planning

In this paper, a linear deceleration stage at the beginning of the corner and a linear acceleration stage at the end of the corner are applied to replace the corresponding parts of an adaptive feedrate profile, where the acceleration or jerk is larger than the threshold.
As shown in Figure 3, the cutting tool should be slowed down from the command feedrate v c m d to the feedrate v d e chosen as the terminal feedrate at the linear deceleration stage. Then, it goes through the sensitive corner with the feedrate profile generated by adaptive planning, until it reaches the feedrate v a s chosen as the initial one at the linear acceleration stage. Then, it will be sped up to the command feedrate again after passing the sensitive corner.
Following the improved adaptive feedrate planning method described, this paper introduces a novel look-ahead module for NURBS curve interpolation. The detailed operational mechanism of this module is illustrated in Figure 4.
As shown in Figure 4, a look-ahead buffer is created to store the interpolation vector (IV), including the profiles of feedrate, acceleration, jerk, etc., which are generated by the look-ahead module. Then, the buffer will be examined in detail to find out the jumps and to check the acceleration and jerk profiles. If the value of the acceleration or jerk is out of the preset range, the interpolated parameter will be picked out from the buffer to determine the endpoint at the deceleration stage, as well as the starting point at the acceleration stage. If both are present, they will be compared, and the parameter with the larger value will be selected at the linear deceleration stage, while the smaller one will be chosen at the linear acceleration stage.
Subsequently, new feedrate profiles for the linear deceleration and acceleration stages can be adopted to replace the relative parts of the adaptive feedrate profile where the dynamics capacity is exceeded. The other part of the feedrate profile can be reused rather than being discarded, as is the case with current approaches. Then, a corner buffer can be created to store the new profile for the sensitive corner. The interpolation values generated by the look-ahead module can be read from the buffer, and can be pushed into the output buffer by a writer. If a sensitive corner is met, the reader pointer will be relocated to the corner buffer and will then jump back to the look-ahead buffer until the corner buffer is finished. Meanwhile, an interpolation module will be started to re-interpolate the curve when the look-ahead module has gone further than a certain distance on the NURBS curve. Then, the interpolation value can be calculated from the output buffer in sequence, and a second interpolation can be performed according to the feedrate in the interpolation value. This is a necessary procedure because the tool cannot reach the same interpolation point after adjusting the feedrate profile. During the interpolation process, the look-ahead and interpolation modules run in turn in the sample period.

4. Interpolator Architecture

Actually, a smooth feedrate profile should be guaranteed when the linear deceleration and acceleration profiles are integrated into the profile generated by adaptive planning. As concerns the linear acceleration stage at the end part of the sensitive corner, the feedrate profile can be calculated by correctly selecting the acceleration and jerk.

4.1. Feedrate Profile Estimation

For the removal of the dynamic jumps in the feedrate profile, the feedrate is reduced from the command feedrate v c m d to the adaptive feedrate v d e at the linear deceleration stage, where the acceleration or jerk exceeds the maximum value. If the deceleration value at the endpoint is A d e , the relationship between the feedrate and deceleration can be described using Equation (12).
v c m d v d e = 1 2 A d e t d e c
where t d e c is the total time of the linear deceleration stage. It should be considered that the deceleration time t d e c must be an integral multiple of the sample time T s ; then, it needs to be recalculated using Equation (13).
t d e c = c e i l 2 v a s v c m d A d e T = N d e c T s
Generally, the profiles of feedrate and acceleration are discrete; thus, the acceleration profile of the linear deceleration stage should be separated into a series of steps with an increment Δ A d e in every sample period. Then, the federate v d e at the end of the linear deceleration stage should be corrected to the real value v d e using Equation (14).
v d e = v c m d i = 1 N d e c i Δ A d e T Δ A d e = A d e N d e c
However, the variation in the feedrate at the end of the linear stage caused by the procedure of rounding to an integer will result in an excessive dynamic jump due to the fact that the feedrate cannot be exactly decelerated to v d e . A proper procedure should be adopted to handle this problem. In this paper, a symmetric triangle profile of acceleration, as shown in Figure 5, is superimposed onto the original one at the linear deceleration stage, aiming to compensate for such a deviation in the feedrate.
If the area of the triangle is equal to the variation in the feedrate v d e v d e , the feedrate can be exactly reduced to v d e at the end of this stage. In fact, the area should be accumulated by N d e c squares with Δ A c o r r increments in height, as the acceleration profile is discrete. The correction of feedrate v c o r r produced by this additional triangle profile can be obtained using Equation (15).
v c o r r = 2 i = 1 ( N d e c 1 ) / 2 i Δ A c o r r T s + N d e c + 1 2 Δ A c o r r T s i f   N d e c   is   odd v c o r r = 2 i = 1 N d e c / 2 i Δ A c o r r T s i f   N d e c   is   even
Assuming correction v c o r r to be equal to v d e v d e , the increment of acceleration Δ A c o r r at every sample period can be achieved. As the deceleration time series is T s , 2 T s , , N d e c T s , the feedrate profile of the linear deceleration stage can be obtained using Equation (16).
v l d _ p r o f i l e = v c m d Δ A d e T s 1 , 2 , , N d e c Δ A c o r r T s 1 , 2 , , 2 , 1
Moreover, the feedrate profile at the linear acceleration stage is similar to that at the deceleration stage.

4.2. Parameter Estimation

After feedrate adjustment using the improved adaptive planning, the newly generated feedrate profile can replace the buffer segments with abrupt changes or those exceeding the acceleration or jerk thresholds. Then, the methods by which we can estimate the parameter u d s at the start point of the linear deceleration stage, as well as u a e at the end point of the linear acceleration stage, become an obstacle when moving to the next step.
Taking the linear deceleration stage as an example, the moving distance can be estimated by the accumulation of the feedrate profile v l d _ p r o f i l e and the sample time. It can be expressed as shown in Equation (17).
S l d = v l d _ p r o f i l e T s
The deceleration distance S l d is larger than that of the adaptive feedrate profile from the beginning of the sensitive corner to the endpoint of the linear deceleration stage, because the deceleration of adaptive planning is quicker than the linear one. Hence, a longer distance is needed to slow down the feedrate from v c m d to v d e . It means that the feedrate of the tool should be decreased in advance before it arrives at the beginning of the sensitive corner. The distance of deceleration from v c m d to v d e according to adaptive planning can be defined as shown in Equation (18).
S a d = v c m d , , v d e T s
The feedrate profile v c m d , , v d e in Equation (18) can be read from the corner buffer shown in Figure 4. Then, the number of interpolation points can be traced back from the beginning of the sensitive corner, as is defined by Equation (19).
N t b = c e i l S l d S a d v c m d
If the parameters u d s and u d e represent the start point and the endpoint of the linear deceleration stage, respectively, the original feedrate at this section will be replaced by v l d _ p r o f i l e . Meanwhile, it should be noticed that the distance N t b v c m d + S a d is a little bit longer than S l d ; thus, the feedrate profile at the deceleration stage will shift back a little bit.
If the parameter read from the corner buffer at the feedrate v d e is u d e , then the parameter u d e after the linear deceleration stage is a little bit smaller than u d e , which is achieved by adaptive planning. This guarantees the profile at the deceleration stage, decreasing from the command to the minimum v min , which is smaller than the adaptive feedrate at the same position on the curve.
However, a drawback appears whereby the tool will not reach the bottom of the sensitive corner when the feedrate is decelerated to the minimum value. Moreover, the feedrate at the acceleration stage will exceed the adaptive one, resulting in a reduction in machining quality. In this paper, a number of v min are added to the feedrate profile between the deceleration and acceleration stage. This could compensate for the moving distance, in order to drive the tool to reach the bottom of the sensitive corner. By doing so, the feedrate profile at the acceleration stage will shift a little bit forward, ensuring that the feedrate is less than the adaptive one, which coincides with the case of the declaration stage. Then, the number of v min added to feedrate profile can be expressed using Equation (20).
N v min = c e i l N t b v c m d + S a d S l d v min
Finally, the whole feedrate profile v s c _ p r o f i l e can be expressed by Equation (21) when the tool arrives at a sensitive corner.
v s c _ p r o f i l e = v d e c , v min v min , v a c c v d e c = v c m d v d e v min v a c c = v min v a s v c m d
Taking the first sensitive corner in the diamond shape as an example, the feedrate profiles generated by adaptive planning and the proposed planning, respectively, are demonstrated in Figure 6.
As described above, the proposed improved adaptive feedrate planning not only reserves the advantages of adaptive planning, which has a shorter machining time and a better machining performance, but it also removes feedrate changes at the beginning and end of the sensitive corner. After that, a second interpolation process will be started to calculate the increment of each motion axis with the feedrate profile generated by the proposed planning. It is quite simple and efficient because all the coefficients of the polynomial representation have been calculated in the look-ahead module, and they can be reused in this process.

4.3. Prediction–Correction Scheme

Normally, the synchronization mechanism, i.e., the look-ahead and interpolation tasks, is performed in the same sample period. It is used to ensure the continuity of interpolation. However, for a NURBS curve, the computation intensity of the look-ahead and interpolation modules is still quite high, and it is almost impossible to carry out these two tasks in a short sample period. Hence, a much longer sample period is needed, and this leads to the reduction in the machining accuracy.
In fact, it can be found that the relationship between the look-ahead and interpolation modules is a typical producer–consumer model. The former is designed to produce a smooth feedrate profile with the constrains of chord error and machining dynamics, while the interpolation module consumes the values of feedrate to generate the increment movement for each motion axis. Hence, the look-ahead module can be executed offline in the background continuously, and the interpolation module can be performed online in the foreground periodically. Hence, if the space of the FIFO buffer is big enough, the whole interpolation process could run constantly without any interruptions. Such an asynchronous mechanism takes the strategy space for time, and also removes the time constraint in the common interpolator with a synchronization mechanism.
In addition, according to the functions within the look-ahead module, it can be further divided into the modules of prediction and correction. In this paper, a new interpolator architecture with a prediction–correction scheme is proposed to boost the efficiency of the NURBS curve interpolation. It mainly includes three function modules—the prediction module, the correction module, and the interpolation module. A detailed diagram of the proposed interpolator is shown in Figure 7.
The prediction module is not only used to calculate the next parameter value u i + 1 with the previous value u i and command feedrate v c m d using Equation (1), but is also applied to predict the trend in the curvature change. Then, it saves the interpolation values into a FIFO buffer before they are ready to be executed. When encountering a sensitive corner, the tool traverses it using adaptive feedrate planning until the endpoint is reached. A corner buffer is constructed to store the newly calculated interpolation values according to the prediction module. The feedrate is adjusted based on chord error to ensure the interpolated data’s accuracy remains within preset limits.
After completing the process of prediction, the interpolator will suspend the prediction module and activate the correction module. This module retrieves and recalculates values in the FIFO buffer for correction, aiming to adjust feedrate, acceleration/deceleration, and jerk to meet machining accuracy and dynamics requirements. Prediction and correction are suspended once the FIFO buffer is full, resuming once space becomes available. The feedrate profile generated by the proposed prediction–correction scheme is shown in Figure 8, which displays half of a diamond shape.
Finally, as shown in Figure 7, the interpolation module will be awakened at each sample period and will start to output the interpolation points. Then, it transfers the interpolation data to the CNC, which will translate the values to the servo commands to control the motion of a machine tool. In effect, the production of the prediction and correction is abundant enough to fill the FIFO buffer up, as these two modules are running continually in the background. Meanwhile, the consumption speed of the interpolation module is fairly low, due to the fact that it is performed periodically. Obviously, the proposed prediction–correction scheme replaces the time constraint with a space constraint. This makes it possible to further shorten the sample period in order to improve the accuracy of the tool path.

5. Experiments

To substantiate the efficacy of the proposed method, a comprehensive simulation study was conducted. Utilizing the diamond-shaped example depicted in Figure 1, this study compared it with two established approaches—adaptive feedrate planning and jerk-limited feedrate planning. The resulting feedrate, acceleration, and jerk profiles post-planning are illustrated in Figure 9. Due to the symmetrical nature of the diamond shape, only half of the curve is displayed for clarity.
In addition, the simulation results of the total machining time are listed in Table 2.
Figure 9 presents the parameter domain results for the adaptive, jerk-limited, and proposed feedrate planning methods. The adaptive planning method shows significant acceleration and jerk fluctuations at sensitive corners, with maximum values reaching 2.050 × 10 3   mm / s 2 and 5.357 × 10 4   mm / s 3 , respectively. Jerk-limited planning smooths these transitions but sacrifices feedrate, leading to increased machining times, as detailed in Table 2. The proposed method mitigates these dynamic jumps at sensitive corners while maintaining the feedrate profile of adaptive planning in other areas. Although the acceleration and jerk in the proposed method are higher than in jerk-limited planning, they remain within the predefined limits. This approach effectively combines the benefits of both adaptive and jerk-limited planning, offering a comprehensive solution for feedrate adjustment that balances machining accuracy and machine tool dynamics.
In addition to the simulation, a machining experiment was performed on a mini-milling machine. Figure 10 displays the setup, where a custom controller manages the machine’s motion axes, switches, and indicators. A self-develop CNC software running on a PC platform interprets the G-code with NURBS curves from the CAM software (UG NX 10) and sends the commands to the controller via the ethernet. The controller’s interpolator then adaptively adjusts the feedrate based on the NURBS curve’s curvature and computes the axis increments to guide the tool along the path.
As shown in Figure 11, a core with a waved freeform surface in a plastic module is machined as an example to prove the validity and feasibility of the proposed method. The tool path is generated by UG NX8.0, and is then converted to G-code file with NURBS style (compatible with FANUC).
Firstly, an air cutting experiment, removing the tool from the spindle, is carried out to compare the feedrate profiles produced by the adaptive planning and proposed methods. The count values from the encoders of servo motors are recorded at intervals of 5 ms, and then they are integrated into the profile of feedrate, acceleration, and jerk at the cutter location. Due to the fact that the results will not be affected by the cutting condition, they can be used to evaluate the performance of the NURBS interpolator. The measured results are shown in Figure 12.
According to the results from the air cutting experiment, the total machining time is about 614 s when using the method of adaptive feedrate planning, and about 651 s when using the proposed method. The machining efficiency has a slight reduction—no more than 6%—when using the feedrate profile generated by the proposed method. The acceleration and jerk profiles achieved by the adaptive planning method have much larger amplitudes than the ones from the proposed method, and even exceed the limitation values of predefined acceleration and jerk in some areas. Moreover, the profiles generated by the proposed method have a relatively smooth shape, and thus, both the acceleration and jerk are within the allowable range. This can be ascribed to the linear acceleration/deceleration profile added to the original one generated by adaptive planning, to limit the acceleration and jerk within the threshold. In addition, a wave shape can be observed from the feedrate profile, which happens to be the shape of the machined surface.
Furthermore, the feedrate profile generated by the proposed method displays a wave shape, which corresponds to the shape of the machined surface. As depicted in Figure 13, two parts were machined using both adaptive planning and the proposed method. The workpiece material was P20HH, with a feedrate set at 1000 mm/min, a spindle speed at 8000 rpm, a cutting depth at 0.05 mm, and a 5 mm diameter solid-carbide cutting tool was used for finish machining.
According to the machined parts, some flaws could be observed from the part machined by the adaptive feedrate planning at the sensitive corner, which result from the overcut caused by the jumps of machining dynamics at the beginning and end areas of the feedrate profile. A smoother surface, in contrast, could be achieved by the proposed feedrate planning method in the same area, while only paying a cost of a less than 6% longer machining time.
Furthermore, the surface roughness data for the area depicted in Figure 13 are detailed in Table 3. A MarSurfVD 140 roughness meter, manufactured by Mahr Group, was utilized to measure the roughness at three distinct positions within the machined zone. These measurements serve to assess the machining quality across different planning strategies, thereby providing further validation of the effectiveness of the proposed method.
Therefore, a balance point, among accuracy, machining dynamics, and efficiency, can be attained using the proposed comprehensive solution for the NURBS curve interpolation.

6. Conclusions

In this paper, a comprehensive solution for the interpolation of NURBS curves has been developed. Initially, a polynomial representation for calculating the intermediate points, as well as the first and second derivatives of a NURBS curve, was introduced to enhance computational efficiency. Subsequently, an improved adaptive planning approach was presented to adjust the feedrate at sensitive corners, thereby eliminating the abrupt changes in acceleration and jerk in the profiles generated by adaptive planning. In addition, the proposed method reutilizes the remaining part of the feedrate profile calculated by the look-ahead module, rather than discarding them as is commonly carried out in current approaches. Therefore, it will further improve the computational efficiency of NURBS interpolation. Furthermore, an asynchronous mechanism utilizing a production–consumption model was applied to schedule the interpolation and look-ahead modules during the interpolation process, replacing time constraints with space constraints. In this way, we can set a smaller interpolation sampling period to meet the demands of high-speed and high-precision machining.
Consequently, a balance among machining accuracy, dynamics, and efficiency has been achieved through the proposed comprehensive solution for NURBS curve interpolation. The proposed method synthesizes the advantages of adaptive and jerk-limited planning, offering an integrated solution for adjusting feedrate to meet the demands of machining accuracy, efficiency, and stationarity. The effectiveness and correctness of the proposed method have been demonstrated through simulation tests and machining experiments.

Author Contributions

Conceptualization, Z.H. and J.C.; methodology, Z.H. and J.C.; software, J.C.; validation, Z.H.; data curation J.C.; writing—original draft preparation, Z.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Natural Science Foundation of Fujian Province of China, grant number 2022J01544.

Data Availability Statement

Data are contained within the article.

Acknowledgments

Gratitude is extended to Deping Chen for his invaluable technical assistance in the simulation and physical experiments detailed within the paper.

Conflicts of Interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as potential conflicts of interest.

References

  1. Bo, X.; Ding, Y.; Ji, W. An interpolation method based on adaptive smooth feedrate scheduling and parameter increment compensation for NURBS curve. ISA Trans. 2022, 128, 633–645. [Google Scholar]
  2. Liu, H.; Liu, Q.; Sun, P.; Liu, Q.; Yuan, S. A polynomial equation based interpolation method of NURBS tool path with minimal feed fluctuation for high-quality machining. Int. J. Adv. Manuf. Technol. 2017, 90, 2751–2759. [Google Scholar] [CrossRef]
  3. Ji, S.A.; Hu, T.L.; Huang, Z.G.; Zhang, C.R. A NURBS curve interpolator with small feedrate fluctuation based on arc length prediction and correction. Int. J. Adv. Manuf. Technol. 2020, 111, 2095–2104. [Google Scholar] [CrossRef]
  4. Wu, Y.K.; Jiang, B.; Wang, Y.L. Incipient winding fault detection and diagnosis for squirrel-cage induction motors equipped on CRH trains. ISA Trans. 2020, 99, 488–495. [Google Scholar] [CrossRef] [PubMed]
  5. Cheng, M.Y.; Tsai, M.C.; Kuo, J.-C. Real-time NURBS command generators for CNC servo controllers. Int. J. Mach. Tools Manuf. 2002, 42, 801–813. [Google Scholar] [CrossRef]
  6. Wang, G.; Shu, Q.; Wang, J.; Li, L. Research on adaptive non-uniform rational B-spline real-time interpolation technology based on acceleration constraints. Int. J. Adv. Manuf. Technol. 2016, 91, 2089–2100. [Google Scholar] [CrossRef]
  7. Ni, H.; Zhang, C.; Chen, C.; Hu, T.; Liu, Y. A parametric interpolation method based on prediction and iterative compensation. Int. J. Adv. Robot. Syst. 2019, 16. [Google Scholar] [CrossRef]
  8. Lei, W.T.; Wang, S.B. Robust real-time NURBS path interpolators. Int. J. Mach. Tools Manuf. 2009, 49, 625–633. [Google Scholar] [CrossRef]
  9. Liu, M.; Huang, Y.; Yin, L.; Guo, J.W.; Shao, X.Y.; Zhang, G.J. Development and implementation of an NURBS interpolator with smooth feedrate scheduling for CNC machine tools. Int. J. Mach. Tools Manuf. 2014, 87, 1–15. [Google Scholar] [CrossRef]
  10. Heng, M.; Erkorkmaz, K. Design of an NURBS interpolator with minimal feed fluctuation and continuous feed modulation capability. Int. J. Mach. Tools Manuf. 2010, 50, 281–293. [Google Scholar] [CrossRef]
  11. Chen, M.; Zhao, W.S.; Xi, X.C. Augmented Taylor’s expansion method for B-spline curve interpolation for CNC machine tools. Int. J. Mach. Tools Manuf. 2015, 94, 109–119. [Google Scholar] [CrossRef]
  12. Yeh, S.S.; Hsu, P.L. Adaptive-feedrate interpolation for parametric curves with a confined chord error. Comput.-Aid. Des. 2002, 34, 229–237. [Google Scholar] [CrossRef]
  13. Liu, X.; Fahad, A.; Kazuo, Y.; Masahiko, M. Adaptive interpolation scheme for NURBS curves with the integration of machining dynamics. Int. J. Mach. Tools Manuf. 2005, 45, 433–444. [Google Scholar] [CrossRef]
  14. Chen, M.S.; Xu, J.T.; Sun, Y.W. Adaptive feedrate planning for continuous parametric tool path with confined contour error and axis jerks. Int. J. Adv. Manuf. Technol. 2017, 89, 1113–1125. [Google Scholar] [CrossRef]
  15. Zhou, J.; Sun, Y.; Guo, D. Adaptive feedrate interpolation with multi-constraints for five-axis parametric toolpath. Int. J. Adv. Manuf. Technol. 2014, 71, 1873–1882. [Google Scholar] [CrossRef]
  16. Erkorkmaz, K.; Altintas, Y. High speed CNC system design. Part I: Jerk limited trajectory generation and quantic spline interpolation. Int. J. Mach. Tools Manuf. 2001, 41, 1323–1345. [Google Scholar] [CrossRef]
  17. Nam, S.H.; Yang, M.Y. A study on a generalized parametric interpolator with real-time jerk-limited acceleration. Comput.-Aid. Des. 2004, 36, 27–36. [Google Scholar] [CrossRef]
  18. Jia, Z.Y.; Song, D.N.; Ma, J.W.; Hu, G.Q.; Su, W.W. An NURBS interpolator with constant speed at feedrate-sensitive regions under drive and contour-error constraints. Int. J. Mach. Tools Manuf. 2016, 116, 1–17. [Google Scholar] [CrossRef]
  19. Liu, X.; Peng, J.; Si, L.; Zhang, Z. A novel approach for NURBS interpolation through the integration of acc-jerk-continuous-based control method and look-ahead algorithm. Int. J. Adv. Manuf. Technol. 2017, 88, 961–969. [Google Scholar]
  20. Lee, A.C.; Lin, M.T.; Pan, Y.R.; Lin, W.Y. The feedrate scheduling of NURBS interpolator for CNC machine tools. Comput.-Aid. Des. 2011, 43, 612–628. [Google Scholar] [CrossRef]
  21. Lei, W.T.; Sung, M.P.; Lin, L.Y.; Huang, J.J. Fast real-time NURBS path interpolation for CNC machine tools. Int. J. Mach. Tools Manuf. 2007, 47, 1530–1541. [Google Scholar] [CrossRef]
  22. Qin, K. General Matrix Representations for B-spline. Comput.-Aid. Des. 1992, 24, 637–642. [Google Scholar] [CrossRef]
  23. Liu, L.G.; Wang, G.J. Explicit matrix representation for NURBS curves and surfaces. Comput.-Aid. Des. 2002, 19, 409–419. [Google Scholar] [CrossRef]
Figure 1. Diamond shape example.
Figure 1. Diamond shape example.
Actuators 13 00456 g001
Figure 2. Adaptive feedrate planning.
Figure 2. Adaptive feedrate planning.
Actuators 13 00456 g002
Figure 3. Improved adaptive feedrate profile.
Figure 3. Improved adaptive feedrate profile.
Actuators 13 00456 g003
Figure 4. The operation mechanism of the proposed look-ahead module.
Figure 4. The operation mechanism of the proposed look-ahead module.
Actuators 13 00456 g004
Figure 5. The corrections of feedrate and deceleration profile.
Figure 5. The corrections of feedrate and deceleration profile.
Actuators 13 00456 g005
Figure 6. The feedrate profile of the prosed planning.
Figure 6. The feedrate profile of the prosed planning.
Actuators 13 00456 g006
Figure 7. Interpolator modules schedule.
Figure 7. Interpolator modules schedule.
Actuators 13 00456 g007
Figure 8. Feedrate profile generated by the prediction–correction scheme.
Figure 8. Feedrate profile generated by the prediction–correction scheme.
Actuators 13 00456 g008
Figure 9. The profiles of feedrate, acceleration, and jerk.
Figure 9. The profiles of feedrate, acceleration, and jerk.
Actuators 13 00456 g009
Figure 10. Milling machine equipped with a PC-based CNC.
Figure 10. Milling machine equipped with a PC-based CNC.
Actuators 13 00456 g010
Figure 11. Machining part with waved freeform surface.
Figure 11. Machining part with waved freeform surface.
Actuators 13 00456 g011
Figure 12. The profiles of feedrate, acceleration, and jerk.
Figure 12. The profiles of feedrate, acceleration, and jerk.
Actuators 13 00456 g012
Figure 13. Machined parts with different feedrate planning.
Figure 13. Machined parts with different feedrate planning.
Actuators 13 00456 g013
Table 1. Simulation results of three types of representations.
Table 1. Simulation results of three types of representations.
Representation MethodTotal Calculation TimeTotal Interpolation SegmentsTime Per Segment
de Boor9395.57 millisecond34672.71 millisecond
Cox–de Boor7072.68 millisecond34672.04 millisecond
Polynomial797.41 millisecond34670.23 millisecond
Table 2. Simulation results of three types of feedrate planning.
Table 2. Simulation results of three types of feedrate planning.
Feedrate PlanningTotal Interpolation SegmentsTotal Machining Time
Adaptive planning35537.106 s
Jerk-limited planning41338.266 s
Proposed planning35947.188 s
Table 3. Surface roughness measurement values (Ra).
Table 3. Surface roughness measurement values (Ra).
Feedrate PlanningAdaptive PlanningProposed Planning
P13.384 μm1.433 μm
P24.631 μm1.595 μm
P33.585 μm1.408 μm
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Huang, Z.; Chen, J. An Interpolator for a Non-Uniform Rational B-Spline Curve with a High Efficiency and Accuracy Using Polynomial Representations. Actuators 2024, 13, 456. https://doi.org/10.3390/act13110456

AMA Style

Huang Z, Chen J. An Interpolator for a Non-Uniform Rational B-Spline Curve with a High Efficiency and Accuracy Using Polynomial Representations. Actuators. 2024; 13(11):456. https://doi.org/10.3390/act13110456

Chicago/Turabian Style

Huang, Zhuiliang, and Jianxiong Chen. 2024. "An Interpolator for a Non-Uniform Rational B-Spline Curve with a High Efficiency and Accuracy Using Polynomial Representations" Actuators 13, no. 11: 456. https://doi.org/10.3390/act13110456

APA Style

Huang, Z., & Chen, J. (2024). An Interpolator for a Non-Uniform Rational B-Spline Curve with a High Efficiency and Accuracy Using Polynomial Representations. Actuators, 13(11), 456. https://doi.org/10.3390/act13110456

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop