Optimal Trajectory Planning Analysis of Robot Manipulator Using PSO

:-For large- and small-scale industry, the major issue considered as to obtain the orientation and desire position of robot manipulators. The analysis of robotic manipulation requires two kinds of kinematic analysis namely inverse and forward kinematic analysis. This article aims to frame the inverse kinematic model of 5 DOF and 6 DOF robot manipulator. Planning of a movement flow has been designed followed by the evaluation of all the Denavit – Hartenberg (DH) parameter for the estimation of the desired orientation and position of the end effector. For the inverse Kinematics solution, conventional technique like DH notation, iteration and transformation were being utilized. The trajectory inverse kinematics minimization has been the main objective in this study and it has been achieved by Particle Swarm Optimization PSO. A quintic 5 th order polynomial with joint space trajectory has been implemented in this study to find the paths for velocity and acceleration evaluation. Cartesian Trajectory is applied to the shortest path and get the transformation matrix for each intermediate point. Finally, the obstacle avoidance has been exhibited by PSO. The distance velocity, acceleration and angular displacement have been evaluated to analyse the shortest path and obstacle path avoidance.


INTRODUCTION
The Robot trajectory planning is defined as track points provided multiple expectations and target pose. To the end-effector the rotation angle of each joint of robot adjusted in timely manner at approved trajectory followed by every point which reach the target point ultimately. Compared with Cartesian space, the trajectory planning in joint space considered as simpler and convenient [1]. Multiple fixed points situated at the multiple robotic arms end which are usually given. By using inverse kinematics these track points for robot have been computed and from Cartesian space it is converted to joint co-ordinate space [2]. Generally the kinematic transformation is categorised into forward and inverse transformation. The joint coordinates or configuration of robot mapping to the end-effector pose considered as forward kinematics. When the joint angles have been known, the issue in forward transformation lies in end-effector position in Cartesian space whereas the inverse transformation is just the alternative. The inverse kinematic transformation is generally complex to resolve due to its high non-linearity [3].
Further using different spline and polynomial functions and other curves, the track points are used to proceeds the interpolation operation. For the robot, each joint variable's time expressions are achieved. Based on robot mechanical characteristics, the acceleration and speed of every joint has to be restricted within the given range. So that the acceleration and speed optimization is essential for every joint arm and other than joint arm smooth trajectories assurance the wear and impact should be reduced to increase the robot working life [4]. The optimal trajectory planning method has been suggested in [5], energy minimum trajectory planning, multi-objective trajectory optimization [6] or impact minimum trajectory planning and optimal trajectory planning has also been presented in [7]. Amidst them, the researchers usually focused on the optimal trajectory planning by means of running time of robot. For example, [8] constructed a function expression for energy dissipation from omnidirectional robot by means of obstacle avoidance performance combination and by the polynomial interpolation method the optimization problem transformed into parameter minimization and it leads to robot obstacle avoidance's effective study. Various optimization techniques as proposed in [9], Particle Swarm optimization based fuzzy technique [10], ant colony optimization [11] and others have been applied to addressed the obstacle avoidance problem and also focus on the collision free concept during trajectories planning movements. To reduce the trajectory optimization complexity of several constraints, the smoothness and angular displacement constraints, angular acceleration and angular velocity of each joint in space have been ensured. In this research paper the enhanced particle swarm optimization has been used to achieve the optimized trajectory planning. In addition to that, the obstacle avoidance has been deal with the particle swarm optimization and forward kinematics. Denavit Hartenberg DH parameters usually have four parameters related to specify convention for reference frames attaching to robot manipulator. For the end-effectors measurements the DH parameters used in this study [13,14].
The main contribution of this research paper involves, i.
Shortest distance identified for efficient trajectory planning for robot design. ii.
The initial and final position theta for each joint will be find by using the Trajectory Inverse Kinematic Minimization by PSO. iii.
From initial and final theta, we can able to find the paths by joint space trajectory with quintic (5th order) polynomial is used with boundary conditions for velocity and acceleration. iv.
Cartesian Trajectory is applied to the shortest path and get the transformation matrix for each intermediate point.

v.
Trajectories intended in joint space could be utilized straightaway to regulate motors of low-level with no need of computing inverse kinematics. vi.
There is no requirement to handle the singularities related to multiple DOF manipulators or redundant joints. vii.
Dynamic constraints such as high acceleration on joints could be taken into account when trajectories are generated. On the other hand, the constraints have to be tested subsequently for Cartesian space trajectories pertaining to inverse kinematic.

Paper organization:
Organization of the research paper is as: Basic introduction and concepts regarding Robotic manipulators, forward and inverse kinematics, shortest path, PSO and obstacle avoidance are discussed in Section I. Section II deals with the related works parts where existing studies in the shortest path evaluation and obstacle avoidance in robotic manipulators using various algorithms were listed in an elaborate manner. Section III proposes an effective system of optimal trajectory planning. Section IV analyzes the performance of the proposed system by analyses the robot 1 and robot 2. Section V concludes the proposed work by highlighting the results and effectiveness of the proposed work. II.

RELATED WORKS
Robot Kinematics categorised into forward and inverse kinematics. The forward kinematics analyse the position of end-effector from the joint angles whereas from end-effector position using the inverse kinematics determine the joint angle. For redundant robot arm manipulator the inverse kinematics issue is highly complicated. To solve global optimization problem, a particle swarm optimization PSO algorithm method has been implemented. The three-link redundant manipulator robot arm based PSO proposed without using inverse kinematics equations in this paper. Three joint angles generated at its best and end-effected position generated at its best of three-link robot arm found by enhanced PSO. The square, circle and triangle path trajectories with respect to positions and joints resulted in smoother outcome compared with other trajectories. And also during PSO the three-link robot has been moving fast. In addition to that error rate has possessed too small [15,16]. This study [17] proposes new technique for robot manipulators i.e. trajectory planning solving namely (TPBSO) trajectory-planning beetle swarm optimization which has been based on heuristic optimization algorithm. The algorithm's practical application has been considered as two specific manipulator trajectory planning issues which are fixed geometric path planning and point to point planning. After evaluating this algorithm results shows better control performance obtained without computational complexity increase and faster computation speed achieved further. For unmanned vehicles, In this study [18] proposed a realistic stochastic trajectory generation technique which offered a trajectories emulation tool in standard flight states. By using quintic B-splines, three scenarios trajectories executed. The Euler angles second order derivatives smoothness and accelerations granted by B-splines. A particle swarm optimization PSO based multi-objectives optimization method the quintic B-spline parameters tuned in search space. The unmanned aerial vehicle UAV configuration imposed the constraints which are satisfied by the proposed method. Some specified constraints has been introduced further like speed limitation, actuator torque limitations and obstacle avoidance. At the end the standard A* algorithm, genetic algorithm GA and standard rapidly-exploring random tree RRT* technique have been simulated for comparing proposed technique with respect to effectiveness in minimum length trajectory identification and implementation time.
In this research [19,20], proposed powerful particle swarm optimization PASO model based novel divide and conquer optimization context which solves the inverse kinematics issues IK and path planning PP problems for general serial hyper-DOF manipulators. With any DOF number the inverse kinematics IK issue solved by PSOIK-(generalised PSO application developed). Further, for hyper-DOF manipulators the scalable PP framework generated. Scalability, power and feasibility of proposed technique evaluated and collision free paths planned for simulated mobile robots and the generality has to examine. This [21] paper focused on redundant manipulator's continuous path planning issue where the desired path needs to follows by end-effector. Within the boundary the desired path tracked by redundancy solution and angle domain boundary. The joint angle travelling distance minimized by meta-heuristic optimizations which is selected the best solution by (GWO) Grey Wolf optimizer, Genetic Algorithm GA and PSO. Using sinusoidal function the angle domain trajectories have been designed. From Bezier and algebraic curves difficult geometrical path chosen termed as traced path with hyper redundant manipulator and 3-DOF arm manipulator. Compared with GWO and GA the PSO obtained better results. For serial and parallel manipulators [22,23] developed (OTGA) Optimal Trajectory generation algorithm to create a reduced-time smooth motion trajectories. The two phases have been described in OTGA. Using cubic spline the reduced time optimal trajectory derivate in first phase and it has been mainly used in acceleration, velocity and robotics. Modifying the interpolation of cubic spline in the optimized trajectory of first and last knots seen in second phase. For optimization performance the PSO algorithm used and for PUMA robot the OTGA has been tested. The results shows that OTGA considered as superior trajectory generation algorithm by compared with others.
This paper [24,25] explored the inverse kinematics of new 7-revoulte joint robot arm calculation using the two variants from PSO. It has been expected that with minimum error the end effector of robot arm has to be move to the desired position in workspace. By global local best inertia weight and random inertia weight the results are obtained and related with standard PSO. This study revealed that for inverse kinematics solution the PSO algorithm has been used efficiently. This research [26] explored the human walking cycle with the help of cubic polynomial equation and quintic polynomial equation. The velocity, acceleration and position have been generated for normal human walking. The knee movement while walking has been copied and duplicated using device controlled by generated signal. From cubic and quantic equations of the gained data during the walking cycle of gait phases have been compared with real human walking data and discussed with respect to the analysed graphs.
In this study [27,28] proposed bionic foot-end trajectory adapted various terrains kinds and gaits depends on trajectory planning idea mixed with joint space and Cartesian space. For joint space trajectories quintic polynomials used and for inverse kinematics solution the trajectory points have been selected. From spatial domain to temporal domain, the interpolation point distributions have been evaluated. Among the original curve and actual trajectory the evaluation function has been recognised and the closeness degree assessed. For precise trajectory, the PSO and GA algorithms used for selection of points. To deal with the smooth trajectory generation issue in parallel kinematic manipulator PKM, this work [29] proposed minimum jerk trajectory planning strategy. The proverbial virtual work and Jacobian matrices analysed the 3 prismatic universal to universal PKM (3 PUU-PKM). The sequence of joints angular position interpolated by discretised piecewise quintic polynomials in Cartesian space. The whole trajectory's angular jerks maximum joints has to be minimized in this study. The effectiveness and feasibility attained by this minimum jerk trajectory planning approach. For industrial robots, this study [30] proposed smooth point to point trajectory planning technique in joint space. The decelerated part, accelerated part and constant velocity have been considered as three parts from joint motion. By 4 th order polynomial with root multiplicity with one co-efficient, the acceleration has been planned. Under the kinematical constraints the constant velocity has been maximized and hence the near time optimal trajectory has been obtained. The velocity, acceleration, jerk and displacement of every end-effector and joint shows all continuous with respect to proposed trajectory planning method. Finally the end-effector smoothly moves and effective proposed method resulted.
This research [31] explored the trajectory planning and shortest path of robot arm with two-link comprised of 2-DOF in 2-D static known environment has been examined. Three issues addressed by this evaluation. The first issue focused on free collision path planning in Cartesian space. The second issue concerns the shortest path using D* technique [32]. Third issue focused on intermediate points selection and using 5 th order polynomial equations the smooth trajectory has to be attained. Hence by addressing all these issues the smooth trajectory finally obtained. This work [33] focused on various sub-optimal solutions based on redundancy resolving in joint space considered as initial step. The solution performed at acceleration level employed by inertia related criterion optimization, null-space damping and weighted pseudo-inversion. On various robot systems multiple numerical results achieved with faster motion compared with exiting methods. In addition to that the obtained motion time with same Cartesian path has been resulted near to the global time optimal solution. This paper [34] implemented robust non-linear control depends on back stepping method on 7 DOF ETS-MARSE robot to provide the rehabilitation therapy for the stroke patients. This proposed method considered as new solution to inverse kinematics issue. The desired rehabilitation trajectories has been generated and optimal Cartesian solution ensured. The robustness, exactness and stability have been validated from the proposed method and shows the effectiveness. Under Cartesian environment [35] proposed novel collision-free motion planning technique preserve robot body from collision with objects and also robot's original task execution. Inside the robot workspace, various KinectV2 depth cameras operated to track the dynamic obstacles [36]. The closest point from obstacle to robot identified and clustered by K-nearest neighbour KNN algorithm. The velocity and obstacle position estimated by Kalman filter. Based on obstacle observation and task specification, the repulsive and attracted potential generated to avoid collision in collaborative operation for robot end effector. The experimental results shows that the obstacles efficiently avoided to complete original task in constrained environment from 6-DOF robot arm. For industrial manipulators, moreover [37,38] proposed optimal planning technique based on geodesic to obtain smooth trajectory in accurate way. Geodesic refer as on Riemannian manifold the shortest path connecting any two points along itself. The orientations space and position categorised by end-effector. For both spaces the Riemannian metric assigned. By joint trajectories the Cartesian trajectories have been shown. For trajectory initial conditions the geodesic equations obtained for each space have been evaluated and finally the results plotted. Numerical evaluations performed to evaluate the geodesic effectiveness.

DH parameter initialization:
In order to identify and analyses the 6-DOF and 5-DOF robot arm used in the proposed research are similar to the traditional arm type robot. The kinematic equation formulation is necessary to analyze the arm robot. The proposed system is established by DH parameters initialization for robot modelling.
The four parameters of robotic arm used for linking the reference frames to other frames are, from the previous frame distance to next frame through and −1 perpendicular convergence-link offset/joint distance -link length/ offset distance among the −1 and general perpendicular of axes.
-Joint angle and -link twist/ offset angle.

Inverse Kinematics:
The homogenous transformation matrix is easily measured by the D-H conversation. To represent the homogenous transformation, the D-H convention used four basic transformation product denoted by . The matrix is defines as homogenous 4x4 transformation matrix explains the orientation of the object and point position on an object in 3-D space. By using DH parameters the homogenous transformation matrix derived from one frame to next frame.
In D-H convention the homogenous transformation matrix has been determined as four basic transformation product, The inverse kinematic analysis is the alternative to the forward kinematic analysis. Each joint corresponding variables have been found with provided position requirement if the manipulator end in provided references coordinates system. Analysis of inverse kinematics done by each inverse matrix multiplication of matrices on left side of equation 4 and the corresponding elements are equalized.
The Procedure for the proposed robot design, Initialize the DH parameter followed by Angle limitation for each Joint should be provided. Then create the Robot link by Peter Corke tool box and finally Manual angle can be used to verify. The joints are strictly connected by links and joint control variables are used. End effectors or tools are actuators or sensors associated with robotic device last link. The peter corke toolbox has been given various functions which are helpful in the proposed study and for arm type robotics simulations such as dynamics, trajectory generation and kinematics.

Optimal Trajectory Planning:
By the kinematic inverse operation, in the Cartesian space the number of required robot end effector track points are transformed into joint variables and further the joint space track points are interpolated and achieved joint variables of robot. To interpolate trajectory points, a quintic polynomial is used in robot joint space.

5
(3) The trajectory is coarsely defined by the geometric path which describes the sequence of waypoints. The challenges includes shortest path and obstacle avoidance. The optimal trajectory planning shortest distance evaluation described in below figure 2 and similarly for obstacle avoidance the procedure described in the figure4.

Generating the trajectory:
The path planning provided the path which establishes the trajectory generator input. By polynomial class functions, the trajectory generator estimates waypoints of the preferred or desired path. Time based control sequence generated and moving the mobile platform or manipulator from the initial configuration to destination. The trajectory implicit definition is achieved by solving a problem with particular boundary conditions in given class of functions such as polynomials (quintic, cubic…), clothoids, sinusoids…etc.
Interpolation is defined as passage through points.

Initial, final and intermediate velocity or geometric tangent to the path.
Initial, final and intermediate velocity or geometric curvature.

Joint Space Trajectory
• A quintic (5th order) (from equation 6) polynomial is used boundary conditions for velocity and acceleration.
• Time is assumed to vary from 0 to 1 in intermediate steps.
• From initial point to final point the inverse kinematics solution is calculated.
• Using maximum velocities in joints, the total time is assigned.

•
The individual joint trajectories discretized in time.
• Between these points, the continuous function blended.

Fig.3. -Joint space Trajectory
The geometric path of joint space from above figure 3 in parametric form is, Where, DOF = n and the motion law = ( ).

Cartesian Trajectory
• The Cartesian trajectory is a homogeneous transform sequence and the last subscript being the point index, that is, T (: i) is the i'th point along the path.
• The Cartesian trajectory is applied on the identified shortest path to find the intermediate points.

Particle Swarm Optimization (PSO)
The particle swarm optimization PSO is defines as computational technique which iteratively optimizes a problem described in below algorithm, and trying to improve the candidate solution with respect to quality measure. Hence, the best fitness value selected through the PSO technique. The major merits of PSO algorithm are easy to implement, simple concept, efficient computation, robustness. Due to these merits PSO algorithm is found to be better than the other traditional methods.

Algorithm I:PSO
1. Set parameter The algorithm I shows the Particle Swarm Optimization where the initial parameters are set. Subsequently population of particles are initialized as position X and velocity V. Iteration is set to k equal to one. Fitness of particles is calculated based on step 4 to find the index of the best particle b. Then the velocity and position of particles are updated. Then the index position b1 is evaluated and updated. The major metrics of PSO algorithm that are used include inertial weight, acceleration factors, population size, maximum iteration and initial velocity. Thus the optimum solution is obtained through step 19.
Trajectory inverse kinematic minimization by PSO, • Joint limits are considered in this solution.
• The solution returned depends on the initial choice of q0. The q0 is the search agent of PSO • Works by minimizing the error between the forward kinematics of the joint angle solution and the endeffector frame as an optimization. The objective function (error) is described as: ∑ √( −1 * − (4)) * ɷ (5) Where omega is gain matrix In the cartesian space, Angular displacement = 2 -1 (change in angle), where 2 is the current angle and 1 is the previous angle.

Obstacle avoidance:
The obstacle avoidance is subjected to non collision or non intersection position constraints by some control objectives. Generally the obstacle avoidance is different from path planning which involves reactive control law and whereas other involves the obstacle free path precomputation in which a controller guides the robot. The proposed obstacle avoidance has bee shown in the figure with explanation.
From Eq. (11), ∆ is the velocity and ∆ is the time. We set the clock at 0 and ending position goes to 0. When the velocity vary the acceleration also varies. Acceleration depends on the velocity value which is set manually.
In case of obstacle velocity and obstacle acceleration the same formula in Eq. (8) and Eq. (9) is applied. To avoiding the obstacles the different paths are identified.

ANGULAR DISPLACEMENT
Robot 1 angular displacement I) II)

III) IV)
The above figures depicted the angular displacement with respect to the four positions on the trajectory path.
Here the x-axis shows the Joint 1, Joint 2 ...Joint 6 whereas the y-axis is the angular displacement. The angular displacement is measured as difference between the previous θ and the present θ for Joint 1… Joint 6 for 6-DOF.

III) IV)
The above figures depicted the obstacle angular displacement with respect to the four positions on the trajectory path. Similarly for obstacle angular displacement also the same measurement is followed as difference between the previous θ and the present θ for Joint 1… Joint 6 for 6-DOF. . Similarly, for 5-DOF also we set the clock at 0 and ending position goes to 0. When the velocity vary the acceleration also varies. Acceleration depends on the velocity value which is set manually. In case of obstacle velocity and obstacle acceleration the same formula in Eq. (8) and Eq. (9) is applied. To avoiding the obstacles the different paths are identified.

ANGULAR DISPLACEMENT
Robot 2 angular displacement I) II)

III) IV)
The above figures depicted the angular displacement with respect to the four positions on the trajectory path.
Here the x-axis shows the Joint 1, Joint 2 ...Joint 5 whereas the y-axis is the angular displacement. The angular displacement is measured as difference between the previous θ and the present θ for Joint 1… Joint 5 for 5-DOF. IV)

OBSTACLE / ANGULAR DISPLACEMENT
The above figures depicted the obstacle angular displacement with respect to the four positions on the trajectory path. Similarly for obstacle angular displacement also the same measurement is followed as difference between the previous θ and the present θ for Joint 1… Joint 5 for 5-DOF.      Similarly the obstacle path are also shown in response to obstacles avoidance is depicted.  Similarly the obstacle path are also shown in figure  11 which is the response to obstacles avoidance is depicted.

Fig.11. -5-DOF obstacle avoidance path
Hence, by using the optimization algorithm implemented on both joint space trajectory and Cartesian trajectory the highly accurate result is obtained specifically in both shortest path and obstacle avoidance path.

COMPARATIVE ANALYSIS
The fitness value obtained from the proposed Robotic manipulator 5-DOF and 6-DOF is compared with existing robot manipulator fitness value [40]. In the existing study the 3-DOF robot manipulator is utilized and obtained fitness value at 100 iterations. The comparative results shows that the fitness value obtained rapidly in 100-150 iterations in both 5-DOF and 6-DOF compared with existing 3-DOF robot manipulator. Hence the proposed method using the PSO optimisation algorithm shows better performance than the existing method.  -5 and table-6, it is clearly depicted about the six joints velocity and six joints acceleration of the optimal trajectory and it explores the corresponding path in a table format. Thus through the proposed system, the velocity and acceleration has increased thereby increasing the performance of the system.

V. CONCLUSION
This article developed to frame the inverse and forward kinematic model of 5 DOF and 6 DOF robot manipulator. The trajectory inverse kinematics minimization has been the main objective in this study and it has been achieved by Particle Swarm Optimization PSO. A quintic 5 th order polynomial with joint space trajectory used and Cartesian Trajectory is applied to the shortest path and get the transformation matrix for each intermediate point.
Finally the obstacle avoidance has been exhibited by PSO. For both robots 1 and 2 the distant velocity, angular displacement and acceleration have been evaluated in terms of shortest paths and obstacle path. The current study has been compared with existing study of robot manipulator and fitness evaluated and shows effective performance. Thus velocity and acceleration increased through the proposed system.