You are on page 1of 16

Robotics and Computer–Integrated Manufacturing 85 (2024) 102640

Contents lists available at ScienceDirect

Robotics and Computer-Integrated Manufacturing


journal homepage: www.elsevier.com/locate/rcim

Toolpath Generation for Robotic Flank Milling via Smoothness and


Stiffness Optimization
Yongxue Chen a, Yaoan Lu b, Ye Ding a, *
a
State Key Laboratory of Mechanical System and Vibration, School of Mechanical Engineering, Shanghai Jiao Tong University, Shanghai 200240, China
b
School of Electromechanical Engineering, Guangdong University of Technology, Guangzhou 510006, China

A R T I C L E I N F O A B S T R A C T

Keywords: Robotic flank milling has outstanding advantages in machining large-scale slender surfaces. Currently, the paths
Robotic milling for this process are mainly generated by optimizing redundant robot degrees of freedom (DoFs) on the basis of
Toolpath optimization conventional 5-axis flank milling paths. This two-step framework, however, does not enable optimal robot ki­
Flank milling
nematic and dynamical performance compared to the direct generation of 6-DoF robot paths, limiting the
Sequential quadratic programming
machining efficiency and effectiveness. This paper presents an optimization method to directly generate a
toolpath with six DoFs for robotic flank milling. Firstly, the kinematic model of the milling system and the
representation of the 6-DoF toolpath are established. Then, the standard geometric error for flank milling that
conforms to the geometric specification is defined, and an efficient algorithm based on conformal geometric
algebra is proposed to solve it. On this basis, the toolpath optimization model with toolpath smoothness and
robot stiffness as objective functions is established. A sequential quadratic programming algorithm is proposed to
solve this highly non-linear problem based on the lexicographic order of arrays. The simulations and experiments
demonstrate that the proposed method has better efficiency, robustness, and effectiveness compared with the
existing methods. Due to the improvement of smoothness and stiffness, the productivity, accuracy, and finish of
the machining are all enhanced.

1. Introduction Five-axis toolpath planning for flank milling has been widely studied,
and its most significant task is to ensure that the geometric errors of the
Since industrial robots (IRs) used for machining offer the advantages machined surface are within the preset tolerance. Some methods [3–6]
of high flexibility, large workspace, and so on, they are increasingly provided discrete cutter locations (CLs) that match the design surface.
adopted by the industry and studied by the academic community. On the Further, the machining error between the adjacent CLs was considered
other hand, when milling ruled surfaces or similar surfaces, flank milling in Ref. [7]. To obtain a continuous toolpath, global optimization is
always offers advantages such as higher machining efficiency than point extensively used. The basic idea of this type of method is to optimize the
milling [1]. Thus, against this backdrop, flank milling with IRs has geometric error between the tool envelope surface and the design sur­
outstanding strengths in large-scale surface machining [2]. face. By representing the toolpath with two B-spline curves, some work
In robotic flank milling, toolpath generation is an indispensable and [8–10] improved the overall accuracy of the machined surface by
critical process, and an excellent path is conducive to machining effi­ adjusting the control points of the two curves. For simplicity of calcu­
ciency and quality. Since most IRs have six degrees of freedom (DoFs), lation, approximated geometric errors were adopted in the optimization.
traditional toolpath planning methods for 5-axis machining tools cannot Based on the minimum zone criterion recommended by the geometrical
be applied directly to this scenario. In fact, due to the convenience, a specification [11], Zhu et al. [1] and Zhang et al. [12] used sequential
two-step framework for toolpath planning is prevalent in robotic mill­ linear programming (SLP) to minimize the maximum value of the geo­
ing. In this framework, the 5-axis toolpath is first generated by tradi­ metric error. Sun et al. [13] and Li et al. [13] considered the cutter
tional computer-aided manufacturing (CAM) methods, and then the runout during the toolpath generation. To further improve the perfor­
robot redundancy is optimized to obtain the 6-DoF path. mance of the tool movement, Zheng et al. [14] and Lu et al. [15]

* Corresponding author.
E-mail addresses: cyxsjtu@sjtu.edu.cn (Y. Chen), luyaoan@gdut.edu.cn (Y. Lu), y.ding@sjtu.edu.cn (Y. Ding).

https://doi.org/10.1016/j.rcim.2023.102640
Received 18 May 2023; Received in revised form 16 July 2023; Accepted 29 August 2023
Available online 7 September 2023
0736-5845/© 2023 Elsevier Ltd. All rights reserved.
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

formulated and solved the smooth toolpath optimization problems. The remainder of the paper is organized as follows. Section 2 gives
Recently, He et al. [16] explored the toolpath generation for multi-pass the background for robotic flank milling. In Section 3, a CGA-based al­
flank milling of a general complex part surface. gorithm is presented to calculate the standard geometric error and its
Based on the 5-DoF toolpath, the 6-DoF robot path can be obtained first-order differential increment. The toolpath optimization model for
by resolving the robot redundancy, which is always defined as the robotic flank milling is developed in Section 4, and the modified SQP-
rotation angle around the tool axis. Scholars have conducted research on based algorithm is proposed to solve it. Simulations and experimental
redundancy optimization in recent years based on various objectives. To validation of the proposed method are shown in Section 5. Section 6
improve the milling accuracy and overcome the inherent defects of ro­ gives the conclusion.
botic machining, Xiong et al. [17] and Liao et al. [18] took the robot
stiffness performance as the objective in the toolpath optimization. Chen 2. Background for robotic flank milling
et al. [19] minimized the proposed comprehensive tool deformation
index, and Lin et al. [20] used the contour error as an optimization 2.1. Kinematic model of the robotic flank milling system
objective. Recently, Hou et al. [21] proposed a redundancy optimization
method based on the surface location error, improving the machining For the robotic flank milling system shown in Fig. 1, the toolpath is
accuracy and surface quality. To enhance the machining productivity, usually defined by a curve C(u) in the special Euclidean group SE(3),
Peng et al. [22] and Lu et al. [23] optimized the smoothness perfor­ which denotes the transformation describing the position and orienta­
mance index of the joint paths by using SLP and the differential evolu­ tion of the tool coordinate system {TCS} with respect to (w.r.t.) the
tion (DE) method, respectively. Dai et al. [24] proposed a greedy workpiece coordinate system {WCS}. Thus, the kinematic model from
algorithm to enhance the jerk of robot motion and obtained better the robot base coordinate system {BCS} to the robot task pose can be
machining quality. represented as
Although the above two-step framework is convenient to use, it is
unable to yield the optimal kinematic and dynamic performance of IRs. TBCS BCS FCS
WCS C(u) = TFCS (θ(u))TTCS (1)
This is because the robot performance is not considered in the first step,
i.e., the 5-DoF path generation. Thus, the direct planning of the 6-DoF θ = [θ1 , ⋯, θ6 ]T ∈ R6 is the joint variable vector. {FCS} is the flange
robot path is a better choice. coordinate system, and TBCS BCS FCS
WCS , TFCS , and TTCS denote transformations
In fact, in the field of robotic point milling, there has been some work describing the position and orientation of {WCS} w.r.t. {BCS}, {FCS} w.
exploring the simultaneous optimization of the tool axis direction and r.t. {BCS}, and {TCS} w.r.t. {FCS}, respectively.
the robot redundant DoF. For example, for robotic ball-end milling,
some methods [25–28] were proposed to improve the toolpath 2.2. Representation of the toolpath
smoothness and robot stiffness. Besides, our previous work [29] pre­
sented a posture optimization method for robotic flat-end milling based [ ]
R(u) p(u)
on sequential quadratic programming (SQP). Compared with the The toolpath C(u) ∈ SE(3) has the form C(u) = ,
0 1
two-step framework, the path smoothness was effectively enhanced.
where p(u) ∈ R3 and R(u) ∈ SO(3) denote the position of the tooltip
According to the above, there is reason to believe that the direct
point (TTP) and the tool orientation respectively, and SO(3) is the spe­
optimization of the 6-DoF path has prominent advantages in robotic flank
cial orthogonal group. In this paper, p(u) is represented as a B-spline
milling. Namely, the robot machining performance would be improved
curve with the control points wp ∈ Rm1 .
compared with the two-step framework. However, research about this is
To represent the tool orientation properly, the exponential co­
lacking due to the relatively high number of variables, the complexity of
ordinates of rotations are introduced. Any rotation matrix R in SO(3) has
tool positioning and machining error evaluation in flank milling [30]. To
address this problem, a direct planning approach for the flank milling the formR = exp([ω]), where ω = [ω1 , ω2 , ω3 ]T ∈ R3 is the exponential
⎡ ⎤
toolpath of a 6-DoF robot is proposed in this paper. Firstly, the kinematic 0 − ω3 ω2
model of the robotic flank milling system is established. Then, a new coordinates of R, and [ω] = ⎣ ω3 0 − ω1 ⎦ is an element in the
− ω2 ω1 0
representation of the toolpath for robotic milling is proposed based on
two B-splines in the Cartesian space and the rotation parametric space. To Lie algebra so(3). By using the exponential function exp, a curve in so(3)
conform to the geometrical specification [11], an efficient iterative al­ could be mapped to a curve in SO(3). On this basis, the tool orientation
gorithm is presented to calculate the standard geometric errors based on path R(u) is represented as
conformal geometric algebra (CGA). On this basis, by taking the path R(u) = R0 exp([o(u)]) (2)
smoothness and robot stiffness as objective functions, a toolpath optimi­
zation model is developed considering constraints of joint angle,
machining geometric error, and robot singularity. This problem is difficult
to solve due to a large number of optimization variables, the highly
non-linear objective and constraint functions. By refining the SQP-based
algorithm proposed in our previous work [29] using the lexicographic
order of arrays, the optimization problem is solved efficiently and effec­
tively. Finally, the advantages and the validity of the proposed method
are demonstrated in simulations and experiments.
The contributions of this paper are mainly in the following areas. (1)
A path generation method specifically for robotic flank milling is dis­
cussed and proposed, improving the toolpath smoothness and robot
stiffness at the same time. (2) With the help of the proposed efficient
error-solving algorithm, a specification-compliant geometric error
definition is adopted during the flank milling toolpath optimization
process for the first time, thus the machining accuracy is enhanced. (3)
Using the lexicographic order of arrays, the modified SQP-based algo­
rithm has outstanding robustness, execution efficiency, and optimiza­
tion effectiveness. Fig. 1. Schematic of the robotic milling system.

2
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

where o(u) ∈ R3 is a B-spline curve, and R0 ∈ SO(3) denotes a fixed ν = det(Ctt ) (11)
orientation in {WCS}, which is introduced to ensure that the orientation
path is invariant with the selection of the reference system. A smaller value of ν indicates better stiffness of the robot.
T m2
Let wo = [w1o , w2o , ⋯, wm
∈ R denotes the control points of o(u).
2
o ]
The derivative of R(u) w.r.t. wio could be obtained by 2.4. Smooth criterion for toolpaths

∂R(u) ∂exp([o(u)]) The smoothness of the toolpath plays an important role in the robot’s
= R0 , i ∈ 1, 2, ⋯, m2 (3)
∂wio ∂wio motion performance. This section gives the definition of the smoothness
performance index of the robot joint path.
where
Uniform sampling of the path parameter u yields n sampling points
[ ]
∂exp([o(u)]) ∂o(u) {u1 , u2 , ⋯, un }. A joint path smoothness index for 6-DoF robots is pro­
= exp([o(u)]) A(o(u)) (4) posed in our previous paper [29] with the following expression.
∂wio ∂wio
Φ = k1 Φ1 (w) + k2 Φ2 (w) (12)
1 − cos‖ o(u) ‖ ‖ o(u) ‖ − sin‖ o(u) ‖
A(o(u)) = I − [o(u)] + [o(u)]2 (5)
‖ o(u) ‖2 ‖ o(u) ‖3 where
and ‖ ⋯ ‖ represents the 2-norm of vector in Euclidean space. n ∑
∑ 6
( )2
Note that in this paper, the combination of the control points of the Φ1 = ϕij1 dsi (13)
[ ] i=1 j=1
wp
two splines, i.e., w = ∈ Rm1 +m2 , is referred to as the control points
wo n ∑
∑ 6
( )2
of the toolpath and is used as the optimization variables for the toolpath Φ2 = ϕij2 dsi (14)
generation process. i=1 j=1

⎧ j

⎪ θ2 − θj1
2.3. Singularity and stiffness index of the robot ⎪


⎪ Δs1
,i = 1



⎨ j
θn − θjn− 1
To ensure the robot’s manipulability, singularity should be avoided ϕij1 = ,i = n (15)
⎪ Δsn− 1
when performing milling tasks. The widely used condition number of ⎪

⎪ ( )

the normalized Jacobian matrix could be used to measure how close the ⎪


⎪ Δs2 θji+1 + Δs2i − Δs2i− 1 θji − Δs2i θji− 1
⎩ i− 1 , i = 2, ⋯, n − 1
robot is to the singularity [31]. Denote the Jacobian at the TTP (Δsi + Δsi− 1 )Δsi− 1 Δsi
expressed in {BCS} as J. The expression of the condition number is
⎧ j
1 ⎪
⎪ θ3 − θj2 θj1 − θj2
(6) + ,i = 1
− 1 ⎪
κ = ‖ J ‖F ‖ J ‖F ⎪
⎪ Δs1 Δs2 Δs21
6 ⎪



⎨ j
θn− 2 − θjn− 1 θjn − θjn− 1
where ‖ ⋯ ‖F is the Frobenius norm of the matrix, and ϕij2 = + ,i = n


⎪ Δsn− 1 Δsn− 2 Δs2n− 1
[ ] ⎪

J /L ⎪
J= v (7) ⎪

⎪ 2θji− 1 2θji 2θji+1
Jω ⎩ − + , i = 2, ⋯, n − 1
Δsi− 1 (Δsi + Δsi− 1 ) Δsi− 1 Δsi Δsi (Δsi + Δsi− 1 )
L denotes the characteristic length which could be solved by the method (16)
proposed in Ref. [31], and Jv and Jω are the rows of Jacobian J corre­ ⎧
sponding to the linear and angular velocity, respectively. ⎨ Δs1 /2, i = 1
dsi = Δsn− 1 /2, i = n (17)
For simplicity of calculation, a value μ proportional to the square of κ ⎩
(Δsi− 1 + Δsi )/2, i = 2, ⋯, n − 1
is adopted as the singularity index in this paper.
( T ) ( − T − 1) j
μ = Tr J J Tr J J (8) and Δsi = ‖ p(ui+1 ) − p(ui ) ‖, θi = θj (ui ), k1 and k2 are two weighting
coefficients.
where Tr(⋯) denotes the trace of a matrix. Based on the definition, a Note that the choice of k1 and k2 in Eq. (12) depends heavily on the
small value of μ is expected. magnitude relationship between Φ1 and Φ2 , and a poor choice can lead
Robots are less stiff than machine tools, which could result in poorer to an unreasonable smoothness index. To facilitate the selection of
machining quality. Therefore, it is important to improve the robot weights, the index is modified by normalization as follows.
stiffness during machining. An index proportional to the volume of the
Φ1 (w) − Φ1,min Φ2 (w) − Φ2,min
stiffness ellipsoid is proposed in Ref. [32] as Φ= +α (18)
Φ1,max − Φ1,min Φ2,max − Φ2,min
/√
K=1 3det(Ctt ) (9)
where α ≥ 0 is a weight coefficient, Φ1,min and Φ1,max are the minimum
and maximum values of Φ1 when w is in a reasonable range, and Φ2,min
where
and Φ2,max are that of Φ2 .
Ctt = J11 K−111 JT11 + J12 K−221 JT12 (10)
3. Geometric deviation evaluation
J11 and J12 are the first three and last three columns of Jv respectively,
K11 and K22 are submatrices of the joint stiffness matrix Kθ = Based on the tool swept envelope surface obtained by the analytical
[ ]
K11 0 methods in Ref. [34–36], the geometric error between the design surface
. Kθ could be obtained by some experiment-based methods
0 K12 and the envelope surface could be defined, and flank milling tasks often
[33]. require this deviation to be less than a certain threshold value.
For computational convenience, the following index is used to The standard error defined in the geometric specification [11] is the
measure the stiffness in this paper. normal distance from the point on the design surface to the envelope, as

3
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

shown in Fig. 2 (a). Though this definition is widely used in industry,


calculations based on it are time-consuming in optimization. For
simplicity, approximate errors are always applied, such as the normal
distance from points on the envelope to the design surface (Fig. 2 (b))
and the shortest distance (Fig. 2 (c)). However, using the approxima­
tions, the local maximum error and the error at the edges in some cases
cannot be optimized. To tackle this problem, this section proposes an
efficient method based on CGA to solve the standard errors. The basics of
CGA used here are given in the appendix. Note that in this section, there
are two representations for any point: the Euclidean model representa­
tion in bold and the conformal model representation in italics.

3.1. Iterative solving algorithm

To efficiently calculate standard errors, an iterative solving algo­


rithm is proposed here.
Denote the tool swept envelope surface as X(u, v) and the design
surface as Xdesign . A sampling of Xdesign defines a set of points {pi ,i = 1,2,
⋯, nq }. As shown in Fig. 2 (a), for any point pi on Xdesign , define the
normal line of the surface which passes through pi as li , and define the
intersection between li and X(u, v) as qi . Then the normal distance dpi ,X
between pi and X(u, v) is equal to the distance between pi and qi .
Suppose the normal of Xdesign at point pi is ni . In CGA, the direct
representation of li is
l i = pi ∧ n i ∧ e ∞ (19)
Since qi belongs to li , the following condition, i.e., Eq. (20), is
satisfied
li ∧ qi = 0 (20)
As a result, qi = X(ui , vi ) can be calculated by solving the equation
fi (u, v) = 0 (21)
Fig. 2. The geometric error definition for flank milling.
where
fi (u, v) = li ∧ X(u, v) (22) On this basis, the standard error at point pi is defined as the following
signed distance
and X(u, v) is the conformal model representation of X(u, v).
To find qi with higher efficiency, an iterative procedure is proposed, di = (qi − pi )⋅ni (27)
as shown in Algorithm 1 and Fig. 3. At the current iteration qki = X(uki ,
where pi and qi are the Euclidean model representation of pi and qi
vki ) in Fig. 3, the tangent plane of X is represented as Tik . In CGA, the respectively.
direct representation of the plane is
( ) ( )
Tik = qki ∧ Xu uki , vki ∧ Xv uki , vki ∧ e∞ (23) 3.2. The first-order differential increment

where Xu and Xv are the partial derivatives of X(u, v) w.r.t. parameters u To facilitate the execution of the toolpath optimization algorithm in
and v, respectively. The intersection of li and Tik is calculated by Section 4, this section gives an expression for the first-order differential
increment of the above distance di w.r.t. to the toolpath control points
( k )∗ ( )∗
Fi = l∗i ∧ Tik (24) w = [w1 , w2 , ⋯, wm1 +m2 ].
In the process of toolpath optimization, the envelope could be
Note that Fik is the flat point corresponding to mki , i.e., Fik = mki ∧ e∞ . regarded as a function of w, thus represented as X(w; u, v) in the
The Euclidean model representation of mki can be obtained by Euclidean model and X(w; u, v) in the conformal model. On this basis, the
∑3 [ ] intersection point qi is also a function of w and is denoted as qi (w) in the
mki = j=1
Fik ⋅(0.5e∞ − e0 )⋅ej ej (25) Euclidean model and qi (w) in the conformal model.
Since qi (w) is a point on X(w; u, v), its first-order differential incre­
On this basis, the direction of iteration [Δuk Δvk ]T is calculated by
ment is
solving Eq. (26).
[ ( k k) ( )] Δqi (w)
Xu ui , vi Xu uki , vki [Δuk Δvk ]T = mki − qki (26) [ ] [ ]
∂X(w; u, v) ∂X(w; u, v) ∂X(w; u, v) ∂X(w; u, v)
≈ [Δu Δv]T + , ⋯, Δw
where qki is the Euclidean model representation of qki . ∂u ∂v ∂w1 ∂wm1 +m2
(28)
For an appropriate step size kstep , set [uk+1
i ,vk+1
i ] = [uki ,vki ] + kstep [Δuk ,
Δvk ], yielding the next iteration qk+1i = X(uk+1
i , vk+1
i ). By repeating this where Δw = [Δw1 , ⋯, Δwm1 +m2 ]T . Similarly, according to Eq. (22), the
process, qi = X(ui , vi ), the intersection of li and X, is derived. first-order differential increment of fi (w; ui , vi ) is
For the choice of the initial guess q0i , the readers are referred to
Ref. [12]. The step size kstep can be obtained by the bisection method.

4
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

Algorithm 1
Algorithm for the computation of intersection qi

Δfi (w; ui , vi ) ≈ Mu,v T w


i [Δu Δv] + Mi Δw (30)

where Mu,v i ∈R
4×2
, Mwi ∈ R4×(m1 +m2 ) . Note that after changing w,
fi (ui , vi ) = 0 should still be satisfied. Thus, we have
Δfi (w; ui , vi ) = 0 (31)
The least-square method can be adopted to estimate the increments
of the parameters of X
[ ]
u,v − 1
(32)
T T
[ΔuΔv]T = − (Mu,v
i ) Mi (Mu,v w
i ) Mi Δw

Substituting Eq. (32) into Eq. (28), one can obtain


Fig. 3. Intersection computation.
Δqi (w)
{ [ ] [ ]}
∂X ∂X [ u,v T u,v ]− 1 u,v T w ∂X ∂X
Δfi (w; ui , vi ) ≈ − (Mi ) Mi (Mi ) Mi + , ⋯, Δw
[ ] [ ] ∂u ∂v ∂w1 ∂wm1 +m2
∂fi (w; u, v) ∂fi (w; u, v) ∂fi (w; u, v) ∂fi (w; u, v)
≈ [Δu Δv]T + , ⋯, Δw = Mi Δw
∂u ∂v ∂w1 ∂wm1 +m2
(33)
(29)
According to Eq. (27), the first-order differential increment of di is
Since Δfi belongs to the space spanned by e0 e1 e2 e∞ , e0 e1 e3 e∞ ,
e0 e2 e3 e∞ , and e1 e2 e3 e∞ , it can be represented by a vector of four ele­ Δdi = Δqi ⋅ni
(34)
ments. Then Eq. (29) has another form as follows: = nTi Mi Δw

5
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

problem. Denote k as the iteration number. Near w = wk− 1 , the objective


4. Toolpath optimization model and algorithm function needs to be approximated as a quadratic function and the
constraint functions need to be linearized.
4.1. Optimization model The first-order differential increment of θi is obtained by

When machining a surface, small geometric errors are desired. In


m∑
1 +m2
dθi ∂θi
Δθi = Δw = Δwj (45)
addition, the movement of the joints should be limited and the singu­ dw j=1
∂wj
larity of the robot should be considered. Better path smoothness and
robot stiffness both contribute to higher machining quality, so both need where ∂θi /∂wj can be calculated by differentiating Eq. (1). Specifically,
to be optimized. It is reasonable to take the maximum value of the
stiffness index ν at all sampled CLs as the stiffness index of the whole ∂θi 1
= J−TCP t (46)
path. Thus, the toolpath optimization problem is constructed as ∂wj
Problem 1: [ ]
v
where JTCP is the Jacobian at TTP expressed in {TCS}. t = ∈ R6 is
max{νi } − νmin ω
minΨ = Φ + β (35)
w νmax − νmin
the spatial velocity of {TCS} w.r.t. wj , and its matrix representation [t] =
( )
subject to i = 1, 2, …, n, j = 1, 2, …, nq (36) [
[ω] v
]
is obtained by
0 0
θi = f − 1 (p(ui ), o(ui )) (37)
∂C(ui )
[t] = C(ui )− 1
(47)
θmin ≤ θi ≤ θmax (38) ∂wj
[ ]
θLP ≤ θ3i − θ2i ≤ θUP (39) ∂R(u)/∂wj ∂p(u)/∂wj
where [ω] ∈ so(3), ∂C(u)
= , and ∂R(u)/∂wj is
0 ∂wj 0
dmin ≤ dj ≤ dmax (40) calculated by Eq. (3). For more details about the Jacobian and velocity
kinematics of the robot, the readers can refer to Ref. [37].
μi < δ (41) Based on Eq. (45), the objective Φ defined by Eq. (18) could be
approximated as a quadratic function w.r.t. w [29]. It has the form Φ
̃ =
where β ≥ 0 is a weight corresponding to the robot stiffness, θi = θ(ui ) =
T
ΔwT HΔw + 2f T Δw + c, with H a positive definition matrix, f a vector,
[θ1i , ⋯, θ6i ] , and νi = ν(θi ). νmin and νmax are the minimum and maximum and c a scalar.
values of ν when w is in a reasonable range, which are used for To linearize constraints (44), (40) and (41), the differential in­
normalization. f − 1 (⋯) denotes the inverse kinematics of the robot with a crements of dj , νi , and μi are required. The increment of dj is obtained by
closed-form solution. θmin and θmax are the lower and upper bounds of the Eq. (34) with the form Δdi = nTi MΔw.
joint variable vector. Constraint (39) is an additional joint limit for the For j = 1, ⋯, 6, the derivatives of ν w.r.t. robot joint angles could be
robot with a local parallel mechanism such as ABB IRB-6660, and θUP and obtained analytically.
θLP are the corresponding upper and lower bounds. dmin and dmax are the [ ]
preset limits of the geometric error. μi = μ(θi ), and δ is a preset threshold ∂νi
= νTr C− 1 ∂Ctt
(48)
for singularity avoidance.
tt
∂θji ∂θji
Thanks to the normalization process, the choice of α in Eq. (18) and β
in Eq. (35) is relatively simple. A reasonable choice is to make them both According to Eq. (10), ∂Ctt /∂θji could be found based on ∂J11 /∂θji and
1, and this is the choice we have made in all our tests. Of course, if the ∂J12 /∂θji . Since ∂J/∂θji has an analytical expression [38], ∂J11 /∂θji and
effect of one of the terms in the objective function needs to be ∂J12 /∂θji also do.
strengthened or weakened, the corresponding weight can be adjusted On this basis, the increment of ν is
around 1 as required. ( )T ( )T
By a simple deformation and introduction of a new parameter ψ , Δνi =
dνi
Δθi =
dνi dθi
Δw (49)
Problem 1 has the following new form. dθi dθi dw
Problem 2:
T
where dνi /dθi = [∂ν/∂θ1i , ⋯, ∂ν/∂θ6i ] .
ψ − νmin
minΦ + β (42) According to Eq. (8), we have
w,ψ νmax − νmin
( T ) ( − T − 1)
( ) ∂μi ∂J J ( − T − 1) ( T ) ∂J J
subject to i = 1, 2, …, n, j = 1, 2, …, nq (43) = Tr Tr J J + Tr J J Tr (50)
∂θji ∂θji ∂θji
ψ ≥ νi (44)
− 1
where j = 1, ⋯, 6. The above equation involves the calculation of ∂J /
Constraints (37-41) ∂θji and ∂J/∂θji . The first term is obtained by
− 1
∂J − 1 ∂J −
(51)
1
4.2. Local approximation =− J J
∂θji ∂θji
Problem 2 is nonconvex, and all the objective function and the j j
and according to Eq. (7), ∂J/∂θi is obtained with the help of ∂Jv /∂θi and
constraint functions are highly nonlinear. Thus, it is relatively difficult
to solve Problem 2. The optimization efficiency and effect of most ∂Jω /∂θji , which are parts of ∂J/∂θji .
existing general solvers are unacceptable for this problem. As shown in On this basis, the increment of μ is
our previous work [29], the SQP-based algorithm is a valid method for ( )T ( )T
dμi dμi dθi
solving this type of problem. The most critical step in this process is to Δ μi = Δθi = Δw (52)
dθi dθi dw
locally approximate the problem as a quadratic programming (QP)

6
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

T 4.3.3. SQP based on the lexicographic order of arrays


where dμi /dθi = [∂μ/∂θ1i , ⋯, ∂μ/∂θ6i ]
An efficient and effective SQP-based algorithm is proposed in our
Based on the above, near parameter wk− 1 , Problem 2 could be previous paper [29], but note that it cannot be employed directly to
approximated as the following QP problem. solve Problem 2 for the following reasons. Firstly, the algorithm cannot
Problem 3 accept initial solutions that do not satisfy the constraints. Yet, there is a
min ΔwT HΔw + 2f T Δw + βΔψ / (νmax − νmin ) (53) high probability that the initial solution obtained in Section 4.3.1 does
Δw,Δψ
not satisfy constraint (40). Secondly, for normalization, boundary values
( ) Φ1,min , Φ1,max , Φ2,min , Φ2,max , νmin and νmax are used. Since their values
subject to i = 1, 2, …, n, j = 1, 2, …, nq (54) obtained in Section 4.3.2 are approximations, they may need to be
( )T updated during optimization. This means that the objective function
ψ (wk− 1 ) + Δψ ≥ νi (wk− 1 ) +
dνi dθi
Δw (55) changes during the iterative optimization process, but the existing al­
dθi dw gorithm is not able to handle this. Finally, there is room for improve­
ment in updating the range of optimization variables to enhance the
dθi
θmin ≤ θi (wk− 1 ) + Δw ≤ θmax (56) optimization efficiency.
dw To address the above issues, this section modifies the SQP-based
( ) algorithm. Before showing the algorithm, the definition of the lexico­
dθ3i dθ2i
θLP ≤ θ3i − θ2i + − Δw ≤ θUP (57) graphic order of arrays is given. Suppose that f1i and f2i are scalars for
dw dw
any positive integer i. If k > 1, the lexicographic order between (f11 , f12 ,
⋯, f1k ) and (f21 , f22 , ⋯, f2k ) is defined as follows.
dmin ≤ dj (wk− 1 ) + nTi Mi Δw ≤ dmax (58)
(f11 , f12 , ⋯, f1k )〈(f21 , f22 , ⋯, f2k )
( )T ( )〈( )
dμi dθi
μi (wk− 1 ) + Δw < δ (59) ⎧
⎪ f11 , f12 , ⋯, f1(k− 1) f21 , f22 , ⋯, f2(k− 1) , if f1k , f2k < 0
dθi dw ⎪
⎨( )〈( ) (61)
⇔ f11 , f12 , ⋯, f1(k− 1) f21 , f22 , ⋯, f2(k− 1) , if f1k = f2k
Δwlower ≤ Δw ≤ Δwupper (60) ⎪


f1k < f2k , otherwise
Constraint (60) is introduced to limit the range of Δw since the
approximation of the problem only holds in the neighborhood of wk− 1 .
(f11 )〈(f12 ) ⇔ f11 < f12 (62)
Δwupper and Δwlower are positive and negative vectors respectively.
The modified algorithm is shown in Algorithm 2, which solves
4.3. Solving process Problem 2 by iteratively solving approximate QP problems. Compared
with the algorithm given in Ref. [29], the main refinements of Algo­
The overall process of solving Problem 2 consists of three parts: rithm 2 are as follows. (1) The comparison of optimization results in
generating the initial solution, obtaining the approximate boundary iterations is defined by the lexicographic order of the arrays consisting of
values, and solving with an SQP-based algorithm. The three parts are the objective and constraint functions, not just the values of the objec­
described in detail in this section. tive function. (2) The objective function is updated iteratively. (3) When
the elements in the resulting optimization variables Δw are close enough
4.3.1. Generating the initial solution to Δwupper or Δwlower , the corresponding elements in the boundaries are
To solve Problem 2 by using the SQP-based algorithm, an appro­ expanded appropriately. Thanks to the refinements, the modified algo­
priate initial solution w0 is needed. It is obtained in three steps. Firstly, a rithm has better robustness and computational efficiency.
series of CLs consisting of TTP positions and tool axis directions are
obtained by using Chiou’s method [4]. Secondly, the redundant angles, 5. Simulations and experimental validations
i.e., the angles of rotation of {TCS} around the tool axis, at all the ob­
tained CLs are resolved by the graph-based method [22]. Finally, based In this section, the effectiveness and efficiency of the proposed
on the tool axis directions and redundant angles, a series of tool poses toolpath optimization method are validated through simulations and
represented by rotation matrices are obtained. By using the method experiments.
given in Ref. [39], the B-splines representing the TTP position and tool
orientation are acquired by interpolating the coordinates of TTPs and 5.1. Comparison methods
the exponential coordinates of the rotation matrices, respectively. Then,
w0 is the control points of the two curves. Using the ε constrained DE with gradient-based mutation (εDEg),
Ref. [15] proposed a smooth toolpath optimization algorithm for 5-axis
4.3.2. Obtaining the approximate boundary values flank milling, and it could be adopted to solve Problem 2 with a simple
Note that the boundary values Φ1,min , Φ1,max , Φ2,min , Φ2,max , νmin and adaptation. It is thus used as a comparison method and denoted as DE in
νmax need to be given before the optimization, but solving the accurate the following.
values of them is difficult and time-consuming. Therefore, a reasonable In section 5.4, a two-step method, i.e., planning the robot’s redun­
choice is to obtain their approximations by sampling in a range. Spe­ dant angle path on the basis of a 5-DoF tool path, is also used as a
cifically, by sampling randomly in a preset vicinity around w0 , we can comparison method. The two-step method here is similar to the initial
get a cascade of toolpaths. Calculate Φ1 , Φ2 , and {νi , i = 1, ⋯, n} for each solution generation method given in Section 4.3.1. The difference is that
sampled toolpaths, and their maximum and minimum values are used as the 5-axis toolpaths in the first step are generated using the method
the approximate boundary values. proposed in Ref. [12] in order to ensure error constraints. Note that due
As for the choice of the sampling range, it should be noted that a to the limitations of the graph-based method, the stiffness index is not
relatively small range is sufficient and gives a good optimization result, considered in this method.
as the boundary values provided here will be updated during iterations
of the subsequent optimization. In practice, based on the initial path, the 5.2. Validation of the geometric deviation
average of the coordinate differences of all adjacent control points can
be used as a reference. In our tests, the length of the sampling interval is In this section, the validity of the definition and solving algorithm for
set to about one percent of this average value. standard errors is demonstrated by simple 5-axis toolpath planning

7
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

Algorithm 2
SQP-based algorithm for toolpath optimization in robotic flank milling

simulations. The error definition and evaluation method proposed by obtained by Zhang’s method are much larger. This is mainly because the
Zhang et al. [12] are used as a comparison method. In Ref. [12], the two error definitions differ greatly in their extremes at the edges.
geometric error is defined as the shortest distance from the point on the Both methods are implemented using MATLAB R2022b, and Table 2
design surface to the envelope surface, which is referred to as the shows the computing time. Note that for the convex surface, the reason
approximate error in this section. Based on the two definitions of error, the proposed method takes longer is that the initial maximum standard
the SLP method proposed in Ref. [12] is adopted to optimize the tool­ error (0.26mm) is much larger than the initial maximum approximate
path to minimize the maximum error. error (0.17mm). Overall, the computational efficiency of the standard
The two surfaces appearing in Ref. [6] are used as design surfaces. error is at the same level as that of the approximate error.
They are defined by two guiding quadratic Bézier curves T(u) and B(u),
whose control points are shown in Table 1. We use the same cutter as in 5.3. Simulation verification of the optimization algorithm
Ref. [6], which has a tip radius of 3.175mm, a cut length of 60 mm, and a
taper angle of 15∘ . In this section, the simulation of milling a blade is given to verify the
The optimization results are shown in Fig. 4 and Table 2. It is illus­ effectiveness and efficiency of the modified SQP-based algorithm pro­
trated that the proposed method reduces the maximum geometric de­ posed in Section 4, and the DE algorithm is used for comparison. The
viation significantly, while standard errors at some surface edges surface appears in Ref. [1], and it is defined by two guiding B-spline

Table 1
The control points of two ruled surfaces.
T0 T1 T2 B0 B1 B2

Concave surface (65, 15, -5) (30, 30, -5) (0, 60, -5) (60, 9, -35) (30, 30, -35) (15, 75, -35)
Convex surface (60, 9, -5) (45, 45, -5) (15, 75, -5) (65, 15, -35) (45, 45, -35) (0, 60, -35)

8
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

Fig. 4. Distributions of the standard geometric errors. (a), (b), and (c) for concave surfaces, and (d), (e), and (f) for convex surfaces.

Table 2
The optimization results for two ruled surfaces.
Computing time (s) The maximum standard error (mm)

Concave surface Initial 0.17


Proposed method 87.69 0.02
Zhang’s method [12] 89.45 0.42
Convex surface Initial 0.26
Proposed method 155.48 0.03
Zhang’s method [12] 86.02 0.93

curves with the same knot vector [0, 0, 0, 0, 0.2, 0.4, 0.6, 0.8, 1, 1, 1, 1]. 1.69, 1.33, 0.36, 0.22, 0.14] × 106 Nm/rad, which are identified using a
The control points of them are shown in Table 3. stiffness identification experiment similar to that in Ref. [33].
The cutter used is a conical cutter with a tip radius of 6.25mm, a cut The fixed rotation matrix R0 is set as the rotation matrix at the
length of 30mm, and a taper angle of 10∘ . The robot used is ABB IRB- starting CL of the initial solution. During the optimization process, nq =
6660. The Denavit–Hartenberg (DH) parameters of it is illustrated in 30 × 60 points are sampled from the design surface, and both curves
Table 4. The diagonal elements of the joint stiffness matrix are [1.47, p(u) and o(u) have 10 control points. The toolpath is sampled to n = 50

9
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

Table 3 The iterative optimization process is illustrated in Fig. 5. It shows


The control points of the blade surface. that the three indices Φ1 , Φ2 , and max{νi } all decrease in both methods,
Bottom curve Top curve but DE is less effective. The geometric errors of the milling surface are
shown in Fig. 6. After using both methods, the errors are within the
(85.4813, 55.9559, 39.0092) (108.1091, 65.6494, 56.1561)
(92.2912, 50.3600, 35.0837) (114.4314, 60.3823, 52.6947) tolerance interval.
(106.2763, 41.2605, 25.7919) (126.2854, 51.1126, 46.0888) Four performance indices at each sampling CL on the toolpath are
(127.9718, 29.0474, 11.1412) (149.4551, 32.5134, 32.2094) ∑ ij 2 ∑ ij 2
illustrated in Fig. 7. Here, ϕ1 = 6j=1 (ϕ1 ) and ϕ2 = 6j=1 (ϕ2 ) are two
(154.2096, 22.9630, -0.2524) (172.4973, 20.2748, 23.7455)
(182.3795, 14.5691, 0.6242) (195.5706, 8.5445, 27.1174) smoothness indices. It shows that SQP yields the best smoothness and
(198.4081, 4.1829, -0.0100) (206.5466, -0.2615, 28.7624) stiffness indices at most CLs, and all three results satisfy the singularity
(206.4338, -1.1538, 0.2920) (211.9363, -4.0448, 29.6409) constraints.
As the initial boundary value approximations given in Section 4.3.2
are random, the proposed method is run 50 times to verify the consis­
Table 4 tency of the results. Constraints are all satisfied after each run, and the
The DH parameters of ABB IRB-6660. resulting index values are shown in Table 5, which demonstrates the
Joint θ a (mm) d (mm) α (rad) reliability of the solving process presented in Section 4.3.
Joint 1 θ1 300 814.5 − π/2
Joint 2 θ2 − π /2 700 0 0
Joint 3 θ3 − θ2 280 0 − π/2 5.4. Experimental validations of the optimization algorithm
Joint 4 θ4 0 893 π/2
Joint 5 θ5 0 0 − π/2 To further validate the advantages of the proposed method, the ex­
Joint 6 θ6 + π 0 200 0
periments of milling the S-shaped surfaces are conducted, and the DE
algorithm and the two-step method are used as comparisons. The S-
shaped model is illustrated in Fig. 8. The cutter used is a cylindrical
CLs. dmax and dmin are 0.085mm and -0.085mm respectively. The sin­ cutter with a radius of 5 mm, and the cut length is 45mm. The robot used
gularity threshold δ is set to 1296 [22]. Both SQP and DE are performed is the same as that in Section 5.3, and a Jager high-speed spindle is
to optimize the toolpath. In SQP, the expansion factor ε is set to 0.05. τ1 mounted on its flange. The experimental platform is shown in Fig. 9. The
= 0.005, and τ2 = 10− 5 . In DE, the number of iterations is set to 40, and parameters of frames {TCS} and {WCS} are measured w.r.t. {FCS} and
the size of the population is set to 50. The crossover probability is 0.5. {BCS}, respectively, and they are shown in Table 6.
Note that according to our tests, a larger iteration number does not Both curves p(u) and o(u) have 30 control points. During the opti­
improve the optimization results further. mization process, nq = 18 × 70 points are sampled from the design
Both optimization methods are executed on MATLAB 2022b. It surface. dmax and dmin are 0.025mm and -0.025mm respectively. The
shows that SQP is much more efficient with an execution time of 5.55 time of iteration in DE is set to 20. All other parameters are the same as
minutes, while DE takes 53.00 minutes. in Section 5.3.

Fig. 5. The optimization process in the simulation.

Fig. 6. The geometric errors of the blade surface.

10
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

Fig. 7. Performance indices on the toolpath in the simulation.

Table 5
The results obtained by running the proposed method 50 times.
Index Minimum Maximum Average Obtained by DE
value value value
3 3 3 3
Φ1 4.99 × 10− 5.30 × 10− 5.26 × 10− 7.18 × 10−
6 6 6 6
Φ2 1.75 × 10− 2.14 × 10− 2.05 × 10− 6.47 × 10−
18 18 18 18
max{νi } 3.08 × 10− 3.11 × 10− 3.10 × 10− 3.15 × 10−

Fig. 9. The experimental platform of robot milling.

Table 6
The parameters of frame {TCS} and {WCS}.
Frame Position [x,y,z] (mm) Quaternion [q1 , q2 , q3 , q4 ]

TCS [464.288, -6.003, 124.885] [0.7036, 0.0137, -0.7097, -0.0335]


Fig. 8. The designed S-shaped model. WCS [1841, -102.13, 367] [0.6962, 0.0009, -0.0062, 0.7178]

Both optimization methods are executed on MATLAB 2022b. SQP


The joint paths obtained by the three methods are illustrated in
shows greater efficiency with an execution time of 2.11 minutes, while
Fig. 11. It shows that compared with the other two methods, the joint
DE takes 21.16 minutes.
paths with SQP are smoother, especially for Joints 4 and 6. Constrained
The iterative optimization process of DE and SQP is illustrated in
by the specific task, there is limited room for the reduction of jitter in the
Fig. 10, proving the effectiveness of SQP. Note that as the initial solution
paths of other joints. Even so, the improvement in the total movement
does not satisfy the constraints, the large increase in Φ2 in the third
length of these joints is noticeable, especially at the beginning and end of
iteration step of DE leads to a feasible solution.
the paths, and this is consistent with the reduction in Φ1 .

11
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

Fig. 10. The optimization process in the experiment.

Fig. 11. Joint position of the robot in the experiment. “Ji” is short for “Joint i”.

The performance indices on the toolpaths are given in Fig. 12 and obtained by a 3D snapshot sensor, and then aligned to the design surface
Table 7. At most CLs, the smoothness indices and stiffness index ob­ by using Geomagic Control X. On this basis, the error distributions be­
tained by SQP have better performance, while the constraints in the tween the point clouds and the design surface are shown in Fig. 14 and
optimization model are met with all three methods. Note that the very Table 8. It shows that due to the improved robot stiffness, SQP has the
small differences in the values of max{νi } shown in Table 7 are mainly best machining accuracy. The surface roughness (Sa) is measured locally
due to the particular definition of ν in Eq. (11). If the stiffness metrics are using the confocal microscope, as shown in Fig. 14 and Table 8,
converted to use K in Eq. (9), which is more commonly used and has demonstrating that SQP improves the surface finish of the workpiece.
units of N/m, then the differences between the three methods will look
more pronounced. 6. Conclusion
Due to the need of the robot controller, its motion instruction input is
obtained by sampling the continuous path, and the sampling number is This paper proposes an efficient and effective method of 6-DoF
set to 300 here. The robot controller implements a smooth transition for toolpath planning for robotic flank milling. Based on the established
adjacent linear paths. By using the simulation software RobotStudio, the kinematic model of the milling system, the toolpath is represented by
actual feedrate and angular speed of the tooltip are recorded, and the two B-splines in Cartesian space and rotation parametric space. The
curves are shown in Fig. 13. The machining time of SQP is the shortest, toolpath planning problem is thus transformed into the optimization of
and its angular speed is the smallest most of the time. This is consistent the spline control points. The objective of the optimization is to simul­
with the curves of ϕ1 shown in Fig. 12 (a). Note that lower angular speed taneously improve the toolpath smoothness and robot stiffness, while
could result in better machining quality. satisfying joint angle constraints, geometric error constraints, and sin­
The material of the workpiece is 6061 Aluminum. The feedrate of the gularity constraints. Using the lexicographic order of arrays, an SQP-
tooltip is set to 5mm/s. The spindle speed is set to 12000 rpm, and the based algorithm is proposed to solve this non-convex optimization
radial depth of cut is set to 0.1mm. The machined workpieces are shown problem. During the optimization process, the geometric error con­
in Fig. 14. The sampled point clouds of the machined surfaces are forming to the geometric specification is used and solved by the

12
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

Fig. 12. Performance indices on the toolpath in the experiment.

Table 7
The performance indices of different methods in the experiment.
Method Φ1 Φ2 max{νi } max{μi } max{|dj |}

The initial solution 6.60 × 10− 3 5.91 × 10− 5 4.1230 × 10− 18 278.19 0.0272
The two-step method 6.40 × 10− 3
5.51 × 10− 5 4.1217 × 10− 18 277.06 0.0046
DE 6.29 × 10− 3
10.34 × 10− 5 4.1225 × 10− 18 278.09 0.0147
SQP 3.59 × 10− 3 3.59 × 10− 5 4.1125 × 10− 18 276.66 0.0250

proposed iterative algorithm based on CGA. The advantages and reli­ over traditional methods, resulting in better surface quality and
ability of the proposed method are verified by simulations and experi­ machining efficiency. In addition, by using the standard geometric error,
ments. Compared with the typical DE-based optimization algorithm, the the machining accuracy under the geometric specification is improved.
SQP-based algorithm is much more efficient and robust. The proposed
method significantly improves the path smoothness and robot stiffness

Fig. 13. The actual feedrate and the tool angular speed in the RobotStudio virtual simulation.

13
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

Fig. 14. The machined workpieces.

Table 8
Comparison of machining quality.
Method Maximum undercut (mm) Maximum overcut (mm) Proportion of errors below 0.05mm Local surface roughness

SQP 0.09 0.10 95.50% Sa=3.50μm


DE 0.10 0.13 92.05% Sa=5.18μm
The two-step method 0.13 0.14 88.30% Sa=4.75μm

CRediT authorship contribution statement influencing the position presented in, or the review of, the manuscript
entitled, ’’Toolpath Generation for Robotic Flank Milling via Smooth­
Yongxue Chen: Methodology, Investigation, Validation, Writing – ness and Stiffness Optimization’’.
original draft. Yaoan Lu: Investigation, Writing – review & editing. Ye
Ding: Conceptualization, Writing – review & editing, Supervision, Data availability
Funding acquisition, Project administration.
Data will be made available on request.
Declaration of Competing Interest

We declare that we have no financial and personal relationships with Acknowledgments


other people or organizations that can inappropriately influence our
work, there is no professional or other personal interest of any nature or This work was supported by the National Natural Science Foundation
kind in any product, service and/or company that could be construed as of China [grant numbers: 52275501, 51935010].

Appendix: Basics of conformal geometric algebra

CGA is an efficient tool to deal with geometric problems, which has characteristics of strong geometric intuition, coordinate independence, and so
on. One of its most notable features is that it contains rich basic geometric elements, and can perform multiple types of transformations on them
elegantly. Here the necessary basics of CGA are given, and more information could be found in Refs. [40–42].
The distinguishing features are mainly realized by the five basic vectors and by three products. CGA maps the 3-dimensional (3D) Euclidean space
with basic vectors {e1 , e2 , e3 } to 5-dimensional (5D) conformal space with basic vectors {e0 , e1 , e2 , e3 ,e∞ }. The three basic products are the geometric

14
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

product, the inner product represented by symbol ⋅, and the outer product represented by symbol ∧. For any two vectors a and b in the conformal
space, the geometric product of them is defined as the sum of the inner and outer products.
ab = a⋅b + a ∧ b (A1)
The definition of the inner product is the same as the dot product in vector algebra, and the rules of it in CGA is
e0 ⋅e0 = 0, e0 ⋅e∞ = − 1, e0 ⋅ei = 0
(A2)
ei ⋅ej = δi,j , ei ⋅e∞ = 0, e∞ ⋅e∞ = 0

1, i = j
where i, j ∈ {1, 2, 3}, and δi,j = { . The outer product a ∧ b is a bivector.
0, i ∕
=j
In CGA, any point has two representations. The traditional representation x = x1 e1 + x2 e2 + x3 e3 is called the Euclidean model representation here,
and
/
x = e0 + x + ‖ x ‖2 e∞ 2 (A3)

is called the conformal model representation. The Euclidean model representation is represented by bold letters, and the conformal model repre­
sentation is represented by the corresponding italic letters in this paper. Note that in Section 3, another type of element represented by bold is di­
rections, which is also spanned by {e1 , e2 , e3 }, and all other elements in CGA are represented by italics.
Different from Euclidean space, there is a type of geometric element in the conformal space named flat point. The geometric meaning of the flat
point is the combination of a point and the point at infinity. The corresponding flat point of a point x is expressed as
F = x ∧ e∞ (A4)
For most geometric elements, such as flat points, lines, and planes, there are also two representations of them: the direct representation and the
dual representation. The dual representation is just the dual of the direct representation, while the dual operation is represented by ∗ and is defined by
(⋯)∗ = − (⋯)⋅(e0 ∧ e1 ∧ e2 ∧ e3 ∧ e∞ ) (A5)
If a point is located on these elements, its conformal model representation is located in the outer product null space of their direct representations
and the inner product null space of their dual representations. For example, if l is the direct representation of a line and a point x is located on it, the
following two conditions are satisfied:
x∧l=0
(A6)
x⋅l∗ = 0
Another significant advantage of CGA is the convenience of finding the intersection of two different geometric elements, and this is always realized
by the outer product. Specifically, for two intersecting elements with direct representations A and B, the dual representation C∗ of their intersection is
C∗ = A∗ ∧ B∗ (A7)
Note that the intersections obtained could be flat points, considering that the point at infinity is regarded as the common point of all flat elements
such as lines and planes.

References [14] G. Zheng, Q.Z. Bi, L.M. Zhu, Smooth tool path generation for five-axis flank milling
using multi-objective programming, Proceedings of the Institution of Mechanical
Engineers, Part B: Journal of Engineering Manufacture 226 (2012) 247–254.
[1] L. Zhu, G. Zheng, H. Ding, Y. Xiong, Global Optimization of Tool Path for Five-Axis
[15] Y. Lu, Y. Ding, L. Zhu, Smooth Tool Path Optimization for Flank Milling Based on
Flank Milling with a Conical Cutter, Comput.-Aided Des. 42 (2010) 903–910.
the Gradient-Based Differential Evolution Method, ASME J. Manuf. Sci. Eng. 138
[2] G. Xiong, Z.-L. Li, Y. Ding, L. Zhu, A closed-loop error compensation method for
(2016), 081009.
robotic flank milling, Rob. Comput. Integr. Manuf. 63 (2020), 101928.
[16] D. He, Z. Li, X. Li, Y. Li, K. Tang, Collision-Conscious Multi-Pass Flank Milling of
[3] S. Bedi, S. Mann, C. Menzel, Flank milling with flat end milling cutters, Comput.-
Complicated Parts Based on Stripification, Comput.-Aided Des. 157 (2023),
Aided Des. 35 (2003) 293–300.
103469.
[4] J.C.J. Chiou, Accurate Tool Position for Five-Axis Ruled Surface Machining by
[17] G. Xiong, Y. Ding, L. Zhu, Stiffness-based pose optimization of an industrial robot
Swept Envelope Approach, Comput.-Aided Des. 36 (2004) 967–974.
for five-axis milling, Rob. Comput. Integr. Manuf. 55 (2019) 19–28.
[5] C. Menzel, S. Bedi, S. Mann, Triple tangent flank milling of ruled surfaces, Comput.-
[18] Z. Liao, Q.H. Wang, H. Xie, J.R. Li, X. Zhou, P. Hua, Optimization of robot posture
Aided Des. 36 (2004) 289–296.
and workpiece setup in robotic milling with stiffness threshold, IEEE/ASME Trans.
[6] C. Li, S. Bedi, S. Mann, Flank Milling of a Ruled Surface with Conical Tools-an
Mechatron. 27 (2022) 582–593.
Optimization Approach, Int. J. Adv. Manuf. Technol. 29 (2006) 1115–1124.
[19] Q. Chen, C. Zhang, T. Hu, Y. Zhou, H. Ni, X. Xue, Posture optimization in robotic
[7] J. Yi, C.-H. Chu, C.-L. Kuo, X. Li, L. Gao, Optimized tool path planning for five-axis
machining based on comprehensive deformation index considering spindle weight
flank milling of ruled surfaces using geometric decomposition strategy and multi-
and cutting force, Rob. Comput. Integr. Manuf. 74 (2022), 102290.
population harmony search algorithm, Appl. Soft Comput. 73 (2018) 547–561.
[20] J. Lin, C. Ye, J. Yang, H. Zhao, H. Ding, M. Luo, Contour error-based optimization
[8] C. Lartigue, E. Duc, A. Affouard, Tool Path Deformation in 5-Axis Flank Milling
of the end-effector pose of a 6 degree-of-freedom serial robot in milling operation,
Using Envelope Surface, Comput.-Aided Des. 35 (2003) 375–382.
Rob. Comput. Integr. Manuf. 73 (2022), 102257.
[9] H. Gong, L.X. Cao, J. Liu, Improved positioning of cylindrical cutter for flank
[21] T. Hou, Y. Lei, Y. Ding, Pose Optimization in Robotic Milling Based on Surface
milling ruled surfaces, Comput.-Aided Des 37 (2005) 1205–1213.
Location Error, ASME J. Manuf. Sci. Eng. 145 (2023).
[10] H. Gong, N. Wang, Optimize Tool Paths of Flank Milling with Generic Cutters
[22] J.F. Peng, Y. Ding, G. Zhang, H. Ding, Smoothness-oriented path optimization for
Based on Approximation Using the Tool Envelope Surface, Comput.-Aided Des. 41
robotic milling processes, Sci. China Technol. Sci. 63 (2020) 1751–1763.
(2009) 981–989.
[23] Y.A. Lu, K. Tang, C.Y. Wang, Collision-free and smooth joint motion planning for
[11] C. Lartigue, E. Duc, C. Tournier, Machining of Free-Form Surfaces and Geometrical
six-axis industrial robots by redundancy optimization, Rob. Comput. Integr. Manuf.
Specifications, Proceedings of the Institution of Mechanical Engineers Part B-
68 (2021), 102091.
Journal of Engineering Manufacture 213 (1999) 21–27.
[24] C. Dai, S. Lefebvre, K.M. Yu, J.M.P. Geraedts, C.C.L. Wang, Planning Jerk-
[12] X.M. Zhang, L.M. Zhu, G. Zheng, H. Ding, Tool Path Optimisation for Flank Milling
Optimized Trajectory with Discrete Time Constraints for Redundant Robots, IEEE
Ruled Surface Based on the Distance Function, Int. J. Prod. Res. 48 (2010)
Trans. Autom. Sci. Eng. 17 (2020) 1711–1724.
4233–4251.
[25] Z. Li, F. Peng, R. Yan, X. Tang, S. Xin, J. Wu, A virtual repulsive potential field
[13] Y. Sun, Q. Guo, Analytical modeling and simulation of the envelope surface in five-
algorithm of posture trajectory planning for precision improvement in robotic
axis flank milling with cutter runout, ASME J. Manuf. Sci. Eng. (2012) 134.
multi-axis milling, Rob. Comput. Integr. Manuf. 74 (2022), 102288.

15
Y. Chen et al. Robotics and Computer-Integrated Manufacturing 85 (2024) 102640

[26] Z.Y. Liao, J.R. Li, H.L. Xie, Q.H. Wang, X.F. Zhou, Region-based toolpath [34] L.M. Zhu, X.M. Zhang, G. Zheng, H. Ding, Analytical Expression of the Swept
generation for robotic milling of freeform surfaces with stiffness optimization, Rob. Surface of a Rotary Cutter Using the Envelope Theory of Sphere Congruence, ASME
Comput. Integr. Manuf. 64 (2020), 101953. J. Manuf. Sci. Eng. 131 (2009) 0410171–0410177.
[27] L. Lu, J. Han, F. Dong, Z. Ding, C. Fan, S. Chen, H. Liu, H. Wang, Joint-smooth [35] E. Aras, Generating Cutter Swept Envelopes in Five-Axis Milling by Two-Parameter
toolpath planning by optimized differential vector for robot surface machining Families of Spheres, Comput.-Aided Des 41 (2009) 95–105.
considering the tool orientation constraints, IEEE/ASME Trans. Mechatron. 27 [36] Y. Ding, Y. Chen, Point Pair-Based Expression of Cutter Swept Envelopes in Five-
(2022) 2301–2311. Axis Milling, Comput.-Aided Des 163 (2023), 103588.
[28] L. Lu, J. Zhang, X. Tian, J. Han, H. Wang, Tool path optimization for robotic [37] K.M. Lynch, F.C. Park, Modern robotics, Cambridge University Press, 2017.
surface machining by using sampling-based motion planning algorithms, ASME J. [38] Z. Fu, E. Spyrakos-Papastavridis, Y.H. Lin, J.S. Dai, Analytical Expressions of Serial
Manuf. Sci. Eng. 143 (2021), 011002. Manipulator Jacobians and their High-Order Derivatives based on Lie Theory*, in:
[29] Y. Chen, Y. Ding, Posture Optimization in Robotic Flat-End Milling Based on 2020 IEEE International Conference on Robotics and Automation, ICRA 2020,
Sequential Quadratic Programming, ASME J. Manuf. Sci. Eng. 145 (2023), 061001. Institute of Electrical and Electronics Engineers Inc., 2020, pp. 7095–7100.
[30] P. Bo, M. Bartoň, D. Plakhotnik, H. Pottmann, Towards efficient 5-axis flank CNC [39] A. Yuen, K. Zhang, Y. Altintas, Smooth trajectory generation for five-axis machine
machining of free-form surfaces via fitting envelopes of surfaces of revolution, tools, Int. J. Mach. Tools Manuf. 71 (2013) 11–19.
Comput.-Aided Des 79 (2016) 1–11. [40] L. Dorst, D. Fontijne, S. Mann, Geometric Algebra for Computer Science (Revised
[31] J. Léger, J. Angeles, Off-line programming of six-axis robots for optimum five- Edition), Elsevier Inc., 2009.
dimensional tasks, Mech. Mach. Theory 100 (2016) 155–169. [41] K. Kanatani, Understanding geometric algebra: Hamilton, grassmann, and clifford
[32] Y. Guo, H. Dong, Y. Ke, Stiffness-oriented posture optimization in robotic for computer vision and graphics, CRC Press, 2015.
machining applications, Rob. Comput. Integr. Manuf. 35 (2015) 69–76. [42] Y. Chen, P. Huang, Y. Ding, An analytical method for corner smoothing of five-axis
[33] C. Dumas, S. Caro, S. Garnier, B. Furet, Joint stiffness identification of six-revolute linear paths using the conformal geometric algebra, Comput.-Aided Des 153
industrial serial robots, Rob. Comput. Integr. Manuf. 27 (2011) 881–888. (2022), 103408.

16

You might also like