You are on page 1of 47

Author's Accepted Manuscript

Generalized Kinematics of Five-Axis Serial


Machines with Non-Singular Tool Path Gen-
eration
Jixiang Yang, Yusuf Altintas

www.elsevier.com/locate/ijmactool

PII: S0890-6955(13)00142-9
DOI: http://dx.doi.org/10.1016/j.ijmachtools.2013.09.002
Reference: MTM2896

To appear in: International Journal of Machine Tools & Manufacture

Received date: 21 April 2013


Revised date: 1 September 2013
Accepted date: 5 September 2013

Cite this article as: Jixiang Yang, Yusuf Altintas, Generalized Kinematics of
Five-Axis Serial Machines with Non-Singular Tool Path Generation, Interna-
tional Journal of Machine Tools & Manufacture, http://dx.doi.org/10.1016/j.ijmach-
tools.2013.09.002

This is a PDF file of an unedited manuscript that has been accepted for
publication. As a service to our customers we are providing this early version of
the manuscript. The manuscript will undergo copyediting, typesetting, and
review of the resulting galley proof before it is published in its final citable form.
Please note that during the production process errors may be discovered which
could affect the content, and all legal disclaimers that apply to the journal
pertain.
Generalized Kinematics of Five-Axis Serial Machines with Non-Singular Tool Path
Generation

Jixiang Yang, Yusuf Altintas

Phone: +1 604 822 5622


Fax: +1 604 822 2403
E-mail: altintas@mech.ubc.ca;altintas@mail.ubc.ca

Manufacturing Automation Laboratory, Department of Mechanical Engineering,


The University of British Columbia, Vancouver, BC, V6T 1Z4, Canada
Abstract
Typical five-axis machine tools have three translational and two rotary drives. This paper
presents a generalized kinematics model that allows automatic configurations of all five-axis
machine tools using screw theory. First, each kinematic element is modelled as a revolute joint,
prismatic joint, workpiece or cutting tool. The kinematic elements are mathematically assembled
through screw theory by using the base coordinate system. The general inverse kinematics
solutions for both rotary and translational motions are evaluated. The singularities in five axis
contouring are avoided by deforming splined tool orientation vectors. The tool orientation
vectors are represented by a fifth degree B-spline curve in a quaternion space, while the
movement of tool tip is represented by a fifth degree B-spline curve in the Cartesian space. Both
splines, which form the C3 continuous tool path, are fitted to curve length parameter of the tool
tip positions. If the tool path traverses the singular area of the machine, it is deformed by
modifying the control points of the tool orientation spline in the quaternion space while
respecting the machining tolerance. The proposed kinematics module, tool path generation
algorithm and method for avoiding kinematic singularities are experimentally verified on a
five-axis machine tool controlled by an in-house developed CNC system.

Keywords: five-axis, kinematics module, screw theory, tool path generation,


singularityGeneralized Kinematics of Five-Axis Serial Machines with Non-Singular Tool
Path Generation

1. Introduction
Five-axis machine tools are widely used in machining aerospace parts, dies and molds which
have sculptured surfaces. CAM systems generate tool paths (Cutter Location – CL) by indicating
the tool tip coordinates and the tool axis orientation vectors in the workpiece coordinate system
(P-system) in five-axis contour machining. Later, the CL data is transformed into position
commands of the linear and rotary drives in the machine coordinate system (M-system) by the
kinematics model of the machine tool.
1
Typical five-axis machine tools have three translational and two rotary drives. Different
combinations can be synthesized to configure the five-axis machine tool by changing the
location and order of the rotary drives. Sakamoto and Inasaki [1] classified the configurations of
five-axis machine tool as three typical types: two rotary drives on the table; two rotary drives are
attached to the spindle head; and a hybrid combination between the spindle and table. Moriwaki
[2] reported that there would be 216 kinematically feasible configurations to achieve five-axis
machine tools. It is important to develop a generalized kinematics module that can deal with any
possible configuration in five-axis machine tools. Lee and She [3] built specific forward and
inverse kinematics for each of three typical configurations by using homogeneous coordinate
transformations. She and Lee [4] proposed a postprocessor for general five-axis machine tools,
using the kinematics module, which added two rotary movements on the workpiece table and
two rotary movements on the spindle. The forward kinematics in their paper was written in a
unified form. Tutunea-Fatan and Feng [5] derived a general coordinate transformation matrix for
all five-axis machine tools with two rotary axes. The model was then used to verify the
feasibility of the two rotary joints within the kinematics chain of three main types of five-axis
machine tools. She and Chang [6] did further research on the basis of [4] by extending the
inverse kinematics solution for translational motions in a unified form. Lin and Tzu-Kuan [7]
disregarded linear motions, and focussed only on the two rotary axes. They proposed a spherical
two-circle method, which enabled the development of a generic algorithm for the rotation
mechanism of any five-axis milling machine.
Most conventional kinematics modules for five-axis machine tools are based on
Denavit-Hartenberg notations [8], which need to assign local coordinate frames to each drive
module [3-6, 9-11]. The model built on a certain five-axis machine is difficult to be adapted to
other five-axis kinematic configurations, especially when the rotary axes are not orthogonal [10].
Screw theory, which has been known since the early 1900’s and is based on Chasle’s theorem
[12], is an alternative mathematical tool to model kinematics of five axis machine tools. Screw
theory allows a global description of rigid body motion, so that there is no need to build local
coordinate frames on each drive module which is required by D-H approach. Although it has
been widely used to solve robot kinematics [13, 14], very little research has been reported in
using screw theory on the five-axis machine tool kinematics. Moon [15] developed a systematic
synthesis methodology for machine tool configurations, and applied it to the identification of
kinematic configurations of reconfigurable machine tools, by using functional representations of
screw theory. Moon et al. [16] also developed a methodology to estimate and compensate for the
kinematic error at the tip of the tool in multi-axis machine tools by using screw theory. However,
to the best of the authors’ knowledge, no research has been reported in developing general
kinematics module for five-axis machine tools using screw theory.
The kinematics model of the machine needs to be used in planning five-axis contouring of
splined paths with minimal motion discontinuities along the curved paths. CAM systems usually
generate a set of discrete data points along the splined paths, which are linearly interpolated by
the CNC in order to obtain a continuous tool path. Due to velocity discontinuities at the linear
segment junctions, linear interpolators are not suitable for high speed machining (HSM). Fleisig
and Spence [17] used C2 continuous splines for tool tip position and tool axis orientation in
generating five axis tool paths. They used another C2 continuous, re-parameterization spline to
relate the tool tip position and orientation splines. Liu et al. [18] improved on [17] by
re-parameterizing the orientation parameter spline to the arc-length of the tool path, instead of
chord-length used in [17]. Yuen et al. [19] used two fifth degree B-splines to represent tool tip
2
position and tool orientation vectors separately, and then fitted both B-splines to arc-length
parameter in order to accomplish coordinated motion. The tool path generated by their method is
C3 continuous. Langeron et al. [20] represented tool path using two B-splines, each
corresponding to the trajectory of two particular points on the tool axis. Zhang et al. [21], and Bi
et al. [22] adopted dual quaternion as a mathematical tool and generated dual rational tool paths
with equal distance. The dual splines synchronize the two curves that represent motions of two
points on the tool axis directly, by using only one parameter. However, the tool path with an
abrupt angular change over a short displacement may bring discontinuities as pointed out by
Yuen et al. [19].
When the tool paths traverse some special positions, the motions of rotary axes can have rapid
changes, which forces abrupt motions on the translational drives. These singularity positions
must be detected and avoided by the kinematics model of the machine. In industry, the singular
configuration of five-axis machines is avoided by retracting the tool along the tool axis [23],
which causes undesirable discontinuities in the five-axis tool paths. Some singular position can
also be avoided through tilt mounting of the workpiece [24]. Also, singularities can be avoided
during tool path planning or post-processor stages. Affouard et al. [25] proposed a method to
avoid the machine singularity through a tool path planning algorithm in the CAD/CAM system.
Sørby [10] modified the exact inverse kinematics by forcing the tool axis to rotate in a certain
relationship with the other rotary axis, in order to give robustness to singularities at the expense
of a small tool orientation deviation. Munlin et al. [26] proposed an optimization method to
identify all possible tool orientation combinations and chose the best one to minimize the
machining error near the singularities of the machined surface. Boz and Lazoglu [27] used a
simple method to avoid singularities through increasing or decreasing rotation angle by ±90°.
This paper builds a general kinematics module for all possible configurations of five-axis
machine tools, which can give complete inverse kinematics solutions for both rotary and
translational motions. Instead of using Denavit-Hartenberg notations, screw theory is used here,
where all the coordinates and vectors are relative to the base coordinate system. Thus, there is no
need to establish coordinate frames on every joint or calculate the transformation matrices for the
adjacent coordinate frames. The tool orientation vectors are represented by a fifth degree
B-spline curve in a quaternion space. The rational movement of tool tip is represented by a fifth
degree B-spline curve in Cartesian space. Both splines, which form the C3 continuous tool path,
are fitted to curve length parameter of the tool tip positions. The singularities are detected by
using the proposed general kinematics module, and avoided by deforming the B-spline within a
specified tolerance to avoid singularities of tool orientations. The tangential feed along the tool
path is optimized while respecting velocity, acceleration and jerk limits of the drives.
The rest of this paper is organized as follows: In Section 2, the general forward and inverse
kinematics of five axis machine tools are modeled from their basic kinematic elements. The
implementation of the general kinematics module on a five-axis machine with non-orthogonal
rotary axes is given. The off-line C3 continuous tool path algorithm is presented in Section 3. A
new method to avoid singularities by deforming the tool orientation spline within a certain limit
is also given. The proposed kinematics module, tool path generation algorithm and method for
avoiding kinematic singularities are experimentally verified on a five-axis machine tool in
Section 4. The paper is concluded in Section 5.

3
2. General Five-Axis Kinematics Module
The five-axis machine tools can be grouped under three classes [1]: (1) table-tilting type with
both rotary axes on the table (Fig.1(a)), (2) spindle-tilting type with both rotary axes on the
spindle (Fig.1 (b)), and (3) table/spindle-tilting type with one rotary axis each on the table and
spindle (Fig.1 (c)).

2.1 Kinematic configuration analyses


Although different configurations exist, every five-axis machine tool can be disassembled into
basic kinematic elements: (1) prismatic joints, (2) revolute joints, (3) workpiece, and (4) cutting
tool as illustrated in Fig.2.
In Fig.2, ( x, y, z ); (θ a , θ b , θ c ) are movements of prismatic and revolute joints, respectively. The
base coordinate frame Ob X bYb Z b is attached to the machine bed and located in the center of the
table surface when movements of all joints are zero. The workpiece coordinate frame
Ow X wYw Z w and tool coordinate frame Ot X tYt Z t are each attached to the workpiece and the
cutting tool, respectively. There are only translational offsets among the three coordinate frames
when movements of all joints are zero. v x , v y , v z are unit vectors pointing in the positive
direction of the translational axes. ω a , ωb , ω c are unit vectors pointing in the positive direction
of the rotary axes, and qa , qb , qc are points on the respective rotary axis. All vectors and points
are specified relative to the base coordinate frame Ob X bYb Z b . vi (i = x, y, z ) , ωi (i = a, b, c) and
qi (i = a, b, c) determine full kinematic characteristics of all joints. The workpiece and the
cutting tool are attached to joints individually, thus there are two open kinematic chains in a
five-axis machine tool: The workpiece chain from the base coordinate frame to the workpiece;
and the cutter chain from the base coordinate frame to the cutting tool. The two open kinematic
chains together make up the whole kinematic chain.
The kinematic chains of a table tilting type machine shown in Fig.1 (a) are illustrated in Fig.3 as
an example. The workpiece chain is from the base coordinate frame to the X axis, Y axis, A axis,
C axis and finally the workpiece located on the table of the C axis. The cutter chain is from the
base coordinate frame to the Z axis, and the cutting tool attached to the Z axis. The whole
kinematic chain is from the workpiece to the C axis, A axis, Y axis, X axis, base coordinate
frame, then to the Z axis and the cutting tool.

2.2 Forward kinematics model


The forward kinematics describes the cutter motion in the workpiece system
R(t ) = ( Px (t ), Py (t ), Pz (t ), Oi (t ), O j (t ), Ok (t )) T as a function of motion commands to the five
drives of the machine M (t ) = ( x(t ), y (t ), z (t ),θ p (t ), θ s (t ))T .
The configuration of the machine tool is defined as the reference configuration when the
movements of all joints are zero. Let g bn (0) represents the rigid body transformation between
the nth joint and the base coordinate frame in the reference configuration. In screw theory [12],
the relative position and orientation of the nth joint, with respect to the base coordinate frame,
is expressed by a 4×4 homogenous transformation matrix as:

4
gbn (θ1 , θ 2 …θ n ) = eξ1θ1 eξ2θ2 eξnθn [ gbn (0) ]
ˆ ˆ ˆ
(1)

where ξ i ( i = 1, 2 n ) and θi ( i = 1, 2, n ) are twist and motion commands of the i th joint,


respectively, located in the kinematic chain from the base coordinate frame to the nth joint.

For a revolute joint, the twist ξ i has the form:

⎡v ⎤ (2)
ξ i = ⎢ i ⎥ , vi = −ωi × qi
⎣ωi ⎦

where ωi ∈ℜ3 is the unit vector in the positive direction of the rotary axis, and qi ∈ℜ3 is any
point on the axis. Transformation matrix for joint i is:

⎡ eωˆiθi
eξiθi = ⎢
ˆ (I 3×3 − eωˆiθi ) (ω × v ) + ω ω
i i i
T
vθ ⎤
i i i

(3)

⎢⎣ 01×3 1 ⎥⎦

where

eωˆiθi = I3×3 + ωˆ i sin θi + ωˆ i 2 (1 − cos θi ) (4)

The symbol ( ∧ ) is defined as a × b = ab


ˆ for vector to matrix conversion. For example, if the
two vectors are defined as a = [ a1 a2 a3 ] , b = [b1 b2 b3 ] , then their vector product
T T

becomes
⎡ a2b3 − b2 a3 ⎤ ⎡ 0 −a3 a 2 ⎤ ⎡ b1 ⎤ ⎡ 0 − a3 a2 ⎤
⎢ ⎥ ⎢
a × b = ⎢ a3b1 − a1b3 ⎥ = ⎢ a3 ⎥ ⎢ ⎥
0 −a1⎥ ⎢b 2 ⎥ aˆ = ⎢⎢ a3 0 − a1 ⎥⎥
⎢⎣ a1b2 − a2b1 ⎥⎦ ⎢⎣ − a 2 a1 0 ⎥⎦ ⎢⎣ b3 ⎥⎦ ⎢⎣ − a2 a1 0 ⎥⎦

For a prismatic joint,

⎡v ⎤ ⎡I θ i vi ⎤ (5)
ξ i = ⎢ i ⎥ , eξ θ = ⎢ 3×3
ˆ

1 ⎥⎦
i i

⎣0⎦ ⎣ 0

where vi ∈ℜ3 is the unit vector pointing in the positive direction of translation. All vectors and
points are specified relative to the base coordinate frame. In order to make the exponential
notations of screw theory understood easily, the details of deriving Eq. (3) – (5) are given in the
Appendix.
Let gbw (0) , g bt (0) each represent the rigid body transformation matrix of the workpiece
coordinate frame and the tool coordinate frame, relative to the base coordinate frame in the
reference configuration. If the offset vectors between the workpiece coordinate frame and the
tool coordinate frame relative to the base coordinate frame in the reference configuration are
wo = [ wox woy woz ]T and t o = [tox toy toz ]T , respectively, then the rigid body transformation
matrices are organized as:
5
⎡I wo ⎤ ⎡ I3×3 to ⎤ (6)
gbw (0) = ⎢ 3×3 ⎥ , g bt (0) = ⎢
⎣01×3 1⎦ ⎣ 01×3 1 ⎥⎦

Assume that there are m and n joints on the table and spindle, respectively, the condition is
m + n = 5 . The homogenous transformation matrix of the workpiece coordinate frame relative to
the base coordinate frame is:

gbw (θ1w , θ 2 w , θ mw ) = eξ1wθ1w eξ 2 wθ2 w eξ mwθmw [ gbw (0) ]


ˆ ˆ ˆ
(7)

where ξ iw ( i = 1, 2 m ) and θiw ( i = 1, 2, m ) are twist and motion commands of the i th joint
located in the workpiece chain from the base coordinate frame to the workpiece.
The homogenous transformation matrix of the base coordinate frame relative to the workpiece
coordinate frame is:

, θ mw ) = [ gbw (0) ] e −ξmwθmw


−1
g wb (θ1w , θ 2 w , θ mw ) = gbw
−1
(θ1w , θ 2 w e−ξ 2 wθ2 w e−ξ1wθ1w
ˆ ˆ ˆ
(8)

The homogenous transformation matrix of the tool coordinate frame relative to the base
coordinate frame is:

g bt (θ1t , θ 2t , θ nt ) = eξ1tθ1t eξ 2 tθ2 t eξntθnt [ gbt (0) ]


ˆ ˆ ˆ
(9)

where ξ it ( i = 1, 2 n ) and θit ( i = 1, 2, n ) are twist and motion commands of the i th joint
located in the tool chain from the base coordinate frame to the cutting tool.
Combining Eq. (8) and Eq. (9), the homogenous transformation matrix of the tool coordinate
frame relative to the workpiece coordinate frame is:

g wt (θ1w ,θ 2 w ,θ mw ,θ1t ,θ 2t ,θ nt ) = g wb (θ1w ,θ 2 w ,θ mw ) gbt (θ1t ,θ 2t ,θ nt ) (10)


= [ gbw (0)] e [ gbt (0)]
−1 −ξˆmwθmw −ξˆ2 wθ2 w −ξˆ1 wθ1 w ξˆ1tθ1t ξˆ2 tθ2 t ξˆntθnt
e e e e e

Note that the cutting tool position vector and orientation vector relative to the cutter coordinate
frame are respectively rpt and rot . The cutter position and orientation relative to the workpiece
coordinate frame for a given set of machine axis variables are evaluated by,

⎡P O⎤ ⎡r rot ⎤ (11)
⎢ 1 0 ⎥ = g wt (θ1w , θ 2 w , θ mw , θ1t , θ 2t , θ nt ) ⎢ pt
0 ⎥⎦
⎣ ⎦ ⎣1

If the table tilting five-axis machine tool with A, C rotary axes is used as an example, the
homogenous transformation matrix of the tool coordinate frame Ot X tYt Z t relative to the
workpiece frame Ow X wYw Z w becomes:

g wt ( x, y, z,θ a ,θ c ) = [ gbw (0)] e−ξcθc e−ξaθa e e−ξ xθ x eξ zθ z [ gbt (0)]


−1 ˆ ˆ −ξˆyθ y ˆ ˆ (12)

6
The cutting tool is attached to the Z axis. The forward kinematics is:

⎡ Px Oi ⎤ ⎡0 0⎤ (13)
⎢P ⎥
Oj ⎥ ⎢0 0 ⎥⎥
⎢ y = g wt ( x, y, z , θ a ,θ c ) ⎢
⎢ Pz Ok ⎥ ⎢0 1⎥
⎢ ⎥ ⎢ ⎥
⎣1 0⎦ ⎣1 0⎦

2.3 Inverse kinematics for rotary motions


Inverse kinematics is used to determine reference position commands of five drives
M (t ) = ( x(t ), y (t ), z (t ),θ p (t ), θ s (t ))T from the corresponding cutter motion in workpiece
coordinate system R(t ) = ( Px (t ), Py (t ), Pz (t ), Oi (t ), O j (t ), Ok (t ))T .
From Eq. (11), the motion commands for five drives are functions of cutter location, which can
be shown in Eq. (14).

⎡ θ1w ⎤ ⎡ f1w ( Px , Py , Pz , Oi , O j , Ok ) ⎤ (14)


⎢θ ⎥ ⎢ f ( P , P , P , O , O , O ) ⎥
⎢ 2w ⎥ ⎢ 2w x y z i j k ⎥
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢θ mw ⎥ = ⎢ f mw ( Px , Py , Pz , Oi , O j , Ok ) ⎥ ; (m + n = 5)
⎢ θ1t ⎥ ⎢ f1t ( Px , Py , Pz , Oi , O j , Ok ) ⎥
⎢ ⎥ ⎢ ⎥
⎢ θ 2t ⎥ ⎢ f 2t ( Px , Py , Pz , Oi , O j , Ok ) ⎥
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢⎣ θ nt ⎥⎦ ⎢⎣ f nt ( Px , Py , Pz , Oi , O j , Ok ) ⎥⎦

The complete solutions for Eq. (14) can be obtained by analyzing the influence each drive
described in Eq. (11) on the cutter location. One important property is given before deriving
inverse kinematics for rotary motions.
Property: Prismatic joints have no effect on orientation vector.
Proof: From Eq. (3) and Eq. (5), general homogenous transformation matrices for translational
and rotary joints are respectively:
⎡ a11 a12 a13 b1 ⎤ ⎡1 0 0 c1 ⎤ (15)
⎢a ⎥
a22 a23 b2 ⎥ ⎡ A3×3 b3×1 ⎤ ⎢ ⎥
0 1 0 c2 ⎥ ⎡ I3×3 c3×1 ⎤
Tr = ⎢ 21 =⎢ ⎥ , Tt = ⎢ =
⎢ a31 a32 a33 b3 ⎥ ⎣ 01×3 1 ⎦ ⎢0 0 1 c3 ⎥ ⎢⎣ 01×3 1 ⎥⎦
⎢ ⎥ ⎢ ⎥
⎣0 0 0 1⎦ ⎣0 0 0 1 ⎦

The productions of the two matrices in a different order are

⎡A Ac + b ⎤ ⎡ A b + c⎤ (16)
Tr ⋅ Tt = ⎢ ⎥ , Tt ⋅ Tr = ⎢
⎣0 1 ⎦ ⎣0 1 ⎥⎦

Since the orientation vector is only relative to the upper-left 3×3 sub-matrix, prismatic joints
have no effect on the orientation vector no matter where and in which order it appears in the
7
whole kinematic chain. Consequently, all items produced by prismatic joints and coordinate
frame offsets in Eq. (11) can be removed. The forward kinematics for the orientation vector can
be expressed as:

⎡O ⎤ S pξˆpθ p S sξˆsθ s ⎡ rot ⎤ (17)


⎢0⎥ = e e ⎢0⎥
⎣ ⎦ ⎣ ⎦

S ξˆ θ
where e p p p and e Ssξ sθs stand for the homogeneous transformation matrices caused by the
ˆ

primary and secondary revolute joints in the whole kinematic chain. The primary revolute joint is
nearer to the workpiece while the secondary revolute joint is nearer to the cutting tool. S p and
S s are -1 or +1 depending on whether the revolute joint is on the table or on the spindle.
Solutions for the two rotary movements can be obtained by using screw theory. Applying
Paden-Kahan sub-problem 2 [12] with u = rot , v = O , three coefficients can be obtained:

k1 =
(ω ω ) ω u − ω
T
p s
T
s
T
p v
, k2 =
(ω ω ) ω v − ω
T
p s
T
p
T
s u
, k3 = ±
1 − k12 − k2 2 − 2k1k2ω Tp ω s (18)

(ω ω ) − 1 (ω ω ) − 1
2 2 2
T
p s
T
p s ω p × ωs

By letting

z = k1ω p + k2ω s + k3 (ω p × ω s ) (19)

− S pξˆpθ p
and applying Paden-Kahan sub-problem 1 [12] to solve e Ssξ sθs u = z and e v = z , θ p and
ˆ

θ s can be obtained as:

θ p = − S p ⋅ atan2 (ω pT ( z1 '× v ') , z1 'T v ') , where z1 ' = z − ω p (ω pT z ), v ' = v − ω p (ω pT v ) (20)

θ s = S s ⋅ atan2 (ω sT ( u '× z2 ') , u 'T z2 ') , where z2 ' = z − ωs (ωsT z ), u ' = u − ωs (ωsT u) (21)

In Eq. (18), both positive and negative signs can be chosen for k3 . For the same CL data, two
possible solutions exist. If both solutions satisfy the movement range, the sign is chosen to
ensure continuity and the shorter rotational angle movement of the primary rotary axis is chosen.

2.4 Inverse kinematics for translational motions


A constraint when configuring a five-axis machine tool is that there must not be a rotary axis
between any two of the translational axes in the whole kinematic chain [5, 28]. Consequently, the
forward kinematics for translational motions can be expressed as:

8
⎡P⎤ ⎡ rpt ⎤ (22)
⎢ 1 ⎥ = g wt (θ pw , θ sw , θ x , θ y , θ z , θ pt , θ st ) ⎢ 1 ⎥
⎣ ⎦ ⎣ ⎦
⎡1 0 0 Sx x ⎤
⎢0 1 0 S y y ⎥⎥ ξˆptθ pt ξˆstθ st ⎡r ⎤
= [ gbw (0)] e pw pw e−ξ swθsw ⎢ e [ gbt (0) ] ⎢ pt ⎥
−1 −ξˆ θ ˆ
e
⎢0 0 1 Sz z ⎥ ⎣1⎦
⎢ ⎥
⎣0 0 0 1 ⎦

where Si ( i = x, y, z ) are -1 or 1 depending on whether the prismatic joint is on the table or on


the spindle. θ pw and θ sw stand for movements of the primary and secondary revolute joints in
the whole kinematic chain located on the worktable; θ pt and θ st stand for movements of the
primary and secondary revolute joints in the whole kinematic chain located on the spindle. Only
two of these four rotary freedoms can appear in the whole kinematic chain, which depends on the
configuration of the five-axis machine tool. For table tilting type, the elements in Eq. (22) are
expressed for the revolute motions as:

−ξˆpwθ pw −ξˆpθ p −ξˆptθ pt


, e −ξ swθsw = e−ξ sθ s , e = e −ξ stθst = I 4×4
ˆ ˆ ˆ
e =e (23)

whereas for the spindle tilting type:

−ξˆpwθ pw ξˆptθ pt ξˆpθ p


= e −ξ swθsw = I 4×4 , e , eξ stθst = eξ sθ s
ˆ ˆ ˆ
e =e (24)

For the table/spindle tilting type,

−ξˆpwθ pw −ξˆpθ p ξˆptθ pt


= eξ sθs , e −ξ swθ sw = eξ stθst = I 4×4
ˆ ˆ ˆ
e =e ,e (25)

where θ p and θ s are movements for the primary and secondary revolute joints in the whole
kinematic chain solved by inverse kinematics for rotary motions. The primary revolute joint is
nearer to the workpiece while the secondary revolute joint is nearer to the cutting tool.

By defining,

⎡ x⎤ ⎡ Sx x ⎤ ⎡Sx 0 0 0⎤ ⎡ x ⎤ (26)
⎢ ⎥ ⎢ ⎥ ⎢ 0 ⎥⎥ ⎢⎢ y ⎥⎥
⎡ Mc ⎤ ⎢ y ⎥ ⎡ Mcs ⎤ ⎢ S y y ⎥ ⎢ 0 Sy 0 ⎡ Mc ⎤
⎢ 1 ⎥ = ⎢z⎥ ,⎢ 1 ⎥ = ⎢S z⎥ = ⎢ 0 0⎥ ⎢ z ⎥
= S 4×4 ⎢ ⎥
⎣ ⎦ ⎣ ⎦ z 0 Sz ⎣ 1 ⎦
⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥
⎣ ⎦
1 ⎣ 1 ⎦ ⎣0 0 0 1⎦ ⎣ 1 ⎦

Then Eq. (22) can be rewritten as

9
⎡P⎤ ⎡ rpt ⎤ (27)
⎢ 1 ⎥ = g wt (θ1w , θ 2 w , θ x ,θ y , θ z , θ1t , θ 2t ) ⎢ 1 ⎥
⎣ ⎦ ⎣ ⎦
⎡I Mcs ⎤ ξˆptθ pt ξˆstθst ⎡r ⎤
= [ gbw (0)] e pw pw e−ξ swθsw ⎢ 3×3 e [ gbt (0) ] ⎢ pt ⎥
−1 −ξˆ θ ˆ
⎥ e
⎣ 0 1 ⎦ ⎣1⎦
⎛ ⎡03×3 Mcs ⎤ ⎞ ξˆptθ pt ξˆstθ st ⎡r ⎤
= [ gbw (0)] e e [ gbt (0) ] ⎢ pt ⎥
−1 −ξˆpwθ pw −ξˆswθ sw
e ⎜ I 4×4 + ⎢ ⎥ ⎟e
⎝ ⎣ 0 1 ⎦⎠ ⎣1⎦
⎛ ξˆ θ ˆ ⎡ r ⎤ ⎡ Mcs ⎤ ⎞
= [ gbw (0) ] e e −ξ swθsw ⎜ e pt pt eξ stθst [ gbt (0)] ⎢ pt ⎥ + ⎢
−1 −ξˆpwθ pw ˆ
⎥⎟
⎝ ⎣ 1 ⎦ ⎣ 1 ⎦⎠

Inverse kinematics solutions for translational motion are finally obtained as:

⎧ ⎡ Mcs ⎤ ξˆswθsw ξˆpwθ pw ⎡P ⎤ ⎡r ⎤ (28)


[ gbw (0)] ⎢ ⎥ − eξ ptθ pt eξstθst [ gbt (0)] ⎢ pt ⎥
ˆ ˆ
⎪⎢ ⎥ =e e
⎪⎣ 1 ⎦ ⎣1⎦ ⎣1⎦

⎪ ⎡ Mc ⎤ = S ⎡ Mcs ⎤
⎪ ⎢⎣ 1 ⎥⎦ 4× 4 ⎢
⎣ 1 ⎦

2.5 General kinematics module for a sample 5 axis machine


Deckel Maho DMU 50 eVolution five-axis CNC machining center [10] is modeled as an
example to demonstrate the generalized kinematic modeling of five axis machines, see Fig.4. A
special feature of the machine is that the B and C rotary axes are non-orthogonal. The center axes
of the two rotary drives cross in a point at a vertical distance d from the fixed coordinate frame
x0 y0 z0 . Three translational axes are on the spindle.
The comparison of the inverse kinematics calculation method in [10] based on
Denavit-Hartenberg notations, and the proposed general kinematics module based on screw
theory is presented in Table 1.
Suppose d = 50mm , and the tool path data in [17] are used as an example. The differences
between the general kinematics module proposed in this paper and the conventional module
based on Denavit-Hartenberg [10] notations are shown in Fig.5. The kinematic computation
differences between the translational and rotary axes are less than 10×10-14 mm and 1×10-15
radian, respectively.
The modeling example shows that the proposed generalized kinematic module has the following
advantages when compared to the conventional kinematics module:
• By using screw theory, all the points and vectors are relative to the base coordinate
system. There is no need to establish local coordinate frames on every joint, or calculate
the transformation matrices for the adjacent coordinate frames as done in
Denavit-Hartenberg notations.
• The module proposed here can give explicit inverse kinematics solutions for both rotary
and translational motions. There is no need to derive for specific five-axis configurations.
This is especially convenient for complex configurations, for example, when two rotary
axes are non-orthogonal [10].

10
3. Non-singular tool path generation
In Eq. (20), when the unit tool orientation vector v in the workpiece coordinate frame is
parallel to the unit vectors pointing in the positive direction of the primary rotary axis ω p in the
whole kinematic chain, it leads to v ' = 0 . As a result, both arguments in Eq. (20) become zero
and the value of θ p is not defined, which is the singular point of the machine. When the tool
path traverses the singular position, the command for the primary rotary drive is not continuous,
and usually experiences a 180 degree reversal. The discontinuity of the primary rotary axis is
illustrated in Fig.6 Since the inverse kinematics solutions for translational motion need
displacements of rotary axes, as shown in Eq. (28), the corresponding displacements of
translational axes are also discontinuous. Discontinuous motion leads to unacceptable surface
finish on the part and abrupt inertial load changes on the drives.
This section presents a singularity avoidance method by deforming tool orientation vectors that
are fitted to C3 continuous splines independent of machine tool kinematics. The splines are
needed to deform the tool path within the tolerance of the part analytically. The rational
movement for tool orientation vectors is represented by a fifth degree B-spline curve in the
quaternion space, while the rational movement for tool tip coordinates is represented by fifth
degree B-splines in the Euclidean space. The coordinated motion is accomplished by fitting
both spline types to arc-length parameter of the tool tip positions. Finally an algorithm to avoid
singularities based on tool path deformation has been proposed by utilizing the splines.

3.1. C3 tool path generation with splines


Rational B-spline spherical motions are represented here as B-spline curves in the space of
quaternions due to its convenience for singularity avoidance [29-31]. A quaternion is a hyper
complex number of the form q = [ q1 , q2 , q3 , q4 ] = q1i + q2 j + q3 k + q4 , where i , j , k are
quaternion units. Note the unit vectors in Euclidean three-space before and after a spherical
displacement are v and v ' , which can be represented by quaternions V = [ v ,1] and
V' = [ v ',1] respectively. The unit vector coordinate transformation under a spherical
displacement can be represented by using quaternion operations:

V' = qVq * (29)

where q * denotes the conjugate of the quaternion q . For q = [q1 , q2 , q3 , q4 ] ,


q* = [−q1 , − q2 , − q3 , q4 ] .
Spherical motion represented by quaternion operations is shown in Fig.7.
The components qi are associated with the Euler parameters of a rotation as

θ θ θ θ (30)
q1 = s1 cos , q2 = s2 cos , q3 = s3 cos , q4 = sin
2 2 2 2

where s = ( s1 , s2 , s3 ) is the unit vector along the axis of rotation with angular displacement θ .
Note that in Eq. (30), q12 + q2 2 + q32 + q4 2 = 1 , and the corresponding quaternion is called a unit
quaternion. The unit vector coordinate transformation under a spherical displacement can also be
represented by using a non-unit quaternion q :

11
qVq * (31)
V '=
qq *

The quaternion representation in Eq. (31) can be recast in a 4×4 matrix form [30] as:

⎡ H ( q ) ⎤⎦ (32)
V '= ⎣ V
S (q )

where

S (q) = q12 + q2 2 + q32 + q4 2 (33)

⎡⎣ H ( q ) ⎤⎦ = ⎡⎣q + ⎤⎦ ⎡⎣q − ⎤⎦ (34)

with

⎡ q4 -q3 q2 q1 ⎤ ⎡ q4 -q3 q2 -q1 ⎤ (35)


⎢q q4 -q1 ⎥
q2 ⎥ ⎢q q4 -q1 -q2 ⎥⎥
⎡⎣ q + ⎤⎦ = ⎢ 3 ; ⎡⎣q − ⎤⎦ = ⎢ 3
⎢ -q2 q1 q4 q3 ⎥ ⎢ -q2 q1 q4 -q3 ⎥
⎢ ⎥ ⎢ ⎥
⎣ -q1 -q2 -q3 q4 ⎦ ⎣ q1 q2 q3 q4 ⎦

Two rotation quaternions, q = kq and q , where k is a scalar, represent one and the same
rotation since

⎡⎣ H ( q ) ⎤⎦ ⎡⎣ H ( kq ) ⎤⎦ k 2 ⎡⎣ H ( q ) ⎤⎦ ⎡⎣ H ( q ) ⎤⎦ (36)
= = =
S (q) S ( kq ) k 2S (q) S (q)

More details about using quaternions to represent spherical motions can be found in [30]. Here, a
C3 continuous interpolating B-spline curve is constructed on the 4D sphere in quaternion space as
described in Piegl and Tiller [32]. A set of unit quaternions qi = ⎡⎣ q1,i , q2,i , q3,i , q4,i ⎤⎦ ( i = 0,1,..., N )
are obtained first for the corresponding tool orientation vectors
Oi = ⎡⎣Oi ,i , Oi , j , Oi ,k ⎤⎦ ( i = 0,1,..., N ) , where N + 1 is the total number of discrete tool orientation
vectors along the five-axis tool path. Denoting the reference unit vector as Or = ⎡⎣Or ,i , Or , j , Or ,k ⎤⎦ ,
which can be chosen arbitrarily, the corresponding unit quaternion mapped from a tool
orientation vector is calculated by

⎧ Or × Oi (37)
⎪ si = O × O
⎪ r i
⎨θi = arcos ( Or ⋅ Oi )
⎪ ⎛ θi θi ⎞
⎪qi = ⎜ si cos ,sin ⎟
⎩ ⎝ 2 2⎠

A pth-degree B-spline curve in quaternions space is defined by,

12
N
(38)
Cq ( w ) = ∑ N i , p ( w ) Qi 0 ≤ w ≤1
i =0

where the N i , p ( w ) are the pth-degree B-spline basis functions defined on the non-uniform knot
vector W = {w0 , w1 ,… , wN + p +1} , and the {Qi } are the control points.
Here, a fifth degree B-spline curve that passes through a set of quaternions
T
qi = ⎡⎣ qi ,1 , qi ,2 , qi ,3 , qi ,4 ⎤⎦ , i = 0,1, …, N is fit. The knot vector, B-spline basis and control points
are evaluated to construct the curve. Parameter values, wi , i = 0,1, … , N , are assigned to each
position vectors qi , using the centripetal method as described in [32]. By letting
N
d = ∑ acos ( Oi ⋅ Oi −1 ) , then
i =1

⎧ w0 = 0, wN = 1 (39)

⎨ acos ( Oi ⋅ Oi −1 )
⎪ wi = wi −1 + , i = 1, … , N − 1
⎩ d

The knot vector is calculated as [32].

⎧ w0 = = wp = 0, wm − p = = wm =1 = 1 (40)

⎨ 1 j + p −1
⎪ j + p p ∑ wi ,
w = j = 1, ,n − p
⎩ i= j

B-spline basis functions N i , p ( w ) are evaluated recursively at the spline knot vector w as:
⎧ ⎧1 if wi ≤ w < wi +1 (41)
⎪ N i ,0 ( w ) = ⎨
⎪ ⎩0 otherwise

⎪ N ( w) = w − wi N ( w) + wi + p +1 − w N
i +1, p −1 ( w)
⎪ i, p wi + p − wi
i , p −1
wi + p +1 − wi +1

Control points are obtained by solving the ( N + 1) * ( N + 1) system of linear equations as:

n
(42)
qk = ∑ N i , p ( wk ) Qi , k = 0,1,...N
i =0

The pth-degree B-spline curve in the quaternion space defined in Eq. (38) has been obtained by
using Eq. (39) – Eq. (42). The tool orientation spline O ( w ) can be oconstructed by using the
quaternion spline

Cq ( w ) Or ( Cq ( w ) )
*
(43)
⎡⎣O ( w ) ,1⎤⎦ =
Cq ( w ) ( C q ( w ) )
*

Tool tip positions are also represented by a fifth order B-spline to guarantee C3 continuity and its
13
details can be found in the previous article [19]. In order to accomplish coordinated motion
between rotary and translational drives, both parameters of tool orientation vector spline and tool
tip position spline are fitted to the arc-length parameter by using seventh order Bézier curve, and
ninth order polynomials respectively. More details about generating tool tip position spline, and
the method to fit the spline parameters to arc-length can be found in [19].
The proposed method is illustrated on a five axis tool path given in [17], and the position and
orientation splines are shown in Fig.8.

3.2. Avoiding singularities by local deformation of the tool path


The tool path is deformed close to singular configurations zone defined by a circle but at the
expense of a negligibly small tool orientation deviation that does not violate the tolerance of the
part. Points on the singular circle have equal included angles, called singular angle. The
illustration of tool orientation deformation is presented in Fig.9, and the singularity avoidance
algorithm is summarized as Fig.10.
First, check whether the tool orientation curve passes through the singular circle. Since it is
difficult to obtain complete solution for B-spline function, a numerical method is adopted to
judge whether there are intersections of tool orientation spline and singular circle. Parameter w
is divided equally into M + 1 parts (for example, M = 1e4 ) in space [0,1] as:

1 (44)
wi = * i ; i = 0,1, 2,..., M
M

The tool orientation vector O ( wi ) corresponding to parameter wi is evaluated as:

Cq ( wi ) Or ( Cq ( wi ) )
*
(45)
⎡⎣O ( wi ) ,1⎤⎦ = ; i = 0,1, 2,..., M
Cq ( wi ) ( Cq ( wi ) )
*

By noting the unit vector of the singular direction as Os , the corresponding included angle
between tool orientation vector O ( wi ) and Os is calculated as:

Angi = arcos ( O ( wi ) ⋅ Os ) ; i = 0,1, 2,..., M (46)

If any of the including angles is less than the singular angle ε (for example, ε = 1e-4 radian),
the tool orientation curve must pass through the singular circle. Then quaternion qm is
calculated to modify the control points of the tool orientation spline. The spline parameters at the
two intersections are noted as w1 * and w2 * , which can be calculated numerically by using the
bisection method. Omid is noted as the midpoint of the two intersections along the singular
circle, with a shorter arc length. Then, qm is the quaternion translating from ω p to point Omid ,
but with a double rotating angle in order to ensure the whole singular part of the path is out of
the singular circle after deformation, as shown in Fig.11. qm can be calculated by using Eq.
(47)

14
⎧ Os × Omid (47)
⎪ sm = O × O
⎪ s mid
⎨θ m = 2arcos ( Os ⋅ Om )
⎪ ⎛ θm θm ⎞
⎪qm = ⎜ sm cos ,sin ⎟
⎩ ⎝ 2 2 ⎠

Next, the control points that influence the singular parts are modified. Suppose the minimum
knot vector space in wi , i = 0,1, …, N including [ w1*, w2 *] is [ wm , wn ] . The control points
that influence the singular part of the tool orientation part are Qi , ( m − p ≤ i ≤ n ) .
The new control points after deformation are

⎧⎪qmQi for m − p ≤ i ≤ n (48)


Qnew = ⎨
⎪⎩Qi for other i ∈ [ 0,1, 2,..., N ]

The quaternion spline is reconstructed as:

N
(49)
Cqnew ( w) = ∑ N i , p ( w ) Qnew,i 0 ≤ w ≤1
i =0

Followed by recalculating the tool orientation spline Onew ( w) as

Cqnew ( w ) Or ( Cqnew ( w ) )
*
(50)
[Onew ( w),1] =
Cqnew ( w ) ( Cqnew ( w ) )
*

The modified tool orientation spline near a singular circle is shown in Fig.11. The largest offset
of the tool orientation spline is two times of the singular angle. Since only the control points
which influence the singular part of the orientation spline are modified, the orientation spline is
deformed locally near the singular circle.
The proposed singularities avoiding algorithm has an advantage over post processor based
compensations based on offsets [27]. The offset method increases or decreases the rotation angle
by ±90° in order to keep the rotary commands continuous. The tool path deformation algorithm
proposed in this paper handles the singularities directly in the woorkpiece coordinate frame,
which can always guarantee consistent result. The comparison of the proposed algorithm and the
method in [27] is given in Fig.12.
The tool orientations are changed in an acceptable tolerance locally around the singular area,
while the tool tip positions are kept the same. However, the cutting point may change slightly,
which causes certain local machining error, which is shown in Fig.13 (a). The machining error
d e is a function of S , Ts , P , O and α represented as: d e = f ( S , Ts , P , O , α ) , where S
is the cutting surface; Ts is the cutting tool shape; P is the cutting location point; O and
O ' are tool orientation vectors before and after tool path deformation; α is the amount of the
tool orientation vector change, and d e is the machining error caused by tool path deformation.
An example is given in Fig.13 (b), which has a flat-end mill and flat surface. The machining
1
error is calculated as: d e = D sin α . For a 10mm diameter end mill, α = 2ε = 5e − 4 , and he
2
15
resulting error is d e = 2.5um , which is acceptable in normal milling but not in ultra-precision
machining applications.

4. Experimental Results
The proposed kinematics module, tool path generation algorithm and method for avoiding
kinematic singularities are experimentally verified on a five-axis CNC machine tool controlled
by an in-house developed open and modular CNC system (Fig.14). The drives are controlled
with one millisecond discrete time intervals using by proportional, integral and derivative (PID)
controllers. The kinematic configuration of the experimental machine tool is presented in Fig.15.
The configuration information needed in the inverse kinematics calculation is as follows:
ω p = ω c = [0 0 1]T , ω s = ωa = [1 0 0]T , q p = qc = [0 0 0]T , qs = qa = [0 0 0]T ,
⎡ −1 0 0 0⎤
⎢ 0 −1 0 0 ⎥⎥
u = rot = [0 0 1]T , v = O = [Oi Oj Ok ]T , S p = S s = −1 , S4×4 =⎢ .
⎢0 0 1 0⎥
⎢ ⎥
⎣0 0 0 1⎦
θc = θ p , θ a = θ s can be calculated by using Eq. (18) – (21).
The inverse kinematics for translational motion is:
⎧ ⎡ Px ⎤ ⎡0 ⎤ (51)
⎪ ⎢ ⎥ ⎢ ⎥
⎪ ⎡ Mcs ⎤ = eξˆaθa eξˆcθc [ g (0)] ⎢ Py ⎥ − [ g (0) ] ⎢0 ⎥
⎪ ⎢⎣ 1 ⎥⎦ bw
⎢ Pz ⎥ bt
⎢0 ⎥
⎪ ⎢ ⎥ ⎢ ⎥
⎪ ⎣1⎦ ⎣1 ⎦

⎪⎡ x ⎤
⎪⎢ y ⎥ ⎡ Mcs ⎤
⎪ ⎢ ⎥ = S 4×4 ⎢ ⎥
⎪⎢ z ⎥ ⎣ 1 ⎦
⎪⎢ 1 ⎥
⎩⎣ ⎦

⎡1 0 0 0 ⎤
⎢0 1 0 0 ⎥
with g bw (0) = ⎢ ⎥ , gbt (0) = I 4×4 , where LTya , z = 150mm , Lac , z = 70mm
⎢ 0 0 1 LTya , z + Lac , z ⎥
⎢ ⎥
⎣0 0 0 1 ⎦
are offsets, determined by the geometry of the rotary table.
Since the unit directional vector of the primary rotary axis is ωc = [0 0 1]T , the singular
direction vector for this five-axis machine is Os = ωc = [0 0 1]T .
The tool path with a singular position is used in the experiment as shown in Fig.16, which is
generated by using the off-line tool path generation method as proposed in Section 3.1.
The singular angle chosen in the experiment is 2.5e-4 radian, and the singularity avoidance
results are presented in Fig.17, which shows that the tool orientation curve is out of the singular
circle after deformation, and the orientation curve is only deformed locally near the singular
circle.
The research CNC system optimizes the feed by respecting drive constraints as presented
previously in [33]. The velocity, acceleration and jerk limits of the five axes are considered when
16
finding the most optimal feed along the toolpath, in order to ensure smooth and linear operation
of the servo drives with minimal tracking error. The velocity, acceleration and jerk limits of the
single drives are as follows:

⎧Vxlimt = Vylimt = Vzlimt = 250mm / s (52)


⎪ Axlimt = Aylimt = Azlimt = 2500mm 2 / s
⎪⎪
J = J ylimt = J zlimt = 50000mm3 / s
⎨ xlimt
⎪Valimt = 2.897rad / s; V2climt = 5.061rad / s
⎪ Aalimt = 43.633rad3 / s ; Aclimt = 34.9063rad / s
2

⎪⎩ J alimt = 450rad / s ; J climt = 400rad / s

The position commands for translational and rotary axes after avoiding singularities and feedrate
optimization are presented in Fig.18. The velocity, acceleration, and jerk of reference commands
for translational and rotary axes are shown in Fig.19. The tracking error of single drive for the
testing toolpath after avoiding singularities is shown in Fig.20. The results show that the tool
path after avoiding singularities can be tracked continuously well.

5. Conclusion
The automatic kinematic configuration and smooth contour machining of five-axis machine tools
are crucial for their use in die, mould and aerospace industry. It is shown that the screw theory
has computational and modeling advantages in developing generalized models for variety of
five-axis configurations. When the proposed kinematic model is coupled with C3 continuous
splined tool paths, it is possible to detect the kinematic singularities and avoid them by
deforming the splined tool paths while achieving smoother velocity, acceleration and jerk. The
proposed methods are experimentally demonstrated on a five-axis research machine tool
controlled by an in house developed research CNC.

Acknowledgement: This research is supported by NSERC CANRIMT, NSERC – Pratt &


Whitney Canada Research Chair and the National Natural Science Foundation of China under
Grant No. 51005086.

Appendix

Summary of screw theory notations


As shown in Fig.A.1: (a) the revolute joint whose rotary axis passes through the origin of the
base coordinate frame is named as a pure revolute joint; (b) the revolute joint whose rotary axis
does not necessarily pass through the origin of the base coordinate frame is named as a general
revolute joint; (c) the joint which only has translational movement is named as a prismatic joint.
For a pure revolute joint whose unit vector is ω , when the joint rotates with a constant unit
velocity, the velocity of any point p on the joint is expressed as:

p ( t ) = ω × p ( t ) = ωˆ p ( t ) (A.1)

which has a solution as:


17
p ( t ) = eωˆ t p ( 0 ) (A.2)

The transfer matrix for a pure rotary joint becomes:

R (ω , θ ) = eωˆθ (A.3)

with the Taylor's series expansion of eωˆ θ as:

(ωˆ θ ) (ωˆ θ ) (A.4)


2 3

eωˆθ = I + ωˆ θ + + +
2! 3!

⎧⎪ωˆ 2 = ωω T − ω 2 I 2×2
Since ⎨ , and higher powers of ω̂ can be calculated recursively, Eq. (A.4)
⎪⎩ωˆ = −ωˆ
3

is re-written as

⎛ θ3 θ5 ⎞ ⎛θ 2 θ 4 θ6 ⎞ 2 (A.5)
eωˆθ = I 3×3 + ⎜ θ − + − ⎟ ω
ˆ + ⎜ − + − ⎟ ωˆ
⎝ 3! 5! ⎠ ⎝ 2! 4! 6! ⎠

which is simplified as (Eq. 4 in the paper):

eωˆθ = I 3×3 + ωˆ sin θ + ωˆ 2 (1 − cos θ ) (A.6)

For a general revolute joint whose unit vector is ω and any point on the rotary axis is q ,
suppose the joint rotates in a constant unit velocity, then the velocity of any point p on the
joint is written as

p (t ) = ω × ( p (t ) − q ) (A.7)

⎡ωˆ v⎤
Defining ξˆ = ⎢ , with v = −ω × q , Eq. (A.7) can be rewritten as
⎣0 0 ⎥⎦

⎡ p ⎤ ⎡ωˆ −ω × q ⎤ ⎡ p ⎤ ˆ ⎡ p ⎤ ⎡ p⎤ (A.8)
⎢0⎥ = ⎢0 ⎥ ⎢ ⎥ = ξ ⎢ ⎥ ⇒ p = ξˆ p, with p = ⎢ ⎥
⎣ ⎦ ⎣ 0 ⎦ ⎣1⎦ ⎣1⎦ ⎣1⎦

which has the following solution:

p ( t ) = eξ t p ( 0 )
ˆ (A.9)

Eq. (A.9) is valid for a prismatic joint with unit vector v as well. Since the velocity of any point
p on the prismatic joint is p ( t ) = v , the solution (Eq. (A.9)) can also be written with
⎡0 v ⎤
ξˆ = ⎢ ⎥ . Thus, the transfer matrix for both general revolute joint and prismatic joint can be
⎣0 0⎦
written as
18
⎡ωˆ v⎤
( )
(A.10)
R ξˆ, θ = eξθ , with ξˆ = ⎢
ˆ

⎣0 0 ⎥⎦

The Taylor's series expansion of eξθ is


ˆ

( ξˆθ ) (ξˆθ )
(A.11)
2 3

ξˆθ
e = I 4×4 + ξθ +
ˆ + +
2! 3!

For a prismatic joint, ω = 0, ξˆ 2 = ξˆ3 = ξˆ 4 = = 0,

⎡I vθ ⎤ (A.12)
eξθ = I 4×4 + ξˆθ = ⎢ 3×3
ˆ

⎣ 0 1 ⎥⎦

which is Eq. (5) in the main body of the paper.

⎡I ω × v⎤
For a general rotary joint, ω ≠ 0 , defining g = ⎢ 3×3
1 ⎥⎦
, then
⎣ 0

⎡I −ω × v ⎤ ⎡ωˆ v ⎤ ⎡ I 3×3 ω × v ⎤ ⎡ωˆ ωω T v ⎤ ⎡ωˆ hω ⎤ (A.13)


ξˆ ' = g −1ξˆ g = ⎢ 3×3 =⎢ ⎥=⎢
⎣ 0 1 ⎥⎦ ⎢⎣ 0 0 ⎥⎦ ⎢⎣ 0 1 ⎥⎦ ⎣ 0 0 ⎦ ⎣0 0 ⎥⎦

⎡ωˆ 2 0 ⎤ ˆ 3 ⎡ωˆ 3 0⎤
( ) ( )
2
Since ξˆ ' = ⎢ ⎥, ξ ' = ⎢ ⎥, , combining Eq. (A.11)
⎣0 0⎦ ⎣0 0⎦

⎡eωˆθ hωθ ⎤ (A.14)


eξ 'θ = ⎢
ˆ

⎣ 0 1 ⎦

Then

ξˆθ
e =e gξˆ 'θ g −1 ξˆ 'θ
⎡ eωˆiθi
= ge g = ⎢ −1 (I 3×3 − eωˆiθi ) (ω × v ) + ω ω
i i i
T
vθ ⎤

i i i
(A.15)

⎢⎣ 01×3 1 ⎥⎦

which is Eq. (3) in the main body of the paper. More details of screw theory can be found in [12].

References:
[1]S, Sakamoto and I, Inasaki, Analysis of generating motion for five-axis machining centers. Transactions of
the Japan Society of Mechanical Engineers, 1993; Series C, 59(561): pp. 1553-1559 (in Japanese).
[2]T. Moriwaki, Multi-functional machine tool. Cirp Annals-Manufacturing Technology, 2008; 57(2): pp.
736-749.
[3]R.S. Lee and C.H. She, Developing a postprocessor for three types of five-axis machine tools.
International Journal of Advanced Manufacturing Technology, 1997; 13(9): pp. 658-665.
[4]C. She and R. Lee, A Postprocessor Based on the Kinematics Model for General Five-Axis Machine Tools.
Journal of Manufacturing Processes, 2000; 2(2): pp. 131-141.

19
[5]O.R. Tutunea-Fatan and H.Y. Feng, Configuration analysis of five-axis machine tools using a generic
kinematic model. International Journal of Machine Tools & Manufacture, 2004; 44(11): pp. 1235-1243.
[6]C.H. She and C.C. Chang, Design of a generic five-axis postprocessor based on generalized kinematics
model of machine tool. International Journal of Machine Tools & Manufacture, 2007; 47(3-4): pp. 537-545.
[7]A.C. Lin and L. Tzu-Kuan. A spherical two-circle approach to determining rotation angles for 5-axis NC
machines with orthogonal rotation axes. in Computer Science and Automation Engineering (CSAE), 2012
IEEE International Conference on. 2012.
[8]J. Denavit and R.S. Hartenberg, A kinematic notation for lower-pair mechanisms based on matrices.
Journal of Applied Mechanics, 1955; 22: pp. 215-221.
[9]Y. Boz and I. Lazoglu, A postprocessor for table-tilting type five-axis machine tool based on generalized
kinematics with variable feedrate implementation. 2012: pp. 1-9.
[10]K. Sørby, Inverse kinematics of five-axis machines near singular configurations. International Journal of
Machine Tools and Manufacture, 2007; 47(2): pp. 299-306.
[11]Y.H. Jung, et al., NC post-processor for 5-axis milling machine of table-rotating/tilting type. Journal of
Materials Processing Technology, 2002; 130(SI): pp. 641-646.
[12]R.M. Murray, Z. Li and S.S. Sastry, A Mathematical Introduction to Robotic Manipulation. 1994, Florida:
CRC Press.
[13]J. Gallardo-Alvarado, Kinematics of a hybrid manipulator by means of screw theory. Multibody System
Dynamics, 2005; 14(3-4): pp. 345-366.
[14]J. Gallardo-Alvarado, J.M. Rico-Martinez and G. Alici, Kinematics and singularity analyses of a 4-dof
parallel manipulator using screw theory. Mechanism and Machine Theory, 2006; 41(9): pp. 1048-1061.
[15]Y. Moon, Reconfigurable machine tool design: theory and application. 2000, Ph.D. Dissertation, The
university of Michigan.
[16]S. Moon, et al., screw theory based metrology for design and error compensation of machine tools, in
ASME 2001 Design Engineering Technical Conferences(DETC 2001). 2001: Pittsburgh, Pennsylvania.
[17]R.V. Fleisig and A.D. Spence, A constant feed and reduced angular acceleration interpolation algorithm
for multi-axis machining. Computer-Aided Design, 2001; 33(1): pp. 1-15.
[18]Y. Liu, H. Li and Y.Z. Wang, Realization of a 5-axis NURBS Interpolation with Controlled Angular
Velocity. Chinese Journal of Aeronautics, 2012; 25(1): pp. 124-130.
[19]A. Yuen, K. Zhang and Y. Altintas, Smooth trajectory generation for five-axis machine tools. International
Journal of Machine Tools & Manufacture, 2013; 71: pp. 11-19.
[20]J.M. Langeron, et al., A new format for 5-axis tool path computation, using Bspline curves.
Computer-Aided Design, 2004; 36(12): pp. 1219-1229.
[21]W. Zhang, Y.F. Zhang and Q.J. Ge, Interference-free tool path generation for 5-axis sculptured surface
machining using rational Bezier motions of a flat-end cutter. International Journal of Production Research,
2005; 43(19): pp. 4103-4124.
[22]Q. Bi, et al. An algorithm to generate compact dual NURBS tool path with equal distance for 5-Axis NC
machining. in Proceedings of the Third international conference on Intelligent robotics and applications -
Volume Part II. 2010. Shanghai, China: Springer-Verlag.
[23]Y.H. Jung, et al., NC post-processor for 5-axis milling machine of table-rotating/tilting type. Journal of
Materials Processing Technology, 2002; 130(SI): pp. 641-646.
[24]W.T. Lei and Y.Y. Hsu, Accuracy enhancement of five-axis CNC machines through real-time error
compensation. International Journal of Machine Tools & Manufacture, 2003; 43(9): pp. 871-877.
[25]A. Affouard, et al., Avoiding 5-axis singularities using tool path deformation. International Journal of
Machine Tools & Manufacture, 2004; 44(4): pp. 415-425.

20
[26]M. Munlin, S.S. Makhanov and E. Bohez, Optimization of rotations of a five-axis milling machine near
stationary points. Computer-Aided Design, 2004; 36(12): pp. 1117-1128.
[27]Y. Boz and I. Lazoglu, A postprocessor for table-tilting type five-axis machine tool based on generalized
kinematics with variable feedrate implementation. International Journal of Advanced Manufacturing
Technology, 2013; 66(9-12): pp. 1285-1293.
[28]F.C. Chen, On the structural configuration synthesis and geometry of machining centres. Proceedings of
the Institution of Mechanical Engineers Part C-Journal of Mechanical Engineering Science, 2001; 215(6): pp.
641-652.
[29]K. Shoemake, Animating rotation with quaternion curves. Siggraph Comput. Graph., 1985; 19(3): pp.
245-254.
[30]Q.J. Ge and P.M. Larochelle, Algebraic motion approximation with NURBS motions and its application to
spherical mechanism synthesis. Journal of Mechanical Design, 1999; 121(4): pp. 529-532.
[31]J. Coburn and J.J. Crisco, Interpolating three-dimensional kinematic data using quaternion splines and
hermite curves. Journal of Biomechanical Engineering-Transactions of the Asme, 2005; 127(2): pp. 311-317.
[32]L. Piegl and W. Tiller, The NURBS book (2nd ed.). 1997: Springer-Verlag New York, Inc. 646.
[33]B. Sencer, Y. Altintas and E. Croft, Feed optimization for five-axis CNC machine tools with drive
constraints. International Journal of Machine Tools & Manufacture, 2008; 48(7-8): pp. 733-745.

List of Figures
Fig.1. Three classes of five-axis: (a) table-tilting type, (b) spindle-tilting type, (c) table/spindle
tilting type
Fig.2. Basic kinematic elements of five-axis machine tools: (a), (b), (c) prismatic joints; (d), (e),
(f) revolute joints; (g) workpiece and cutting tool
Fig.3 Kinematic chains of a table tilting 5-axis machine tool with A, C rotary axis
Fig.4 Side view sketch of a five-axis machine with non-orthogonal rotary axes, shown with the B
axis in θb = 0 position [10]

Fig.5 Inverse kinematics results calculated by classical Denavit-Hartenberg method minus the
results calculated by the proposed general kinematics module
Fig.6 Primary rotary axis for a tool motion through the singularity
Fig.7 Spherical motions represented by quaternion operations
Fig.8 Position and orientation splines example
Fig.9 Illustration of tool orientation deformation
Fig.10 Algorithm for avoiding singularity
Fig.11 Deformation result of the tool orientation spline near the singular circle
Fig.12 Comparison of the proposed singularities avoiding algorithm with the simple offset
method used in post processors.
Fig.13 Illustration of machining error caused by tool path deformation in (a) a general case; (b)
Flat-end milling and flat surface case
21
Fig.14 Five-axis machine tool used in experiments
Fig.15 Kinematics for the five-axis machine tool used in experiments
Fig.16 Tool path including singular position used in the experiment
Fig.17 Results of singularities avoidance
Fig.18 Position commands after avoiding singularities and feedrate optimization
Fig.19 Speed, acceleration, and jerk of reference commands for each drive: (a) speed of
reference commands for each drive; (b) acceleration of reference commands for each drive; (c)
jerk of reference commands for each drive
Fig.20 Tracking error for single drive after avoiding singularities
Fig.A.1 (a) pure revolute joint; (b) general revolute joint; (c) prismatic joint

22
Traditional kinematics module [10] Proposed general kinematics module
Seven coordinate frames are needed: Three coordinate frames are needed:
x0 y0 z0 : The base coordinate frame located in the center of the x0 y0 z0 : The base coordinate frame located in the center of the
table surface when B = C = 0 . table surface when B = C = 0 .
x1 y1 z1 : A translation of x0 y0 z0 at a distance d along z0 . xw yw z w : The workpiece coordinate frame, which is fixed on
x2 y2 z2 : A rotation of x1 y1 z1 at an angle +45° around x1 . the workpiece, with only translational offset related to x0 y0 z0 .
x3 y3 z3 : A rotation of x2 y2 z2 at an angle B around z 2 . xt yt zt : The tool coordinate frame, which is fixed on the
x4 y4 z4 : A rotation of x3 y3 z3 at an angle -45° around x3 . workpiece, with only translational offset related to x0 y0 z0 .
x5 y5 z5 : A translation of x4 y4 z4 at a distance − d along z 4 .
xw yw zw : The workpiece coordinate frame. Obtained by
rotating x5 y5 z5 at an angle −C around z5 .
xt yt zt : A frame fixed to the milling tool with the origin at the
tool tip
Relative movement between joints are needed: Configuration information needed is global:
Seven transfer matrixes which are derived by using the relative Only unit vectors of rotary and translational axes, any points
movement between each two adjacent local coordinate frame: on rotary axes (related to base coordinate frame) are needed:
T01 , T12 , T23 , T34 , T45 , T5w , T0t , the details of constructing the transfer 2 2 T
ω p = ω c = [0 0 −1]T , ω s = ωb = [0 − ]
matrixes can be found in [10] 2 2
q p = qc = [0 0 0]T , qs = qb = [0 0 d ]T , u = rot = [0 0 1]T
v = O = [Oi Oj Ok ]T , S p = S s = −1, S4× 4 = I 4× 4
Inverse kinematics solution is implicit: Inverse kinematics solution is explicit:
First: forward kinematics equation is derived First: inverse kinematics solutions for rotary axes
⎡ Px Oi ⎤ ⎡0 0 ⎤ θc = θ p , θb = θ s are calculated by using Eq. (18) – (21).
⎢P O ⎥ ⎢0 0 ⎥
⎢ y j⎥
= Twt ⎢ ⎥ , where T t = (T 1T 2T 3T 4T 5T w )−1 T t Second: inverse kinematics solutions for translational axes
⎢ Pz Ok ⎥ ⎢0 1 ⎥ w 0 1 2 3 4 5 0 x, y, z are calculated by
⎢ ⎥ ⎢ ⎥
⎣1 0 ⎦ ⎣1 0 ⎦ ⎧ ⎡ Px ⎤ ⎡0⎤
⎪ ⎢P ⎥ ⎢ ⎥
Second: inverse kinematics solutions for rotary axes θ c ,θ b ⎪⎡ ⎤ ξ b θb ξ c θc
∧ ∧
Mcs ⎢ y ⎥ − [ g (0)] ⎢0 ⎥
⎪ ⎢⎣ 1 ⎥⎦
= e e [ g bw (0) ] ⎢ Pz ⎥ bt
⎢0⎥
are derived by solving the forward kinematics equation.
⎪ ⎢ ⎥ ⎢ ⎥
Third: inverse kinematics solutions for translational axes ⎪ ⎣1⎦ ⎣1 ⎦
x, y, z are derived by using θ c ,θ b , and forward kinematics ⎨
⎪ ⎡ x ⎤
equation [10]. ⎪⎢ y ⎥ ⎡ Mcs ⎤
⎪ ⎢ ⎥ = I 4× 4 ⎢ ⎥
⎪ z⎢ ⎥ ⎣ 1 ⎦
⎪⎢ 1 ⎥
⎩⎣ ⎦
with gbw (0) = I 4× 4 , gbt (0) = I 4× 4 .

Table 1 Comparison of inverse kinematics calculation by using traditional, postprocessor based method [10]
and the proposed general kinematics module

23
Highlights
z Screw theory based generalized forward and inverse kinematics of five axis machine tools
are presented
z Tool tip and tool orientation positions are splined with smooth C3 continuity
z Tool path singularities are avoided by local deformation of tool orientation splines without
violating path tolerance

24
Figure1

A
z
z B Za z B
Zb Zb
Workpiece C Workpiece
A Zc Workpiece
Za A
Za
y y y
x x x
(a) (b) (c )
Figure2

vz
vy
°­O (Oi , O j , Ok ) Cutting tool
z ®
°̄ O 1
Zt
vx y Yt
P ( Px , Py , Pz )
Xt
x Ot
Zw Yw
(a) (b) (c )
Workpiece Ow Xw
Zb
Zc
Za Tb Tc
Zb
qa
Ta Yb
qb qc
Ob Xb
(d ) (e ) (f) (g)
Figure3

°­O (Oi , O j , Ok ) Cutting tool


® vz
°̄ O 1
P ( Px , Py , Pz )
Zc [0 0 1]T z
Tc Zt Yt
Z w Yw
Workpiece Ot Xt
Ow Xw
Workpiece chain
Tool chain
qc
Whole kinematic chain
qa
Ta
Z a [1 0 0]T
vy
Zb
Yb
y

Ob Xb
vx

x
Figure4

z1 y

2
z

3
z y1

2,
zt
Y yt

d z0
y0 B

C
45q
Figure5

-14
x 10
15
X axis
10 Y axis
Difference: mm
Z axis
5

-5
0 5 10 15 20 25
points
-15
x 10
1
C axis
0.5 B axis
Difference: rad

-0.5

-1
0 5 10 15 20 25
points
Figure6

Discontinuous commands for the primary rotary axis in a singular tool path
200
Included angles between tool orientation
vectors and the singular direction
150
Commands for the primary rotary axis

100

50
Angle:degree

-50

-100

-150

-200
0 0.5 1 1.5 2 2.5 3
Time:s
Figure7

s s s , s
1, 2 3 s 1

T
V ­V = > v ,1@
°
V' °V' = > v ',1@
°
v v' ® ª T Tº
°q « s cos , sin »
v v' 1 ° ¬ 2 2¼
°¯V' qVq *

O
Figure8

Tool orientation vector spline

Tool tip position spline


1

0.5
Z: mm

5
-5 0

Ok
0 100
-50 50 -0.5
0
-100
-1 -1
Y: mm X: mm
-1
0
0
1 1 Oi
Oj
Figure9

k
o
i j
Figure10

Read CL data from the CAM file

Tool tip position spline Tool orientation vector spline

no Orientation curve
traverses singular
position?

yes

Modify tool orientation curve

Feedrate optimization with drive constrants

Machining
Figure11

H
O w2*
Os
Omid
2H
qm
O w1*
Figure12

Singularities avoidance using simple offset in post processor Singularities avoidance using tool path deformation algorithm
Reference tool orientation trajectory Reference tool orientation trajectory
Actual tool orientation trajectory Actual tool orientation trajectory

1
1
0.5
0.5
0

Ok
Ok

0
-0.5
-0.5
1 -1
1 1
-1 0.5
1 0
0 0
0 -0.5
-1 -1 Oi Oj -1 -1 Oi
Oj
Figure13

O
S Ts D O' O O'
Zw Yw D
P
Zw Yw de P
Xw Ow Xw D de
Ow

a b
Figure14

Workstation PC
- Decode NC Program
- Generate Trajectory

PCI Bus (Reference commands)

dSPACE Real Time Controller (1kHz)


- Position Control (PID)
- Read ADC
- Quadrature Encoder Decoding
- Write DAC

Encoder Feedback

Motor Current Command


Figure15

z Cutting tool

Workpiece C
A Zc
Za LTya , z
Lac , z

x
Figure16

Tool tip position spline

Tool orientation vector spline


> 0,0,1@
T
H 2.5e-4 Os
90

80 1
70
0.5 Singular circle
60
0

Ok
Z: mm

50
-0.5
40

30 -1
1
20

10 0 1
0
Oj -1 -1
10 Oi
0 10
0
-10 -10
Y: mm X: mm
Figure17

Singular circle
Original orientation curve
After avoiding singularity

1
2H 5e-4

0.5

-0.5

-1
1
0.5 1
0 0.5
0
-0.5
-0.5
-1 -1
Figure18

Position - time of translational axes

100 X axis
Position: mm Y axis
Z axis
50

-50
0 1 2 3 4 5 6
Time: s
Position - time of rotary axes
4
A
2 C
Position: rad

-2

-4
0 1 2 3 4 5 6
Time: s
Figure19

Velocity - time
400
X axis
Velocity: mm/s 200 Y axis
Z axis

-200
0 1 2 3 4 5 6
Time: s
Velocity - time
10

A
Velocity: rad/s

5 C

-5
0 1 2 3 4 5 6
Time: s

(a)

Accleration - time
2000
Accleration: mm2/s

0
X axis
-2000 Y axis
Z axis

-4000
0 1 2 3 4 5 6
Time: s
Accleration - time
40
Accleration: rad /s

A
2

20
C
0

-20

-40
0 1 2 3 4 5 6
Time: s

(b)
4
x 10 Jerk - time
4
X axis
2 Y axis
Jerk: mm3/s
Z axis
0

-2

-4
0 1 2 3 4 5 6
Time: s
Jerk - time
400

A
200
Jerk: rad3/s

C
0

-200

-400
0 1 2 3 4 5 6
Time: s

(c)
Figure20

Tracking error for each drive


0.4
X axis

Tracking error: mm
0.2 Y axis
Z axis
0

-0.2

-0.4
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

-3
x 10
5
A axis
Tracking error: rad

C axis

-5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time: s
FigureA1

p t Z p t v
Z

Zb
p t
Yb
Ob p 0
Xb p 0 p 0

q Zb Zb
Yb Yb
Ob Xb Ob
Xb
a b c

You might also like