1. Introduction
Robots are widely used in various industrial applications, such as pick and place, welding, grinding, polishing, and processing. Appropriate trajectory planning is critical in these applications to prevent extremely high acceleration in the velocity profile, thereby avoiding excessive torque output, which can cause machine vibration and damage components. An acceleration/deceleration (ACC/DEC) constraint should therefore be applied when designing interpolators to ensure smooth robot movements. An interpolator generates position inputs for the servo drives in each sampling period for a given trajectory command.
Robot interpolation methods are usually divided into joint space and task space planning approaches. In the joint space planning method, inverse kinematics are used to compute moving angles for each joint. Each joint angle is then simultaneously interpolated to generate appropriate command positions to cause each joint to reach the task position. This approach is used in pick-and-place applications in which only the initial and final positions and the posture of the end-effector are relevant factors. In this approach, the continuity of the velocity and posture of the end-effector during the motion trajectory are not considered; thus, this approach may be unsuitable for grinding, welding, or polishing processes. In the task space method of planning the end-effector trajectory, both the continuity of velocity and posture rotation are considered. The trajectory of an end-effector typically comprises many line segments, and designing the velocity profile at the intersections of these line segments is the key challenge in the design of an interpolator.
Several approaches have been used to achieve smooth motion along a trajectory [
1], such as designing trapezoidal or bell-shaped velocity profiles by using cubic, quartic, or quintic polynomials [
2]. These profiles constrain the level of acceleration and jerk, allowing the vibrations of the robot to be used for useful work [
3,
4,
5,
6,
7]. Rossi et al. [
4] proposed that a trajectory could be computed by using an envelope of tangents for small line segments; this method can describe a given path with high accuracy. Tsai et al. [
5] combined the ACC/DEC before interpolation (ADBI) and the ACC/DEC after interpolation (ADAI) methods in a dynamic servo system to effectively reduce the contour error, but contour error is difficult to control accurately. Interpolating a robot’s orientation is another challenge in trajectory planning [
8,
9,
10]. The Euler angle and quaternion approaches are the most used approaches in orientation interpolation. However, the Euler angle approach can result in a singularity (gimbal lock), which can cause robots to malfunction. The quaternion approach can avoid this singularity by clearly defining the unit vector and the angle parameters [
8,
9]. Pu et al. [
10] presented a logarithmic quaternion interpolation method with a cubic B-spline curve that guaranteed the continuity of the rotation angle, angular velocity, angular acceleration, and path. The literature has rarely considered corner smoothing control between consecutive line segments, which may lead to a poor surface finish and high cycle time.
Corner smoothing interpolation methods were investigated in [
11,
12,
13]; these methods were applied to three- or five-axis machine tools. Sencer et al. [
11] and Tajima et al. [
12] proposed similar methods for designing a finite impulse response filter to convolve the speed command, transform discontinuous speed to continuous speed, and generate a smooth corner path for both three-axis and five-axis machine tools. Other approaches have employed the B-spline [
14,
15,
16,
17,
18] or nonuniform rational B-spline (NURBS) [
19,
20] methods to fit small line segments, which can reduce frequent ACC/DECs during machine movement. To avoid frequent ACC/DEC that affects the machining efficiency and causes vibration of the machine, thus damaging the surface quality, employing the B-spline method to fit line segments prevents this issue [
14,
15]. In addition, Sun et al. [
16] and Han et al. [
17] presented a real-time lookahead interpolation methodology involving a B-spline scheme for short line segments. Because of the flexibility of NURBS curves, the methodology has been applied to fit any irregularly shaped curves in robotics applications [
19,
20]. However, the Bezier, B-spline, and NURBS curves developed for applications in machine tools are more complicated and time consuming, which might hinder them from being widely used in robot computer-aided manufacturing systems. Another approach involves designing a finite impulse response (FIR) filter [
21,
22,
23,
24] to convolve the velocity profile and achieve corner smoothing. This method provides a one-step solution for corner transition. Fang et al. [
23] proposed a one-step corner transition solution that reduces the influence of corner errors by adjusting the feed rate. However, the FIR filtering method involves setting a time constant of the FIR filter to limit acceleration and jerk. A larger time constant results in a longer cycle time and an increase in corner tolerance.
In this study, a novel velocity profile overlap (VPO) algorithm for a robot interpolator is presented. The algorithm employs the S-shaped profile approach to design the velocity profile of line segments, and then overlaps each segment using overlapping time. The proposed algorithm requires only adjusting the overlapping time between the two velocity profiles to ensure that the kinematic constraints, velocity continuity, and corner smoothing criteria can be achieved. The approach is very easy to implement. Furthermore, the proposed algorithm can individually specify corner tolerances at each corner, which has not been reported in the current literature. The experimental results indicate that the reduction of cycle time, tracking error, and contour error outperforms those of other approaches.
This paper is organized into six sections.
Section 2 introduces the S-shaped profile used to generate a trajectory line segment and the orientation of the robot in the task space. In
Section 3, the VPO algorithm is introduced that can ensure that velocity is continuous between line segments and that the resulting corners are smooth. Moreover, corner trajectory equations were derived to establish relationships among the overlapping time, machining efficiency, and trajectory accuracy. A corner tolerance constraint (CTC) equation was then derived, as described in
Section 4, to enable recalculating the overlapping time and satisfy the corner tolerance constraint.
Section 5 presents the results of simulations and experiments conducted on the HIWIN RT605 robot manipulator to validate the effectiveness of the VPO method. Finally, the VPO method was compared with the ADAI method [
5] to demonstrate its advantages. The conclusions are presented in
Section 6.
2. Linear Motion Planning
Point-to-point (P2P) and linear motion are the two most common types of robot trajectories. P2P is often used in pick-and-place applications. For P2P motion, only the initial and final positions are set; the trajectory is not specified. Linear motion requires designing an end-effector trajectory in the task space. The interpolated points at the end-effector are transformed into joint commands through inverse kinematics to achieve linear motion. Because velocity profiles designed for linear motion must include both translation and orientation commands, these commands should by synchronized in the interpolator (
Figure 1a).
Table 1 presents the toolpath information for
Figure 1a, namely the position, orientation, and feed rate of the robot manipulator. The orientation is represented by
A,
B, and
C, which indicate rotations around the
X-,
Y-, and
Z-axes, respectively (
Figure 1b).
A robot’s orientation is determined by a combination of rotations in the X, Y, and Z directions. Various methods can be used to describe the orientation of a rigid body, such as the Euler angle, roll–pitch–yaw angle, angle–axis representation, unit quaternion, and Cayley–Rodrigues parameter methods. In this study, the equivalent angle–axis representation was adopted; this method is similar to the quaternion method but involves fewer parameters. The rotation matrix in the equivalent angle–axis method can be represented by a unit vector (u) and an angle (ϕ) of revolution about the u vector.
The parameters
u and
ϕ are used to rotate the orientation of the end-effector from
XYZ coordinates to
X′
Y′
Z′ coordinates (
Figure 2a). To obtain
u and
ϕ, rotation matrices for the
XYZ and
X′
Y′
Z′ coordinates are defined as
R1 and
R2. The matrices
R1 and
R2 can be obtained from two arbitrary orientation commands (
A,
B,
C) on the toolpath. A general rotation matrix
R can be calculated using Equation (1).
To convert a rotation matrix
R back to an orientation command, the rotation matrix can be inverted by using Equations (2)–(4).
To transform
R1 into
R2,
R1 must be multiplied by a rotation matrix
R12. The relationship between
R1 and
R2 can be expressed as follows, where
R12 represents the rotation matrix from
R1 to
R2:
The matrices R1 and R2 can be obtained from the orientation commands Pi and Pi+1. Matrix R12 can then be calculated from Equation (6). However, the parameters u and ϕ are still unknown. The equivalent angle–axis representation can be employed to determine matrix R12 by applying Rϕ,u.
Figure 2.
(a) Rotation in and (b) parameters of the equivalent angle–axis representation.
Figure 2.
(a) Rotation in and (b) parameters of the equivalent angle–axis representation.
As shown in
Figure 2b, the angle between the
u vector and the
i-
k plane is represented by
γ, and
β represents the angle between the
u′ vector and the
k-axis. The projection of the
u vector onto the
i-,
j-, and
k-axes is represented by
ui,
uj, and
uk, respectively. The following relationships can be determined from
Figure 2b:
The rotation matrix
Rϕ,u, which describes the rotation
ϕ around vector
u, can be obtained as follows. First, vector
u is rotated by angle
γ on the
i-axis to vector
u′ located on the
ik plane; the corresponding rotation matrix is represented by
Rγ,i. Vector
u′ is then rotated by angle −
β on the
j-axis to vector
u″, which is located on the
k-axis. This rotation matrix is represented by
R−β,j. Vector
u″ is then rotated by
ϕ on the
k-axis; the rotation matrix is
Rϕ,k. The reverse sequence of rotations and their respective opposite angles can be expressed as
Rβ,j and
R−γ,i. After this sequence of rotations, the matrix
Rϕ,u can be represented as
where
sγ = sin
γ,
cγ = cos
γ,
sβ = sin
β,
cβ = cos
β,
sϕ = sin
ϕ, and
cϕ = cos
ϕ.
By substituting Equations (7)–(10) into Equation (12), the following equation can be derived, where the abbreviation
is used:
The rotational angle and the unit vector can be obtained from Equations (14) and (15). After
u and
ϕ are obtained,
ϕ can be used as the variable for interpolation.
As shown in
Figure 1, the toolpath can be used to compute the translation distance
L and the rotational angle
ϕ determined using Equations (1)–(15). The S-shaped design method can be employed to generate a velocity profile for
L or
ϕ. The velocity profile can be divided into five phases (
Figure 3) by Equation (16), where
Si represents the linear motion distance
L or rotational angle
ϕ of the end-effector.
where
Jm represents the maximum jerk,
Vm represents the maximum feed rate, and
Vs and
Ve represent initial and final velocity (usually 0), respectively.
For example, consider the toolpath from P
i to P
i+1 for the position command for translation from (368, 0, 293.5) to (368, 200, 100) and the orientation command for rotation from (180, 0, 90) to (150, 0, 80). The interpolation should simultaneously plan both the translation and orientation commands.
Table 2 presents the constraints on the interpolation parameters, where
Vlf and
Vof represent the maximum feed rate for translation and orientation, respectively, and
Jlm and
Jom represent the maximum jerk for translation and orientation, respectively. The velocity profile for the translation is planned first; Equation (17) is used to determine if the maximum jerk limit
Jlm is exceeded. If so, the acceleration time can be adjusted using Equation (18), and the orientation can then be planned in accordance with the translation results. If the angular jerk still does not exceed the limit, planning is complete. However, if the angular jerk exceeds the limit, orientation must be planned first, and translation must be allocated afterwards in the same manner. In this example, the translation distance is 278.28 mm and the rotational angle is 31.58°; the results indicate that translation can be planned first.
Figure 4 reveals that the resulting single program command achieves both translation and orientation. After the interpolation points (
Px,
Py,
Pz) and the rotation matrix (
Rϕ,uR1) for each sampling period are obtained, they can be substituted into Equation (19) to obtain the rotation matrix (
). The joint commands can then be solved through inverse kinematics and used to command the motor drives, achieving synchronized translation and orientation for linear motion.
3. Corner Smoothing
In addition to single-line segment motion in positioning applications, corner interpolation must also be considered for tracking multi-line segment motion in polishing and grinding applications. Corner smoothing techniques can be employed to improve machining efficiency and reduce vibration at junctions. The motion of end-effector translation and orientation should be designed to ensure smoothness and continuity throughout the entire trajectory. Conventional methods for generating a smooth trajectory without excessive ACC/DEC can be categorized as ADBI and ADAI methods [
5]. The ADBI method constrains the acceleration and the jerk of the trajectory; this prevents specifying the corner tolerance. However, the ADBI method can cause velocity discontinuities at block junctions, which can result in vibration. As shown in
Figure 5, the feed rate (tangential velocity) is distributed across
x- and
y-axes in accordance with the direction of movement. The axis velocities
Vx and
Vy at the junction are not continuous.
The ADAI method, in which digital convolution is used eliminate velocity discontinuities on each axis, can resolve this problem (
Figure 6). Corner tolerance occurs because the velocities of blocks N
1 and N
2 overlap. Digital convolution is performed using Equation (20), where
,
represents the sample time and
represents the time constant of the ACC/DEC. The input signal
represents a velocity command.
Although the ADAI method is commonly used for interpolators, its applicability is limited because it can only be applied to the entire trajectory; the tolerance for each corner cannot be specified. To achieve both corner smoothing and a specified tolerance function, this paper proposes a VPO algorithm that calculates the overlapping time of line segments to produce blended S-shaped ACC/DEC profiles. This approach improves cycle times and enables the trajectory to be systematically designed to meet different accuracy requirements.
An example of the overlapping time of line segments is presented in
Figure 7, which depicts two identical blocks with velocity blending. First, blocks 1 and 2 are planned using S-shaped ACC/DEC. Block 2 is then blended into block 1, and
Tol is the overlapped area of the two blocks; this represents as overlapping time. To calculate the overlapping time, the
OVLP parameter is defined as a percentage. If
OVLP is 100%, the overlapping time is 2
Trr, and the junction of the two blocks occurs exactly at half of
Vm. Therefore, 2
Vc is equal to
Vm. The relationship between the
OVLP parameter and the velocity can be expressed as follows:
where
Vc is the velocity junction between the two blocks.
The relationship between
Vc and the overlapping time (
Tol) can be calculated using the
A–
T diagram in
Figure 7. For an S-shaped velocity profile,
Am =
Vm/
Trr, where
Am represents the maximum acceleration and
Trr is equal to the time of acceleration from 0 to
Am within the ACC/DEC period.
Ac represents
Vc at the junction and can be calculated using Equation (22).
The parameter
Vc can be calculated by integrating the area of the
A–
T diagram and is given as follows:
By substituting Equation (22) into Equation (23),
Vc can be represented by
Tol can be calculated from
OVLP by substituting Equation (21) into Equation (24) as follows:
Equation (25) indicates that
Tol is a function of
OVLP and
Trr. Because
Trr is already known,
OVLP can be adjusted to quickly control the smoothing of the corner, improving the cycle time. The velocity profiles on the
x- and
y-axes for different values of
OVLP are shown in
Figure 8c,d, in which
OVLP is equal to 0% and 80%, respectively. When
OVLP is 80%, the starting time for the N
2 block moves forward by
Tol on both the
x- and
y-axes. The VPO approach ensures that the velocity is continuous at the junction for each axis, and the cycle time decreases from 1.6 to 1.38 s. However, a corner tolerance can occur at the junction if
OVLP increases (
Figure 8a). The next section describes the derivation of the CTC equation, which can be used to systematically evaluate the corner tolerance on the basis of the overlapping time.
4. CTC Algorithm
A corner tolerance occurs when the velocity profiles of line segments overlap. The maximum corner tolerance occurs at half of the overlapping time (
Tol/2).
Figure 9 presents the overlapping area of
Figure 7.
Figure 9a shows the trajectory of block 1 and block 2 at the corner after overlapping; P
1, P
4, and P
3 and are produced from P
1, P
2, and P
3. Here, the distance from P
2 to P
4 is the maximum corner tolerance.
Figure 9b presents the velocity profiles of block 1 and block 2 and the overlapped velocity profile, where
Vx1 and
Vx2 represent the velocity profiles on the
x-axis of block 1 and block 2, respectively, and the blue solid line formed by P
1, P
4, and P
3 represents the velocity profile of the two blocks after overlapping. The maximum corner tolerance occurs at point P
4.
The three-dimensional corner tolerance (
ε) can be calculated from the
x,
y, and
z parameters as follows:
In
Figure 9a,
εx1 is the distance from P
1 to P
2 for block 1 in the
x direction and can be calculated by integrating the area of BDE in
Figure 9b; this area represents the distance from P
5 to P
2 in the
X direction. To obtain
εx1, the
S1 term in Equation (16) can be replaced by Equation (27), where
t is substituted with
Tol/2 and
J is substituted with
Jx1, obtaining Equation (28).
When considering the overlap effect, P
5 should move to a distance projected on the
x-axis relative to P
4, represented as
. The value of
represents the area under ACD and is given by Equation (29), where
Jx2 represents the jerk of N
2 along the
x direction.
The distance between P
4 and P
2 on the
X-axis is represented by
and can be calculated using the following equation.
Here,
represents the corner tolerance
projected on the
x-axis. Similarly, the corner tolerance components in the
y and
z directions can be calculated using Equations (31) and (32).
where
,
,
, and
.
The relationship between
Tol and
can be obtained by substituting Equations (30)–(32) into (26).
Summing the squares of Equation (33) produces Equation (34), where
is abbreviated to
JxyzAfter jerk and corner tolerance have been determined,
Tol can be obtained using Equation (35), and the CTC equation can be expressed as follows:
In
Section 2, the S-shaped design method was adopted to plan the translation and orientation. In
Section 3, the VPO method was applied to plan a line segment, solving the discontinuity problem. By contrast with the conventional ADAI approach, the VPO method can explicitly specify the corner tolerance for each corner. Finally, the designed velocity profile can be integrated to obtain positions and substituted into Equation (19) to generate the command points for each axis, completing the interpolation process.