Simulation of Machining Errors of Bspline and Cspline
Simulation of Machining Errors of Bspline and Cspline
and Cspline
ISSN 0268-3768
1 23
Your article is protected by copyright and
all rights are held exclusively by Springer-
Verlag London. This e-offprint is for personal
use only and shall not be self-archived
in electronic repositories. If you wish to
self-archive your article, please use the
accepted manuscript version for posting on
your own website. You may further deposit
the accepted manuscript version in any
repository, provided it is only made publicly
available 12 months after official publication
or later and provided acknowledgement is
given to the original source of publication
and a link is inserted to the published article
on Springer's website. The link must be
accompanied by the following text: "The final
publication is available at link.springer.com”.
1 23
Author's personal copy
Int J Adv Manuf Technol
DOI 10.1007/s00170-016-9276-y
ORIGINAL ARTICLE
smoother and more accurate polyline tool path. Chen et al. [6] Theoretical path
have used the Taylor method in order to calculate the param-
eters of the curve Bspline and also to lead to a better accuracy.
Thus, Soori et al. [7] have calculated the dimensional and
Modeling of Bspline and
geometric errors generated by the interpolations proposed by
Cspline curves
CAM systems. He et al. [8] have minimized the chord error by
smoothing a Bspline curve. However, there are few studies
Simulation of tool paths
that analyze the influence of spline interpolations on the nu-
merical control (NC) machining [9]. In practice, the machin-
ing by these functions presents remarkable errors on the work-
Simulation of the machining
piece. This requires the development of a simulation method- errors
ology of these errors.
The simulation method is based on the determination of the Interpretation of results
reference nodes. Since Bspline interpolation assimilates these
nodes as control points, it is necessary to determine the points
Fig. 1 Overall simulation approach
of the Bspline trajectory as they are calculated by the controller
and simulate them with MATLAB©. The difference between
this Bspline trajectory and the theoretical trajectory gives the
into NC files. Subsequently, we analyze the gaps of simulated
machining error caused by this interpolation. Furthermore, the
errors for each interpolation.
Cspline trajectory calculated by the controller passes through
the points generated by CAM. The error simulation of this
interpolation also passes through the gap modeling between
the Cspline trajectory and the theoretical trajectory.
3 Modeling of Bspline and Cspline interpolations
After this step, we develop a post-processor that converts
tool paths of Bspline and Cspline interpolation to NC pro-
3.1 Bspline interpolation
grams including compatible codes with the machine Huron
KX10 3-axis and NCU Siemens 840D. This post-processor
3.1.1 Basic model
is a program containing all information necessary for machin-
ing the workpiece. It converts tool path (spline, linear, etc.) to
According to Šulejic [2], a nth-degree Bspline curve (of order
an NC program in ISO language. The execution process con-
n + 1) is defined by
sists in determining the error gap based on the mathematical
models, selected from the bibliography, of Bspline and X
k
Cspline trajectories. Thereafter, we finish by the interpretation C ðt Þ ¼ N i;n ðt Þ Pi ; with t ∈ ½a; b ð1Þ
of these results and their influences on the machining process. i¼0
the nth degree is defined by the Cox-de Boor recursion According to Sederberg and Šulejic [1, 2], the De Boor
formula algorithm is defined by
X
kþ j
with
3.1.2 De Casteljau algorithm (Bezier curves)
t−t i
αij ¼ and P0j ¼ P j ð9Þ
De Casteljau algorithm is a recursive algorithm which allows t iþnþ1 −t i
presenting the Bezier curves. Thus, the nth-degree Bezier The possibility of node insertion, provided by this algo-
curve is constructed from a descriptor polygon of n + 1 control rithm, allows the addition of a supplementary node in a
points. Bspline curve without changing the curve shapes. The current
According to Negulescu [10], a Bezier curve of n ≥ 1 de- basis of the curve is
gree associated with control points P0 , P1 , … , Pn ∈ ℜd is
called curve C(t) given by the parameterization X
k
C ðt Þ ¼ N i;n ðt Þ⋅ Pi with T
X
n
i¼0
C ðt Þ ¼ Bn;i ðt Þ⋅Pi t∈½0; 1 ð4Þ
i¼0 ¼ ðt 0 ; t 1 ; …; t u ; t uþ1 ; …Þ becomes ð10Þ
Control
Er
Point
Linear trajectory
(a) (b)
widespread use of cubic splines which generate interesting 4 Modeling of machining errors
regularities of obtained curves. The cubic spline is a series
of third-degree polynomials (Fig. 3). The controller simulator interpolates the programmed points
According to Rabut [11], there are several ways to write in CAM by following the algorithm of the polynomial inter-
cubic splines. Here, we present the analytical formula used for polation. Generally, the interpolation generated by the CAM
simulation. We consider locally the spline function as a third- system is the linear interpolation. The points of this interpola-
degree polynomial. For a given x, it is first necessary to deter- tion are considered as control points for Bspline interpolation.
mine the interval [xj … xj + 1[ in which x is located, and then the The Cspline curve passes through these points with sometimes
cubic polynomial is calculated at which the spline is equal to unwanted ripples. Therefore, we deduce the concept of the
this interval. For this, we write the polynomial as a local form, interpolation error “Er.” This error defines the gap between
related to the interval [xj … xj + 1[ (limited development in xj) the trajectories: linear and polynomial (Fig. 4).
2
0 x−x j
pðxÞ ¼ p x j þ x−x j p x j þ p″ x j
2 5 Simulation of machining errors (Bspline
3 and Cspline)
x−x j
þ p0 ″ x j ð14Þ
6
5.1 Bspline trajectory and machining errors
with
The Bspline is usually calculated by algorithms that do not
& p ′ (xj), p ″ (xj), and p ′ ″ (xj) are respectively the first deriv- require evaluating the basic functions where they are at zero.
ative, the second derivative, and the third derivative of the According to the models developed previously, two algorithms
polynomial p(x) in xj. are possible to trace the tool path in Bspline. Since the model
& x and xj are respectively the abscissa of the spline point used by the machine controller (Siemens 840D) is unknown,
and the abscissa of the reference point. we resort to the trajectory simulation by the two algorithms of
De Casteljau and De Boor, in order to know the working
Bezier-curve with 200 control points
40 B-Spline-curve with 200 control points of order 4
linear trajectory
spline of Bezier 40
35 control points
linear trajectory
35 zoom 2 Bspline trajectory
30 control points
30
25
25 zoom 4
Z (mm)
Z (mm)
20
20
15 15
zoom 3
10 10 zoom 1
5 5
0 0
0 50 100 150 0 50 100 150
X (mm) X (mm)
Fig. 5 Simulation of Bspline interpolation (Bezier spline) based on the Fig. 6 Bspline interpolation (basic spline) based on the De Boor
De Casteljau algorithm algorithm
Author's personal copy
Int J Adv Manuf Technol
16
1
15.5
Zoom 1
15
14.5
14
13.5
14.6205
14.62
14.6195
14.619 E
14.6185
14.618
14.6175
3.7235 3.7235 3.7235 3.7235 3.7235 3.7235 3.7235 3.7235 3.7235 3.7235
29.5
2
E
29 260
28.5
28
27.5
60 60.5 61 61.5 62 62.5 63
3
12.6
12.5
12.4 E 160
12.3
12.2
12.1
12
11.9
117.9 117.95 118 118.05 118.1 118.15 118.2
4
17.5
17
16.5 1622
16
15.5
15 E
14.5
20 Zoom 1
15
and the values of the simulated errors.
The simulated errors can reach more than 600 μm in critical
10 Zoom 4
areas. The finer discretization in Cspline causes the increasing
5
of point’s number. So, the error value becomes smaller but the
0
0 50 100 150 machine undergoes more fluctuations.
X (mm)
algorithm that can be treated subsequently. The points of the The maximum simulated errors are about 600 μm for the
tool path generated by CAM (200 points) are considered as Cspline and about 1600 μm for the Bspline. Indeed, there is
control points in the NCU for the Bspline interpolation. a big difference between the errors generated by the two in-
Figure 5 shows the Bspline trajectory of Bezier simulated terpolations. For more precision, during the machining of
by the De Casteljau algorithm with the linear interpolation and warped shapes by smooth interpolations such as interpolations
the control points. based on spline, it is essential to know the order of the error
Figure 6 shows the Bspline trajectory simulated by the De magnitude at the passage of concave and convex forms.
Boor algorithm with the linear interpolation and the control During machining of planar surfaces, the errors generated
points (200 points). by the Bspline interpolation are lower than those generated by
According to the experimental verification on the machine the Cspline interpolation. The defect of the surface machining
Huron KX10 [12] and comparing the simulated trajectory by (zoom 1) is almost nil in Bspline, while it reaches 230 μm in
the machine and those simulated in MATLAB© previously, Cspline (large fluctuations). Thus, the Cspline trajectory is
we consider that the work of the NCU Siemens 840D is based favorable to the change of direction during machining, be-
on the De Boor algorithm for polynomial interpolation of cause it passes through the control points. On the contrary,
Bspline type. In the following, we will continue by this algo- for Bspline trajectory, the error exceeds 1.6 mm when crossing
rithm in order to simulate the generated errors during machin- the discontinuity in tangency (zoom 4). Therefore, the slow-
ing with this type of interpolation. down of the machine diminishes at the passage of discontinu-
Table 1 presents the different zooms of some critical areas ities. This keeps the feed rate near to the set speed. For convex
(areas with maximum errors) and the values of simulated errors. shapes of the warped shape (as shown in zoom 2), the Bspline
The simulation method based on the De Boor algorithm for interpolation reduces the workpiece matter, while the Cspline
the Bspline (basic spline) interpolation has shown good effi- interpolation increases it. The opposite is true for the concave
ciency. The simulated error can reach more than 1.6 mm in shapes. The errors generated on these forms are very close.
critical areas. Figure 8 shows the comparison histogram of the errors
generated by the two interpolations: Bspline and Cspline of
5.2 Cspline trajectory and machining errors four areas of the workpiece.
15
14.8
E
230
14.6
14.4
14.2
0 1 2 3 4 5
2
29.5
29
E
313
28.5
28
27.5
59 59.5 60 60.5 61 61.5 62 62.5 63
3 21
20
19
18
600
E
17
16
15
14
15.2
15
14.8 376
14.6
E
14.4
14.2
14
13.8
136 136.5 137 137.5 138 138.5 139 139.5 140
Author's personal copy
Int J Adv Manuf Technol
1800
2. Šulejic M (2011) Geometric modeling: B-spline and NURBS curves.
1600 University of Salzburg, Department of Computer Science, Austria
1400 3. Pateloup V, Duc E, Ray P (2010) Bspline approximation of circle
arc and straight line for pocket machining. Comput Aided Des 42:
1200 817–827
Errors (µm)