Abstract
Introduction
A robot manipulator is usually designed to complete a specific task, such as machining, polishing, finishing, and assembling, so it is necessary to plan a trajectory for the end effector of the robot manipulators. The motion of an end effector is dominated by the motors of the manipulator, so the rotating angles of the motors should be obtained by applying the inverse kinematics of the manipulator based on the planned trajectory of the end effector. Thus, it is a significant issue to plan a trajectory for the end effector of the manipulator, and it is called trajectory planning in robotics. The trajectory is defined as a position function of time, which implies the velocity and acceleration functions of time defined as well. Besides, the trajectory planning can be divided into two tasks: the path planning and motion profile planning. The path planning refers to the generation of a geometric path, where any point on this path is represented by
Path planning can be divided into four types. 1 Graph search-based planning considers a moving object at a grid or lattice and uses graph search algorithms to determine the path from a point to another. Sampling-based planning randomly searches the next point based on the connectivity of the current point. Interpolating curve planning generates a set of new data positions to connect predefined data positions. This planning not only is applied in robotics but also has broadly used in computer graphics. Numerical optimization planning implements optimization algorithms to determine the optimal path. The first two types of path planning belong to local searches and are usually applied to mobile robots and automated vehicles. The third type of planning is suitable for robot manipulators to execute well-defined motions based on specific tasks. The last type of planning is usually integrated with the first three types of planning. There are some popular parametric curves, such as Bézier, B-splines, and nonuniform rational B-splines (NURBS), applied in the interpolation curve planning. Jahanpour et al. combined time-dependent and constant feed rates in the NURBS and applied to a 4(UPS)-PU mechanism. 2 Choi et al. used the B-spline for path planning and transformed the path into the collision-free and smooth trajectory. 3 Su et al. used a quintic Pythagorean hodograph curve to design a path and applied it to a Delta parallel robot for high-speed operation. 4 Chettibi used radial basis functions to generate a smooth path for joints of a six-joint PUMA 560 robot. 5 More detailed descriptions about parametric curves will be reviewed in the following section.
Regarding motion profile planning, there are many researchers who have dedicated on the fields, and many profiles are developed to obtain minimum motion time and to reduce jerks by solving optimization problems. Meckl and Arestides developed an optimized S-curve motion profile with minimum vibrations, where the ramp-up time is obtained through minimizing the energy excited by the input force with the natural frequency of the system. 6 Nguyen et al. generalized the time-optimal S-curve motion profile as a recursive form based on a trigonometric model, and the profile is implemented to a linear motor for demonstration. 7 Yang et al. proposed a point-to-point trajectory planning algorithm for robot manipulators, where the trajectory planning is formulated as a nonlinear convex optimization problem. 8 Zhang et al. presented a trajectory planning by using the simulated annealing algorithm and applied to a seven-degree-of-freedom space robot manipulator. 9 Hu et al. used a fifth-order B-spline to design a path and then applied the genetic algorithm to minimize both the traveling time and the jerks. 10 Lu et al. applied the particle swarm optimization algorithm to a five-segment S-curve with axis constraints so as to obtain the optimal parameters in the motion profile of a computer numerical control (CNC) machine. 11 Xu et al. presented a trajectory planning algorithm based on velocity potential field for robot manipulators operating in three-dimensional space, where velocity potential filed transforms distances into the velocity without manipulator dynamics. 12 Consolini et al. developed a time-optimal algorithm to obtain a motion profile for a robot manipulator, where the algorithm discretizes the motion profile to be a set of data with a finite number of freedoms subject to velocity, acceleration, force, and torque constraints. 13 Fang et al. proposed a smoothly time-optimal S-curve motion profile for robot manipulators, where a sigmoid function is imposed to establish the jerk functions so as to make velocity, acceleration, and jerk differentiable. 14 Wen et al. proposed a trajectory planning based on reinforcement learning, which is archived by applying the Q-learning algorithm. 15 Zajačko et al. applied artificial intelligence to an automated quality control process through an automated error detection system. 16 Pivarčiová et al. controlled and corrected the programmed mobile robot trajectory by implementing an inertial navigation system. 17 Bozek et al. proposed a calculation method for a moving mechanism on a trajectory described by a planar differentiable curve based on the intrinsic properties of the plane. 18 Trnka and Božek investigated the motion planning problem by off-line planning and simulation systems with automatic trajectory generation. 19 Tlach et al. presented a measurement method of positioning performance based on polygonal pseudo circular path. 20
Furthermore, there are some articles addressing trajectory and motion planning of robot manipulators.
21
–26
Based on the reviewed literature, this study proposes the following contributions: A dual-optimization procedure of trajectory planning is proposed for robot manipulators instead of applying either the optimal path planning or the optimal motion profile planning. A virtual-knot interpolation scheme is proposed to be implemented in the parametric curves which do not pass through control points, such as Bézier curves and B-splines. The scheme is especially suitable for the paths which are required to pass through predefined data points of positions. An optimal rational B-spline is proposed, which can generate an optimal path with minimum slope variations between any two successive control points and a minimum path. This scheme is especially suitable for smoothly closed paths. A general formulation of time-optimal velocity profiles is proposed, which can be implemented for any types of motion profiles with equality and inequality constraints. A multisegment cubic velocity profile is proposed by solving a multiobjective optimization problem. This scheme generalizes the S-curve profile.
The rest of this article is organized as follows. The second section presents the path planning, which includes some common parametric curves and proposed schemes. The third section presents the trajectory planning, which includes the motion profile generations and the integrations of a planned path and a planned motion profile. The fourth section presents a case study, which is the trajectory planning for a dispensing robot. The last section presents the conclusions.
Path planning based on parametric curves
For practical applications, a path for the end effector of a robot manipulator may be required to pass through some predefined points (or called knots); this section reviews some common curves used to plan a path and then proposes two related schemes. One starts to introduce the cubic spline, which can pass through all knots, and then the Bézier, B-spline, and rational B-spline curves are introduced, which may not pass all knots. Finally, an interpolation scheme based on virtual knots and an optimal B-spline are proposed. The proposed interpolation scheme can pass through all real knots based on the Bézier, B-spline, and rational B-spline curves. Thus, not only the cubic curves but also more curves can be applied to path planning satisfying passing through all knots. The proposed optimal B-spline generates a smoothly path, which is especially suitable for closed paths.
A curve can be expressed as explicit, implicit, or parametric representations. To illustrate their differences, a two-dimensional curve on the
where the subscript
Cubic spline
A cubic spline is a set of
where
where
Bézier curves
The Bézier curves, originally derived by the French engineer Pierre Bézier at Renault Automobile, are determined by a control polygon formed by the control points, which can adjust the shape of the curves. The Bézier curves can be defined as 28,29
where
Note that the polynomial degree of a Bézier curve is one less than the number of the control points, and the parameter
B-spline curves
The Bézier curve has two limitations. The first one is that the polynomial degree of the curve is determined by the number of the control points, so the degree cannot be assigned by users. The second one is that the basis function of the curve adapts the Bernstein function, which is always not zero for any value of the parameter
where
with
where
Note that the order of the basis function is independent to the number of the control points, but the maximum order is equal to the number of control points, and each basis function is not affected by all control points. Besides, the sum of the basis functions is unity, and each basis function is greater than or equal to zero. Furthermore, the B-spline curves have the property of convex hull.
Rational B-spline curves
Since the basis functions of the B-spline curves are not rational, the curves cannot represent conic curves including circles, free-form curves, and quadric curves. Thus, a rational B-spline curve is defined as 33
where the basis functions
in which
For
Virtual-knot interpolations
The aforementioned curves except for cubic spline do not pass through control points, so they cannot be directly applied to path planning of robot manipulators. An interpolation scheme based on virtual knots is proposed to generate a curve passing through all control points. The scheme is an inverse procedure by substituting all control points into the curve functions to solve for the virtual knots. To illustrate the scheme, one considers the rational B-spline curves, and equation (11) is modified as
where
Optimal rational B-spline curves
To obtain a smoother and shorter curve, one formulates a two-dimensional path planning as an optimization problem as
subjected to the curve equation shown in equation (11), where
Trajectory planning based on parametric curves
This section presents three types of motion profiles for trajectory planning, which are S-curves, sine curves, and cubic polynomials. Besides, the optimal curves based on the three motion profiles are presented in order to have minimum motion time. Therefore, the end effectors of robot manipulators will follow the motion profiles to complete their motions.
S-curves
Conventionally, a path function of time is considered as an S-curve, which consists of seven polynomials, as shown in Figure 1(a), in which the Roman numerals from I to VII represent the segment numbers referring to cubic, quadratic, cubic, linear, cubic, quadratic, and cubic polynomials, respectively. Besides, any two successive polynomials should satisfy the continuities of position, velocity and acceleration. Segment IV is a constant-velocity region, and segments II and IV are constant-acceleration regions. Segments I, III, V, and VII have constant jerks, and it is obvious to note that the jerk of the curve is not continuous. The major purpose of an S-curve is designed to reduce the residual vibrations and to keep high-speed motions. To simplify the seven-segment S-curve, another type of S-curves consists of five polynomials, as shown in Figure 1(b), in which the Roman numerals from I to V refer to cubic, cubic, linear, cubic, and cubic polynomials, respectively. Similarly, the points connecting any two successive segments should satisfy the continuities of position, velocity and acceleration. The difference between the two S-curves is that both constant-acceleration segments II and IV, as shown in Figure 1(a), are removed. In this literature, there are many applications in motion control. 19,35,36

S-curves consisting of (a) seven segments and (b) five segments.
Sine curves
A sine curve for a path consists of three segments, as shown in Figure 2, where the Roman numerals I, II, and III indicate the segment numbers, which define the position functions to be a sinusoidal function, a straight line, and another sinusoidal function, respectively. Besides, the points connecting any two successive segments satisfy the continuities of position, velocity, and acceleration. To compare a sine curve with the five-segment S-curve, the accelerations of the sine curve on segments I and III are smoother, which eliminate the jerk jumps. There are also some applications on motion control in the literature. 37 –39

A sine curve.
Optimal S-curves and sine curves
For application considerations, the curve of motion profiles might be restricted by the hardware’s motion limits, such as maximum velocities, accelerations, and jerks. Thus, optimization approaches can be applied to determine the parameters of motion files. Consider that there are
subject to
where
Optimal cubic curves
Alternatively, an optimal cubic curve consisting of multiple piece cubic polynomials is proposed to express a motion profile. Since the highest polynomial degree of the S-curve is 3, the proposed optimal cubic curve is a generalized formulation for S-curves. To illustrate the formulations of the curve, a curve is considered to be divided into
where the superscript
subject to the constraints same as equations (16) to (20) and an additional constraint
Figure 3 shows a three-segment cubic curve, where the Roman numerals refer to the segment numbers.

A three-segment cubic curve.
Trajectory solver based on a path and a motion profile
The length of a parametric for a two-dimensional curve is given as
Taking the time derivative and applying Leibnitz rule lead to
Since the motion profile
Note that equation (26) is a first-order nonlinear ordinary differential equation with the initial condition
Case study: Optimal trajectory planning of a dispensing robot
This section will investigate a case study, which is the trajectory planning for a dispensing robot. The robot will execute a dispensing motion for a 3.5-in hard drive, as shown in Figure 4(a). Besides, Figure 4(b) shows 44 measured control points surrounding the hard drive, and one will plan a path based on the 44 points. The optimal trajectory planning is a dual optimization procedure by optimizing the path and the motion profile presented in “Path planning based on parametric curves” and “Trajectory planning based on parametric curves” sections, respectively, and the design flowchart is shown in Figure 5.

(a) A 3.5-in hard drive and (b) 44 control points around the hard drive.

A flowchart of the dual optimization trajectory planning.
Optimal path planning
In this subsection, one will start the path planning by employing rational B-spline and then perform the path optimization to obtain a smoother path. The procedure of the path planning is illustrated as follows in detail.
One will apply a uniform rational B-spline with constant weighting values, where the order is 4 (the polynomial degree is 3), and the curve is shown in Figure 6(a). It is noted that the curve does not pass through all control points.

Rational B-spline curves: (a) control points and virtual knots; (b) a uniform rational B-spline curve and an interpolation curve; (c) NURBS; and (d) optimal rational B-spline curves. NURBS: nonuniform rational B-spline curve.
Since the dispensing robot should pass through all control points, one applies the virtual-knot interpolation presented in “Virtual-knot interpolations” section, where the interpolation is based on the rational B-spline, and Figure 6(b) shows the interpolation curve. Besides, it is compared with the rational B-spline curve. It is obvious to see that the curve passes through all control points, but there is a cusp at the coordinates (4.6 and 13.5 cm), which are both the starting and the end points.
To smooth the cusp at the coordinates (4.6 and 13.5 cm), an NURBS is applied, and the differences of two successive knot values at the first and last few knots are increased to reduce the cusp. Thus, a knot vector consisting all knot values is defined as
where 30 knot values between 20 and 21 form an arithmetic sequence. Based on the knot vector, an NURBS curve is shown in Figure 6(c), which includes two curves without pass through the control points and based on the virtual knots. It is obvious to see that the cusp has been greatly reduced.
Although the cusp has been reduced, the slope difference at the cusp is still greater than those at other control points. Thus, an optimization approach presented in “Optimal rational B-spline curves” section will be applied to minimize the slope differences at the cusp and the control points and the curve length. To simplify the optimization problem, the knot vector based on equation (27) is modified as
where
in which the weighting values
Optimal motion profile planning
This subsection presents the motion profile planning based on the optimization formulation shown in “Optimal S-curves and sine curves” and “Optimal cubic curves” sections, and the path is the optimal rational B-spline curve, as shown in Figure 6(d). For optimal S-curves, both five and seven segments are applied. For optimal cubic polynomials, since a multiobjective optimization leads to multiple solutions, both three and four segments are obtained. Due to the maximum velocity, acceleration, and jerk limited by the experimental robot, they should be restricted as
Thus, the results are listed in Table 1 by solving the minimum-time optimization problems. The results show that the optimal seven-segment S-curve provides the shortest motion time. To further examine the results, Table 2 lists some comparisons based on several specification indices, where
Time of connecting points for minimum-time motion profiles.
Comparisons of minimum-time motion profiles.
Combinations of the optimal path and the optimal motion profile
Based on the results of “Optimal path planning” and “Optimal motion profile planning” sections, the optimal path is based on the nonuniform ration B-spline (NURBS), and the optimal motion profile is based on the seven-segment S-curve. By solving equation (26) through imposing the optimal path and the optimal motion profile, the parameter

Optimal trajectories of (a) parameter
Experimental results
In this study, an experimental Delta robot is used to simulate the motion of a dispensing robot by tracking the planned trajectory obtained in “Combinations of the optimal path and the optimal motion profile” section, but the robot does not have a dispensing head. The Delta robot is a spatial parallel manipulator, as shown in Figure 8. There are three brushed DC motors mounted on a fixed plane, and each motor drives a kinematic chain consisting of two links, where the connecting joint of the two links is a spherical joint. Besides, three kinematic chains connect a moving platform by spherical joints, and the moving platform is called an end effector, which is dominated by the motions of the three motors. Therefore, the Delta robot has three degrees of freedom, which are three translating motions in three-dimensional space, and a gripper is usually mounted on the end effector to fulfill a pick-and-place task. For a dispensing robot, a dispensing head can be mounted on the end effector, and it will track a planned trajectory to execute a predefined motion.

An experimental Delta robot.
To operate the robot, the planned trajectory needs to be transformed the motions of the three motors through the inverse kinematics, which can be obtained by solving three nonlinear algebraic equations, and then the calculated motions of the motors will be executed by performing the feedback control of the motors. In the experiments, the motor control is achieved by using a real-time embedded system

An embedded system
Figure 10 shows the command signals, simulation, and experimental results of the active angles as functions of time. The simulation results and the command signals are quite consistent, and the experimental results are stair functions of time due to the limited resolutions of the encoders, which are 0.367°. Figure 11 shows the command, simulation, and experimental results of the position of the end effector as functions of time. The simulation results and the command signals are also quite consistent, and the experimental results show little variations due to the experimental errors. Figure 12 shows the virtual control points and the trajectory of the command signals, the simulation, and experimental results on the

Command, experimental, and simulation rotating angles of the motors as functions of time: (a)

Experimental and simulation positions of the end effector as functions of time: (a)

Trajectories of the command, simulation, experiment results and the control points of the end effectors on the
RMS errors of the experimental and simulation results.
RMS: root mean square;
Conclusions
This article presents the optimal trajectory planning and tracking control of a Delta robot, which is used to simulate the motion of a dispensing robot. B-spline curves are commonly used to plan a path, but they do not pass through control points. To solve this problem, a virtual-knot based interpolation scheme is proposed, which can pass through all control points by employing an inverse procedure. To design a smoother path, an optimization formulation is proposed to minimize the slope variations of the path, where the knot vector and the weighting values of the rational B-spline can be obtained by solving the optimization problem. Regarding the trajectory planning, a multisegment piecewise cubic polynomial is proposed, which is a generalized S-curve, where the curve parameters including the polynomial coefficients and the number of segments are obtained by solving a multiobjective optimization problem. Besides, another optimization formulation is proposed to minimize the motion time, where the parameters of motion profiles can be obtained by solving this optimization problem. Furthermore, the planned trajectory is applied to an experimental Delta robot so as to simulate the dispensing motion, and the experimental results show that the trajectory error is less than 2 mm based on the hardware specifications of the experimental Delta robot. As a matter of fact, the proposed approach can be applied to any types of robots and machine tools, which are used for machining, such as turning, drilling, and milling, in practical applications.
