0% found this document useful (0 votes)
10 views10 pages

Simulation of Machining Errors of Bspline and Cspline

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views10 pages

Simulation of Machining Errors of Bspline and Cspline

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Simulation of machining errors of Bspline

and Cspline

El Bechir Msaddek, Zoubeir Bouaziz,


Maher Baili, Gilles Dessein & Mohsen
Akrout

The International Journal of


Advanced Manufacturing Technology

ISSN 0268-3768

Int J Adv Manuf Technol


DOI 10.1007/s00170-016-9276-y

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

Simulation of machining errors of Bspline and Cspline


El Bechir Msaddek 1 & Zoubeir Bouaziz 1 & Maher Baili 2 & Gilles Dessein 2 &
Mohsen Akrout 1

Received: 5 March 2016 / Accepted: 1 August 2016


# Springer-Verlag London 2016

Abstract The high-speed milling operation is widely used in 1 Introduction


industry for the production of aircraft parts, molds, and dies.
The machining based on the polynomial programming (espe- A spline curve is a sequence of curve segments which are
cially Bezier or basic spline (Bspline) and cubic spline connected together to form a single continuous curve. For
(Cspline)) brings an interesting gain in cycle time. However, example, a collection of Bezier curves, connected endwise,
part quality can be degraded by using this type of program- may be called a spline curve. The word “spline” comes from
ming. In this paper, we suggest a simulation methodology for the shipbuilding industry, where it originally meant a thin strip
errors caused by the interpolations: Bspline and Cspline in of wood that is used by designers as a flexible curve [1].
high-speed machining of warped shapes. To do this, we have Mathematical splines were first mentioned by Isaac Jacob
developed analytical models expressing the basic paths of Schoenberg [2] and developed by P. Bezier in relation with a
these interpolations. Then, we have designed a simulation tool CAD/CAM problematic. According to Siemens, the spline
based on these models. Experimental verifications have been functions are intended, mainly, to provide an interface be-
done to validate our approach. tween CAD systems and the machine controllers. Our study
will focus on two types of spline interpolation: Bezier or basic
spline (Bspline) and cubic spline (Cspline).
Keywords Polynomial interpolation . Bspline . Cspline . The Bspline may be defined by a polynomial of third degree
Modeling . Simulation . Errors . High-speed milling or more. Programmed positions are not the points of the curve,
but only control points of the spline. The curve does not pass
directly through these points, but that it “tends” to them. A
control polygon of the spline is created, and it links the control
* El Bechir Msaddek
[email protected] points. According to Siemens, the Bspline is ideal for describing
tool paths in freeform surface machining. The Cspline is an
Zoubeir Bouaziz interpolation by a cubic polynomial. It passes exactly through
[email protected] the points of the curve. It has a low curvature variation.
Maher Baili However, the Cspline has a strong tendency to oscillations be-
[email protected] tween these points. The modification of the Cspline has an over-
Gilles Dessein all effect. The modification of one point influences many blocks.
[email protected] Some studies have stated that spline interpolations are ideal
Mohsen Akrout
for describing tool paths in freeform surface machining.
[email protected] Pateloup et al. [3] have used the interpolation Bspline for
approximating arcs of circle and segments for the pocket ma-
1
ENIS, Unit of Applied Fluids Mechanics of Process Engineering and chining. Langeron et al. [4] have developed a new format
Environment, University of Sfax, Sfax, Tunisia (5xnurbs) for the calculation of 5-axis tool paths using
2
ENIT-INPT, Laboratory Production Engineering, University of Bspline curves. Yang et al. [5] have solved an optimization
Toulouse, Tarbes, France problem to find a Bspline quadratic curve which gives a
Author's personal copy
Int J Adv Manuf Technol

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

where Pi is k + 1 control points.


The Bspline curve C(t) is constructed from k + 1 nth-degree
basis functions Ni , n(t) defined by recurrence on the inferior
2 Simulation methodology
degree (Fig. 2).
We consider the vector known as the knot vector be
The simulation process of machining errors is shown in Fig. 1.
defined T ¼ ðt 0 ; …; t m Þ where T is a non-decreasing se-
We consider in this paper that the theoretical trajectory is
quence of real numbers with ti ≤ ti + 1 and i = 0 , … , m − 1.
the linear interpolation because the simulator of the machine
The t i is called knots. The ith Bspline basis function of
controller interpolates by default the CAD trajectory with the
linear interpolation [9, 12]. After the simulation of the test
piece machining on Mastercam©, we generate the NCI file P3 P5 P6
containing the point coordinates of the tool path in linear in- P2
terpolation. However, it is necessary to determine the real
points of Bspline trajectory as they are calculated by the con-
troller in order to simulate this trajectory under MATLAB©.
The tool path modeling is essential for determining the
P1
Bspline trajectory and the machining errors. Thus, we also
need to simulate the Cspline trajectory. Then, after determin- P4 P7
ing the simulated trajectories, it remains transforming them Fig. 2 Bspline interpolation and approximation of series of points
Author's personal copy
Int J Adv Manuf Technol

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

1 if t i ≤ t≺t iþ1 C ðt Þ ¼ N i;n− j ðt Þ⋅ Pi j ; for j ¼ 0; 1; …; n ð7Þ


N i;0 ðt Þ ¼ ð2Þ i¼0
0 otherwise
t−t i t iþnþ1 −t where
N i;n ðt Þ ¼ ⋅N i;n−1 ðt Þ þ ⋅N iþ1;n−1 ðt Þ ð3Þ
t iþn −t i i t iþnþ1 −t iþ1   j−1
Pij ¼ 1−αij ⋅Pi−1 þ αij ⋅Pij−1 for j≻0 ð8Þ

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Þ

where Bn , i(t) is the Bernstein polynomials X


kþ1
C ðt Þ ¼ N i;n ðt Þ⋅ Pi with T
i¼0
 
Bn;i ðt Þ ¼ Pin ⋅t i ð1−t Þn−i ; i ¼ 0; …; n ð5Þ
¼ t 0 ; t 1 ; …; t u ; t; t uþ1 ; … ð11Þ
where ¼ ð n iÞ is the binomial coefficients.
Pin
The De Casteljau algorithm calculates C(t) recurrently and The new De Boor points are
quickly. ^ i ¼ ð1−αi Þ⋅Pi−1 þ αi ⋅Pi
P ð12Þ
Let P0i ¼ Pi ∀i ¼ 0; …; n, then we built ∀ t ∈ [0, 1] re-
currently the family of points where
8
< 1 if i≤ u−k þ 1
>
Pij ¼ ð1−t Þ⋅Pij−1 þ t⋅Piþ1 αi ¼ 0 if i≥ u þ 1
j−1
for i ¼ 0; …; n−j; j if u−k þ 2 ≤ i ≤ u ð13Þ
>
: t−t i
¼ 1; …; n ð6Þ t uþk−1 −t i

3.2 Cspline interpolation


3.1.3 De Boor algorithm (node insertion)
The interpolation by high-degree polynomials leads some-
The De Boor algorithm provides a method for evaluat- times to large amplitude oscillations. This explains the
ing a Bspline curve. We can find the point of the P3 P5 P6
Bspline curve corresponding to a given parameter value. P2
Any point on a Bspline C(t) has a polar value
C(t, t, … , t), and it can be found by inserting the node
(t) n times. The De Boor algorithm is based on the use
of polar forms. It is easy to understand and is fast and
numerically stable for the evaluation or division of a
P1
Bspline curve C(t) compared with the value of the spe-
P4 P7
cific parameter t. This algorithm presents the generali-
zation of the Casteljau algorithm used for Bezier curves. Fig. 3 Cspline interpolation and approximation of a series of points
Author's personal copy
Int J Adv Manuf Technol

Fig. 4 Modeling of the


Bspline Cspline
machining errors in Bspline (a)
trajectory Control point trajectory
and Cspline (b)
Linear
trajectory
Er

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

Table 1 Zooms of the Bspline trajectory and simulated errors


Zoom Schema Simulated
error
(E, µm)

16
1
15.5
Zoom 1
15

14.5

14

13.5

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.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

134 135 136 137 138 139 140


Author's personal copy
Int J Adv Manuf Technol

Tool path simulated in Cspline


40 the NCU Siemens 840D is based on the model described by
Cspline trajectory
35 Zoom 2 Reference points Rabut for Cspline interpolation. In the following, we will con-
Linear trajectory
30 tinue with this model for the simulation of errors generated
25 Zoom 3 during machining with this type of interpolation.
Table 2 presents the different zooms of some critical areas
Z (m m )

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)

Fig. 7 Simulation of the Cspline interpolation based on the analytical


model
6 Interpretation

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.

According to the model developed previously, the trajectory


of the machining tool can be plotted in Cspline passing by the 7 Conclusion
reference points generated by CAM. The interpolation model
in Cspline, used by the machine controller (Siemens 840D), is After modeling and simulating Bspline and Cspline interpola-
also unknown. First, we simulate the Cspline trajectory by the tions, calculated by the controller, our choice was directed
controller simulator (experimental verification). Then, this tra- towards the method of simulation nodes and associated trajec-
jectory is simulated using the analytical model developed in tories for evaluating the machining errors. We have appreciat-
MATLAB©. Afterward, a comparison is made to determine ed the benefits of this method regarding the accuracy of the
the actual model used by the NCU simulator. recorded values.
Figure 7 shows the Cspline interpolation with linear trajec- After the modeling of the Bspline and Cspline trajectories,
tory and control points (red dots). we have developed a postprocessor of NC file generation for
According to the experimental verification made on the error simulation. The quantification of machining errors to func-
machine Huron KX10 [12], we conclude that the work of tions “spline” as Bspline and Cspline allowed us to achieve
Author's personal copy
Int J Adv Manuf Technol

Table 2 Zooms of Cspline trajectory and simulated errors

Zoom Schema Simulated


error (µm)
1 15.2

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

118 119 120 121 122 123 124 125 126


4 15.4

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)

1000 4. Langeron JM, Duc E, Lartigue C, Bourdet P (2004) A new format


Bspline
for 5-axis tool path computation, using Bspline curves. Comput
800 Cspline
Aided Des 36:1219–1229
600 5. Yang Z, Shen L-Y, Yuan C-M, Gao X-S (2015) Curve fitting and
400 optimal interpolation for CNC machining under confined error
using quadratic B-splines. Comput Aided Des 66:62–72
200
6. Chen M, Zhao W-S, Xi X-C (2015) Augmented Taylor’s expansion
0 method for B-spline curve interpolation for CNC machine tools. Int
Zoom 1 Zoom 2 Zoom 3 Zoom 4 J Mach Tools Manuf 94:109–119
Fig. 8 Histogram comparing the simulated machining errors of 7. Soori M, Arezoo B, Habibi M (2013) Dimensional and geometrical
interpolations: Bspline and Cspline errors of three-axis CNC milling machines in a virtual machining
system. Comput Aided Des 45:1306–1313
relevant results about the accuracy of machining warped shapes 8. He S, Daojiang O, Yan C, Lee C-H (2015) A chord error
by using these types of polynomial interpolations. conforming tool path B-spline fitting method for NC machining
based on energy minimization and LSPIA. J Comput Design Eng
The Bspline interpolation generates fewer errors on the con- 2:218–232
vex and concave shapes of the warped shape, but it generates 9. Msaddek EB, Bouaziz Z, Baili M, Dessein G (2014) Influence of
large errors when crossing the discontinuities in tangency. In interpolation type in high speed machining (HSM). Int J Adv
contrast for the interpolation Cspline, the passage of the trajec- Manuf Technol 72(1–4):289–302
10. Negulescu C (2007-2008) “Interpolation and approximation:
tory by the reference points increases the precision in changes of
Bezier curves”. Aggregation of mathematics. University of
direction, but it causes the deceleration of the machine. Provence, year, CMI
11. Rabut C (2009-2010) “Modeling, part one: natural cubic splines”.
Department of Science and Techniques for Engineers, INSA,
Toulouse
12. E. B. Msaddek, “Optimizing trajectories of milling tools at high
References speed by taking into account the constraints associated with the
MT-NC couple”, Doctoral thesis of the National School of
1. Thomas W. Sederberg, “An introduction to B-spline curves” 2005. Engineers of Sfax, December 24, 2014.

You might also like