Abstract
Optimal point-to-point trajectory planning for planar redundant manipulator is considered in this study. The main objective is to minimize the sum of the position error of the end-effector at each intermediate point along the trajectory so that the end-effector can track the prescribed trajectory accurately. An algorithm combining Genetic Algorithm and Pattern Search as a Generalized Pattern Search GPS is introduced to design the optimal trajectory. To verify the proposed algorithm, simulations for a 3-D-O-F planar manipulator with different end-effector trajectories have been carried out. A comparison between the Genetic Algorithm and the Generalized Pattern Search shows that The GPS gives excellent tracking performance.
Introduction
The problem of designing optimal trajectory for redundant manipulators has attracted many researchers for the last three decades. One of the main reasons is the use of kinematically redundant robots is expected to increase in the future due to their increased flexibility. Some of the extra capabilities include the ability to avoid internal singularities or external obstacles over their entire workspace (Parket et al., 1989). Also, the inverse kinematics problem is underdetermined and admits an infinite number of distinct feasible solutions, meaning that a given end-effector poses can be realized by an infinite number of distinct manipulator configurations (McAvoy, et al, 2000). In order to overcome the shortcomings inherent in non-redundant robots, redundant robots have been utilized in industrial applications to increase flexibility and dexterity around a restricted task space in presence of obstacle. They can also provide a better ability to avoid singular configuration and the excessive velocities and accelerations encountered at singularities (Tian, L. & Collins, C., 2003).
Generally, there are three main approaches for trajectory planning for redundant manipulators, pseudo-inverse of jacobian matrix, variational approach, and optimization techniques based on the direct kinematics.
Whitney (Whitney, E., 1969) introduced the pseudo-inverse approach, showed that the pseudo-inverse solution results in joint velocities having a minimum Euclidean norm. Some other researchers believe that this approach has many drawbacks. Klein and Huang (Klein, C. & Huang, C., 1983) showed that the pseudo-inverse is non-integrable, leading to manipulator joint space drift during cyclical tasks. Duffy (Duffy, J., 1990) showed that the pseudo inverse gives meaningless results in the case of a manipulator with different joint types. In addition to that the algorithm must take into account the problem of kinematic singularities that may be hard to tackle (Solteiro Pires et al., 2001)
Hirakawa and Kawamura (Hirakawa, A. & Kawamura, A., 1990) proposed a variational approach and B-spline curve for minimization of the consumed electrical energy to generate trajectory for redundant manipulators. The application of this method is oriented to repeated jobs by industrial robot manipulators with diminishing of long calculation time and difficulty to design the minimization toward vector.
To avoid all these drawbacks, Genetic Algorithms approaches (GAs) were introduced by Goldberg (Goldberg, E., 1989). A genetic algorithm is a stochastic search algorithm which can optimize nonlinear functions using the mechanics of natural genetics and natural selection. Several researchers have been carried out implementations of GAs in the field of robot trajectory planning. Parker et. al. (1989) presented a genetic algorithm approach which allows additional constraint to be specified easily. This approach was applied to test problems in which the maximum joint displacement in a point-to point positioning task is minimized. Davidor (Davidor, Y., 1991) applied a GA to generate the robot trajectory by finding the inverse kinematics for predefined end-effector robot paths. A trajectory of a 3-link planar redundant robot is simulated by minimizing the sum of the position errors at each of the knot points along the path. Yun and Xi (Yun, W-M & Xi, Y-G., 1990) presented a new method for optimum motion planning based on an improved genetic algorithm. This approach incorporates kinematics constraints, dynamics constraints as well as control constraints. Simulation results for two and three degree-of –freedom robots were presented. Hirakawa and Kawamura (Hirakawa, A. & Kawamura, A., 1996) proposed a combination of B-spline trajectory generation and steepest gradient optimization to design an optimal motion planning for redundant manipulators. However, the proposed optimization approach needs to determine the gradients of the objective function. McAvoy et al. (2000) proposed an approach utilizing genetic algorithms for optimal point-to-point motion planning for kinematically redundant manipulators to satisfy both the initial conditions and some other specified criteria. Their approach combines B-spline curves for the generation of smooth trajectories with genetic algorithms for optimal solution. Tian and Collins (2003) proposed a genetic algorithm using a floating point representation to search for optimal end-effector trajectory for a redundant manipulator. An evaluation function based on multiple criteria such as total displacement of all joints and the uniformity of Cartesian and joint space velocities was introduced. To verify their approach, simulations are carried out in free space and in a workspace with obstacles.
Problem Formulation
Consider the three-link planar manipulator shown in Figure (1) which has one extra degree of freedom to perform the operation.

Three-link planar robot configuration
The joint angles
Inverse kinematics is the analysis or procedure used to compute the joint coordinates for a given set of end effector coordinates. Basically, this procedure involves solving a set of equations which are, in general, nonlinear and complex. Although it is possible to solve the nonlinear equations, uniqueness is not guaranteed. Here, the analytical solution for inverse kinematics will be derived as a reference for comparisons with the optimal solutions. The three kinematics equations can be written as,
Since the inverse kinematics problem is underdetermined, an infinite number of solutions exist depending upon the value angle φ. So the angle φ can be assumed as a cubic polynomial in the form:
in which the angular velocity is zero at the beginning and at the end of the task (rest-to-rest manoeuvring). This trajectory starts from initial value of 30° and ends at 70° within 5 seconds. The length for three links are L1 = 0.4 m, L2 = 0.3 m and L3 = 0.3 m. On the other hand the trajectory of the end-effector can be divided into 20 via points so the x and y coordinates for each point are known. The analytical expressions for the joint angles θ1, θ2 and θ3 in terms of the Cartesian coordinates can be found as follows,
Where,
The simulation is performed using analytical method for both line and circle trajectories only line trajectory is presented in Figures 2a and 2b for comparison.

Robot configuration using analytic method

Joint angles using analytic method
Genetic Algorithm
The real-coded in double precision genetic algorithm is used in this paper. The evaluation or fitness function is defined based on end-effector positioning error and joint angle displacements from the previous position satisfying Cartesian and joint velocity uniformity. The fitness function is defined as follows:
Where, Ee is the error between desired position and generated position of end effector. Dj is the joint displacements between successive points. Ve and Vj are velocities of end-effector and joints of robot manipulator. C1, C2, C3 and C4 are weighting factors to control the desired configuration which satisfy the constraint
Where, (
The joint displacements between successive points are considered in evaluation function in order to minimize actuator motions. To minimize the joint movements along the trajectory, the function will be
Since the trajectory is divided into equal lengths between successive points, the velocities for end-effector and joint displacements will be
Weighting factors are defined as C1 = 0.4, C2 = 0.1, C3 = 0.3, C4 = 0.2 for line trajectory and C1 = 0.7, C2 = 0.1, C3 = 0.1, C4 = 0.1 for circle trajectory. The initial joint space configurations are assumed as
Genetic Algorithm parameters
The simulations are carried out for robot configurations, angles profiles and error for both trajectories and the results are presented at Figures 3 and 4 for line and circle end-effector trajectories respectively. All simulations have been done using MATLAB Genetic Algorithm and Direct Search Toolbox.

Line trajcetory using Genetic Algorithm

Line trajcetory using Genetic Algorithm & Pattern Search
Pattern search method is a class of direct search method to solve for nonlinear optimization. A pattern search algorithm computes a sequence of points that get closer and closer to the optimal point. At each step, the algorithm searches a set of points, called a
Optimal points from GA are introduced into Pattern Search Algorithm as inputs to get better result. Pattern Search is only used for reducing the error of end-effector positions in trajectory, the evaluation function is defined as in equation (9) as.
Where, (

Circle trajcetory using Genetic Algorithm

Circle trajcetory using Genetic Algorithm & Pattern Search
It can be observed clearly from Figures 3, 4, 5 and 6 that adding Pattern Search to the Genetic Algorithm improves the final results and reduces the total tracking error considerable. Comparing with the analytical solution, GPS algorithm gives almost the same results with zero tracking error. This improvement makes it possible for the end-effector to track the desired trajectory accurately. In case of constrained motion where the force exerted by the end-effector depends mainly on the distance between the end-effector and the constraint surface, this algorithm minimizes the contact force to a great extent. In terms of optimized joint angles, there is no considerable differenc between the two algorithms. The genetic algorithm searches for the global minimum and the patern search refines the local minimum reached by the genetic algorithm. Our conclusions agree with the recent results indicating that adding Coordinate Search Algorithm to the simple Genetic Algorithm to enable clear convergence and avoid the risk of getting attracted by local minimum. This combination constitutes a Generalized Pattern Search that uses the sGA for the global search and uses the Coordinate Search for the local search (The Math Works, 2004).
Conclusions
A new algorithm is introduced for the optimal trajectory tracking of planar redundant manipulators. This algorithm which combines Genetic Algorithm and Pattern Search can be considered as a Generalized Pattern Search algorithm. It has been applied successfully for two end-effector trajectories with excellent tracking performance.
Footnotes
Acknowledgement
The authors would like to thank the Research Center, International Islamic University Malaysia for supporting this research
