(Microsoft Word - \323\332\317 \322\333\341\346\34177-89) Al-Khwarizmi Engineering Journal Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, March, (2018) P.P. 77-89 Creating Through Points in Linear Function with Parabolic Blends Path by Optimization Method Saad Zaghlul Saeed Al-khayyt Department of Mechatronics / College of Engineering/ Mosul University/ Iraq Email: alkhyaat@yahoo.com (Received 8 May 2017; accepted 9 October 2017) https://doi.org/10.22153/kej.2018.10.005 Abstract The linear segment with parabolic blend (LSPB) trajectory deviates from the specified waypoints. It is restricted to that the acceleration must be sufficiently high. In this work, it is proposed to engage modified LSPB trajectory with particle swarm optimization (PSO) so as to create through points on the trajectory. The assumption of normal LSPB method that parabolic part is centered in time around waypoints is replaced by proposed coefficients for calculating the time duration of the linear part. These coefficients are functions of velocities between through points. The velocities are obtained by PSO so as to force the LSPB trajectory passing exactly through the specified path points. Also, relations for velocity correction and exact velocity solution are derived. Simulation results show that the engagement of modified LSPB trajectory with PSO to work well on the tested cases. This proposed method is very simple which can be used for on-line path planning, and not necessarily to use high acceleration magnitude. Keywords: Adaptive inertia weight, Linear segment with parabolic blend, Particle swarm optimization, Robot manipulator, Through point, Trajectory generation. 1. Introduction Straight line segments is the output from motion planners. This path has velocity discontinuity at waypoints. To achieve an efficient execution on the robot, blends are added to ensure a smooth transition between segments [1]. A common trajectory for industrial robots is the linear segment with parabolic blend (LSPB) [2, 3]. The LSPB needs only the initial and final joint angles, traveling time, and either angular acceleration or angular velocity. Numerous methods and algorithms have been established which generate such trajectories with velocity, acceleration, and jerk limitations [4, 5]. In LSPB, it is required to use high acceleration's magnitude to be quite close to the desired waypoint. Time-optimal solution for time durations of LSPB so as to satisfy the constraints velocity and acceleration is presented in [6]. This requires calculation a factor for velocity reduction of two neighboring linear segments in order to prevent overlapping of blend phases. Yet, this ethomd can lead to very slow trajectories [7]. Rymansaib et al. used a series of time-delayed third-order exponential function to generate an approximation to the trapezoidal velocity profile of LSPB [8]. The motion duration is affected by high blending percentage as well as the corresponding accuracy at waypoints. A new technique "envelope of tangents planning" had been developed so as to generate trajectory that reaches waypoints in specified moments of time [9]. This is achieved by assigning positions and tangential velocities that the joints must have when the end-effector passes through each of those waypoints. Additionally, the online trajectory generation algorithm was combined with the Reflexxes libraries to make the trajectory reaches waypoint with continuous acceleration and jerk [10, 11]. Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 78 New path planning algorithm was developed for the control of an XY -motion stage using LSPB and minimum time trajectory for an aerosol printing system [12]. The algorithm calculates blend times and constant velocity based on given trajectory conditions. But large error in speed appeared for acute angle trajectory. This problem can be considered as multi-segment trajectories without stopping at waypoints. Weber et al. used the tool CorDe (Corner Drive with Defined Speed) to visualize the characteristic of the distance to the corner depending on the speed deviation for transition between path segments [13]. But the absolute maximum acceleration is difficult to obtain as a realistic value which is the sole characteristic value. This results in a loss on performance for many transition points. Classic optimization approaches suffer from many drawbacks, such as high time complexity in high dimensions and trapping in local minima, which make them inefficient in practice. Modern or nontraditional optimization methods such as genetic algorithm and swarm intelligence are widely used in path planning problems [14-16]. Particle swarm optimization (PSO) is simple and fast because it has few parameters to be adjusted [17]. In the above mentioned works, the suggested methods have limitations and use the same basic equations of LSPB. The LSPB trajectory still deviates from the specified waypoints. In this work, the LSPB trajectory is modified and engaged with PSO. The novelty in this work is to modify LSPB trajectory using two coefficients for calculating the time duration of the linear part in LSPB trajectory. These coefficients are functions of velocities between through points. The velocities are obtained by PSO to force the LSPB trajectory passing exactly through the specified path points. Also, relations for velocity correction and exact velocity solution are derived. 2. Multisegment Linear Path with Blends For the case in which there are many waypoints, linear segments with parabolic blends are considered. In LSPB, the segment is divided into three parts: parabolic, linear, and parabolic; respectively (Fig.1). Considering the path waypoints which are j, k, and 1. The time duration for blend region of point k is tk. The time duration for linear part between points j and k is tjk. The time duration of the segment which connects points j and k is tdjk. According to Fig. 1, the linear velocity between points j and k is jkθ & , the acceleration at point k is kθ && , and the path point position is kθ . The blend times tk is computed from the given: path points kθ , desired time durations tdjk, and the magnitude of acceleration kθ && . For interior path points, this follows simply the equations [2]: djk jk jk t θθ θ − =& …(1.a) kjkklk SGN θθθθ &&&&&& )( −= …(1.b) k jkkl kt θ θθ && && − = …(1.c) kjdjkjk tttt 2 1 2 1 −−= …(1.d) where SGN ( ) returns the sign of the value in the brake. In the first and last segments there is an entire blend region at one end of the segment. For the first segment [2]: 1121 )( θθθθ &&&& −= SGN … (2.a) 1 122 12121 )(2 θ θθ && − −−= dd ttt …(2.b) 112 12 12 2 1 tt d − − = θθ θ& …(2.c) 211212 2 1 tttt d −−= …(2.d) djk t dij t k t kl θ&=Slopejkθ &=Slope jk t θ i θ i θ j θ k θ l θ t j i l k Fig. 1. Multisegment linear path with blends [2] Likewise, for the last segment (the one connecting points n-1 and n), which leads to the solution: nnnn SGN θθθθ &&&& )( 1 −= − …(3.a) Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 79 n nn nndnndn ttt θ θθ && )(2 12 )1()1( − −− − +−= …(3.b) nnnd nn nn tt 2 1 )1( 1 )1( − − = − − − θθ θ& …(3.c) 1)1()1( 2 1 −−− −−= nnnndnn tttt …(3.d) In these linear-parabolic-blend splines, when acceleration capability is sufficiently high, the paths will come quite close to the desired waypoint. The manipulator must come to a complete stop if it is desired to pass exactly through a waypoint. The term "through point", as it was mentioned in [2], will be used in the next sections to specify a path point through which the manipulator is forced to pass exactly. 3. Problem Definition In the previous section, the LSPB trajectory is constrained to the following [6]: 1-The velocity at the first and last through point must be zero. 2-The velocity and acceleration of the trajectory must be: maxmax )()( θθθθ &&&&&& ≤∧≤ tt . The limitations of this algorithm are: 1-Sufficiently large acceleration is required so as to obtain linear portion in the segment. 2-The manipulator's velocity must be zero so as to pass into waypoints. 3- The system should generate two pseudo points so as to make the manipulator passes exactly through a path point without stopping. 4-The parabolic portion is assumed to be centered equally in time about through point. This later assumption makes the apex of parabolic part to be shifted away from through point as shown in Fig. 2. For interior path point (equation (1)), the apex of the parabolic portion is not equally centered in time about waypoint. This can be easily proved using the kinematic equations for LSPB trajectory as presented below. 1θ & 2θ & 0=θ& Fig. 2. Trajectory of parabolic part. Proof 1: ,0and,0,0Given 21 <<> θθθ &&&& the velocities at the parabolic path for constant acceleration are: abtθθθ &&&& −=− 12 …(4.a) atθθθ &&&& −= 1 …(4.b) btθθθ &&&& −=− 2 …(4.c) where 21 and,, θθθ &&& are the velocities of previous segment, apex point, and next segment; respectively. But when the trajectory changes its direction, the apex point's velocity becomes zero. The above equations of velocities are solved for unknown time durations as: θθ &&& /1=at …(5.a) θθ &&& /2=bt …(5.b) ba tt ≠∴ …(5.c) Therefore the apex of parabolic path is not exactly placed under a waypoint unless 21 θθ && = in magnitude. 4. Proposed Method The assumption of normal LSPB that parabolic portion is centered in time around waypoints is replaced in this work by proposed coefficients which are functions of velocities between through points. From equations (4 and 5), the time durations on the parabolic blend around through point are obtained as: θθθ θθ &&&& &&& /)( / / 21 1 + =aba tt )( / 21 1 θθ θ && & + =aba tt …(6.a) Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 80 )( / 21 2 θθ θ && & + =abb tt …(6.b) From equation (6), now two coefficients (αj & αk) are obtained for calculating the time duration of the linear portion of the trajectory. These coefficients are obtained from the LSPB kinematic equations. Two coefficients are used to calculate the time's duration of the parabolic portions in the segment's time duration (tdjk). Given through points (joint's angles), time durations, and assuming accelerations for all through points, the modified LSPB equations are as below: Modified mid segments kjkklk θ/θθt &&&& )( −= …(7.a) kkjjdjkjk tαtαtt −−= …(7.b) )( jkijjkj θθ/θα &&& += …(7.c) )( kljkjkk θθ/θα &&& += …(7.d) Modified first segment 1121 θ/θt &&&= …(8.a) 2211212 tαttt kd =−−= …(8.b) )( 2312122 θθ/θα &&& += …(8.c) Modified last segment n)n(n-n θ/θt &&& 1−= …(9.a) nnnjnndnn- ttαtt −−= −−=− 11)1()1( …(9.b) )( )1()1)(2()1(1 nnn-n-nnn- θθ/θα −− += &&& …(9.c) By using these coefficients, the apex of parabolic portion is positioned exactly under the through point. Although the apex of parabolic part is now positioned exactly under through point, but it stills not passing through it. This is because of replacing a linear part region of the segment by parabolic part. This can be proved as below. Proof 2: The position for linear part with constant velocity during a time t is t θ ll ⋅= θ & …(10) and that for parabolic part with constant acceleration in the same time duration is: 2 2 1 tθt θ lp &&& −⋅= θ …(11) The difference (Δθ) between these parts is: lp θθθ −=∆ …(12) Substituting equations (10) and (11) into equation (12) gives: ttθtθ ll ⋅−−⋅=∆ θθ &&&& 2 2 1 2 2 1 tθθ &&−=∆ …(13) which means this displacement of parabolic part is less than that of linear part for same time duration. This problem can be solved by increasing the velocity between through points in presence of acceleration limits. The problem of finding the velocities' value can be solved by optimization methods such as PSO. 4.1. Velocity Correction In the above modified LSPB, the initial velocities are obtained from equation (1). But from proof 2, there is an error due to the parabolic part (equation (13)). Therefore, these velocities can be corrected by adding the change of velocity (equation (14.b)) based on the error of the parabolic parts as: jkjkjk θθθ &&& ∆+=corrected)( …(14.a) jkjkjkjk tSGN /)( θθθ ∆=∆ && …(14.b) )) 2 1 () 2 1 (( 2 1 22 kkjjjk tt ⋅+⋅=∆ θθθ &&&& …(14.c) In the above equation, half of the blend durations (tj and tk) are accepted as an approximated value. This corrected velocity is used as initial velocity to begin the optimization process. 4.2 Exact Solution of Velocity The LSPB offers exact solution of velocity for path segment when there is acceleration from zero velocity to linear velocity and deceleration to zero velocity. For example, the first and second segments (ij and jk) or the second and third segments (jk and kl) have such situation (Fig.1). The second and third segments are considered to derive a general solution. Let ts, tl, and te are times' duration for first parabolic part, linear part, and last parabolic part for the path from through point j to through point k. The total displacement is the summation of these three parts as below: 2/2/ 22 eklexactsjjk ttt θθθθθ &&&&& ++=− …(15.a) esdjkl tttt −−= …(15.b) jexactst θθ &&& /= …(15.c) kexactet θθ &&& /= …(15.d) Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 81 Solving the above quadratic equation (equation (15.a)) for the exact velocity to obtain: ⋅ ⋅+ ⋅+⋅−−−+ = )/()( )/()(2 2 kjkj kjkjjkdjkdjk exact tt θθθθ θθθθθθ θ &&&&&&&& &&&&&&&& & )( jk SGN θθ − …(16) In the above derivation, absolute values are used to prevent sign confusion. The sign of velocity is introduced after solving the quadratic equation. 4.3. Steps of Proposed Method The proposed modified LSPB is presented here which overcomes the limitations of the normal LSPB. It provides logic sequence for computer programming to generate through points: Step 1: Calculate velocities and accelerations according to equation (1). Step 2: Use equation (16) to solve for exact velocity if there is a change in velocity direction between two following through points. Step 3: Obtain the time durations for the trajectory using equations (7-9). Step 4: Apply velocity correction using equation (14) to all calculated velocities at step 1 except that obtained at step 2. Step 5: Use these velocities as initial solution for the optimization process. This algorithm can be easily converted into computer program to perform optimization process (Fig. 3). The velocities are obtained from optimization process so as to force the LSPB trajectory passing exactly through specified path points. nnn tttt 1121 ...,,,...,,Calculate − (16)Eq.fromfor 1+iiθ & nnndn tt θθθθ &&&& ..., ,,...,,,...,, 11121 − nnn θθθθ &&&&&& ..., ,,...,,Calculate 1112 − (14)Eq.fromfor 1+iiθ & Fig. 3. Algorithm flowchart for proposed modified LSPB trajectory. 5. Particle Swarm Optimization Recently, modern or nontraditional methods of optimization are widely used for solving different optimization problems. Edward and Kennedy formulated PSO in 1995. The process was inspired by the social behavior of animals, such as bird flocking or fish schooling. Each particle has two characteristics which are: a position and a velocity. It must remember the best position in terms of objective function value. The particles adjust their individual positions and velocities by sharing the received information of the best position [18]: Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 82 22 old , bestlocal ,11 old , new , rΓ)(rΓ ×+−××+= jijijiji w ppvv )( old , bestglobal , jiji pp −× …(17.a) new , old , new , jijiji vpp += …(17.b) where v is particle's velocity, w is inertia weight, P is particle position or variable, r1 and r2 are uniform distributed random numbers, P local best is best local postion, P global best is best global position, i is particle index, j is dimension of variable, Γ1 is individual learning rate, Γ2 is group learning rate. Premature and local optimum convergence are the disadvantages of traditional PSO. Modifications to PSO were applied so as not to skip the optimal solution [19]. These modifications are happened either on basic components or on swarms itself. Modifications on basic components of PSO are: inertia weight [20, 21], velocity constriction [22, 23], and velocity clamping [24]. Five basic benchmark optimization functions had been tested by using fifteen different inertia weight variants in [25]. They concluded that chaotic inertia weight improves the accuracy of the solution. Modifications on the swarms itself are: insertions new swarms [26, 27], mutation [28], and swarm initiation [29]. These modifications can increase the search diversity. Applying multiple modifications on the basic components of PSO and swarms was suggested as future work in [30]. An improved chaotic PSO algorithm based on adaptive inertia weight (AIWCPSO) was proposed in [31]. Initially, the positions and velocities of the population are generated by using chaotic mapping. The inertia weight is adjusted according to the values of: iterative number, aggregation degree factor, and improved evolution speed parameter. AIWCPSO algorithm with chaotic swarm initiation and swarm injection were used in [32]. This combines modifications to basic components of PSO and swarms. In this work, improved chaotic PSO algorithm based on adaptive inertia weight (AIWCPSO) is used. Also velocity constriction factor, λ, is included (equation (18)). new , old , new , jijiji vpp λ+= …(18) Steps of AIWCPSO Algorithm Step 1: Cubic mapping (equation (19)) is used to generate double or triple swarm size as chaotic initialization. The cubic mapping is described as following:    <<− −=+ 11 34 0 3 1 p ppp nnn …(19) where p0 is a random number substituted as initial value. These swarms are tested so as to select those of best fitness as initial solution to particle position. Then this initial solution is mapped to the search space range. Step 2: Chaotic initialization is also applied to generate N initial velocities by cubic mapping (equation (19)). Step 3: The inertia weight is updated by the equations below for a single particle: ( ) ( )adfesfi ie iter iter wwww βα −− −−= max minmaxmax …(20.a) )()( )]()([ 1 1 − − + − = k i k i k i k i i pbestFabspbestFabs pbestFpbestFabs esf …(20.b) )],([max )],([min k avg k best k avg k best FFabs FFabs adf = …(20.c) where k is the current iteration value. wmax and wmin are maximum and minimum values of inertia weight; respectively. iter is the current iteration number and itermax is the maximum number of iteration. The value α and β has the range [0,1]. esfi is the improved evolution speed parameter of particle i (i =1, 2,..., N), adf is the aggregation degree factor of swarm, F (pbesti k) is the best fitness value of particle i at the k th iteration, Fbest is the best fitness obtained from all particles, Favg is the mean fitness of all particles in the swarm at the same iteration. Step 4: The variance (σ) is calculated for the population's fitness (equation (21)). When variance is less than threshold value and the optimal fitness of current iteration is worse than the desired fitness value, chaotic disturbance is applied. ∑ = − − = N i k avg k i k avg k i FxFabs FxF 1 22 ) ]1]],)([[[maxmax )( (σ …(21) where F( xi) is fitness values of particle i. Step 5: Chaotic disturbance strategy: Cubic mapping (equation (19)) is used to generate chaotic vector oij (i =1, 2,..., N; j =1,2,..., J), where o0j is (-1,1) of random numbers, and the component of this vector is loaded to the range of chaotic disturbance of [−γj, γj ] (j=1, 2,..., J). Then chaotic disturbance variation is Δpi = (γ1 oi1, γ2 oi2 ,...,γJ oiJ). The position updated of particle after adding the chaotic disturbance variation is given by: pbij (k +1) = pij (k) + vij (k) + Δpij. Finally, comparison is made between the fitness values of F(pbi (k +1)) and F (pi (k +1)). If F(pbi (k +1)) is Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 83 better than F(pi (k +1)), then pi (k +1) is updated by pbi (k +1). Note: J is the variable's dimension of particle i. For more details about AIWCPSO algorithm see [31]. 6. Simulation Results Simulations are presented to validate the proposed method. These simulations are implemented in Matlab7 on Pentium 4 PC processor (Intel (R) Core (TM) i5-2450M CPU @ 2.50 GHz). The parameters of PSO are set as follows: Γ1=2.05; Γ2=2.05; λ=0.7298 [22]; N= 40; itermax= 30; wmax=0.09, wmin= 0.05; α=0.99; β=0.01; γ=10 -4 ; threshold value= 10 -5 ; desired fitness value =10 -12 . The objective function to be minimized has the form: ∑ = = np i ie 2 2 Fitness …(22) where e is the error at through point, np is total number of through points. The error at through point 1 is always zero because it is starting point. Considering a single joint: Through points of the path in degrees: 10, 35, 25, 10. The time durations of the segments are: 2, 1, 3 seconds; respectively. The acceleration at blend points is 50 degrees/second 2 . Although different accelerations at different through points can be used. At first, the trajectories of normal LSPB (equations (1-3)) and modified LSPB (equations (7-9)) are compared (Fig. 4). The normal LSPB trajectory is shifted while the modified is equally spaced about through points. A comparison of linear part velocities is presented in Table 1 for 50 degrees/second 2 acceleration between normal LSPB, modified LSPB with velocity correction, and optimum modified LSPB (section 4.3). It is clear that modified LSPB with velocity correction is better choice as initial velocity to begin the optimization process. A range between 0.9 to 1.2 of these later calculated velocities is used as initial value for the optimization. This will reduce the number of iterations to reach optimum solution. PSO is used to generate optimal linear velocities for the linear parts. In fact, that increasing the velocities of the linear portions will compensate the error resulted from inserting parabolic region in the path between two neighboring through points. Figure 5 shows comparison between the normal and modified LSPB trajectories using PSO method. The normal LSPB trajectory deviates from the through points, while the engagement of modified LSPB with PSO (proposed method in section 4.3) passes into them. In the normal LSPB method, it is restricted to use acceleration's value higher than 40 degrees/second 2 [2]. Figure 6 shows results of proposed method for the two acceleration values using PSO. The results of comparison are presented in Table 2 for different acceleration values. Acceleration values are: 30, 50, 70 degrees/second 2 . Fig. 4. Trajectories of normal and modified LSPB Table 1, Comparision of linear velocities. Method Velocity Normal LSPB (eqs.1-3) Modified LSPB & velocity correction (eqs. 7-9&14) Modified LSPB & PSO (eqs. 7-9) & (eqs. 14, 16- 24) 12θ & (deg/sec) 13.3975 14.3854 14.6446 23θ & (deg/sec) -10.0000 -11.8111 -11.5306 34θ & (deg/sec) -5.0862 -5.1090 -5.0728 t1 (sec) 0.2679 0.2877 0.2929 The error at through points is reduced for the cases of proposed method. The error at point 2 is zero because of using the exact velocity solution (equation (16)). The error at point 3 is 0.2916∙10- 12 , 0.3588∙10-12, and 0.0107∙10-12 degree for accelerations 30, 50, and 70 degrees/second 2 ; respectively. Optimal velocities' value are presented in Table 3. 0 1 2 3 4 5 6 10 15 20 25 30 35 40 Time (sec) P o si ti o n ( d e g re e ) Through point Normal Modified 1.8 1.9 2 2.1 2.2 2.3 33 34 35 Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 84 Table 2, Comparison of error at through points between normal and modified LSPB using PSO. Case Acceleration (deg/sec2) e2 (deg) e3 (deg) e4 (deg) Normal LSPB (eqs.1-3) & PSO (eqs. 17-22) 30 0.7919 0.9480 0.6877 50 0.3785 0.5844 0.5021 70 0.2539 0.4010 0.3431 Proposed method (eqs. 7-9 & eqs. 14, 16-24) 30 0.0003∙10-12 0.2916∙10-12 0.3038∙10-12 50 0.0002∙10-12 0.3588∙10-12 0.5524∙10-12 70 0.0001∙10-12 0.0107∙10-12 0.5240∙10-12 Fig. 5. Comparison between normal and modified LSPB trajectory using PSO. 0 1 2 3 4 5 6 10 15 20 25 30 35 40 Time (sec) P o si ti o n ( d e g re e ) Through point Acceleration=50 Acceleration=30 Fig. 6. Trajectories obtained by proposed method. Table 3, Optimal values obtained by proposed method. Variable Acceleration (deg/sec2) 30 50 70 12θ & (deg/sec) 17.7526 14.6446 13.8751 23θ & (deg/sec) -13.9218 -11.5307 -10.9786 34θ & deg/sec) -5.1142 -5.0728 -5.0525 t1 (sec) 0.5918 0.2929 0.1982 The run execution time is found to be about 5.4% of the first parabolic portion (0.2929 seconds) for the 50 degrees/second 2 acceleration. This value is enough to generate trajectory of desired path by using the algorithm of the proposed method for on-line path planning. Point to point position trajectory is simulated for two-link planar robot manipulator (Fig. 7). It has revolute joints. The masses m1 and m2 are assumed to be concentrated at the distal end of the links which have the lengths l1 and l2; respectively. The robot starts at point (2.95, 0.05) and passes through points (2.45, 0.05) and (2.7, 0.30). Then it stops at point (2.95, 0.05). All coordinates are in meters. The time durations are: 4, 3, 3 seconds. The robot dynamic equation and controller are taken from early published paper [33]. The desired through points in joint space are obtained by solving the inverse kinematics equations [2]. The trajectory for the two joints is generated by using the proposed method (Fig.8). 0 1 2 3 4 5 6 6 12 18 24 30 36 Time (sec) P o si ti o n ( d e g re e ) Throug point Normal Proposed 1.8 2 2.2 2.4 32.5 33 33.5 34 34.5 35 35.5 Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 85 Fig. 7. Planar robot arm with two links [2] 0 2 4 6 8 10 -60 -40 -20 0 20 40 60 Time (sec) P o si ti o n ( d e g re e ) Joint 1 Joint 2 Fig. 8. Two-link joint's desired trajectory obtained by proposed method. The Cartesian trajectory of the two-link manipulator is presented in Fig. 9. The errors in the Cartesian space are: 0.5722∙10-5, 0.4180∙10-5, 0.4365∙10-5, and 0.2551∙10-5 in meters for these through points. The error at the starting point is not zero because of the used controller which is learning on-line. The error at through points is presented in Table 4. Finally, a comparison of results is presented for path of acute angles from [12]. The pattern contains 14 line segments, and beginning at the origin. The segments form angles starting at 125° and decrease linearly to 5°. The peak velocity error shown in Fig. 10 increases as angle decreases. For example, a complete change in direction or a 0° angle results in a 100% error according to the method of [12]; while the error is no more 21% by using the proposed method in this work. In LSPB, the trajectory deviates slightly from the straight path. This deviation is increased as the angle formed by two segments is decreased (Fig. 11). Table 4, Error at through points for point to point trajectory using the proposed method Link Error (deg) e2 e3 e4 1 0.0071∙10-12 0.2061∙10-12 0.1474∙10-12 2 0.0284∙10-12 0.1137∙10-12 0.0675∙10-12 2.4 2.5 2.6 2.7 2.8 2.9 3 0.05 0.1 0.15 0.2 0.25 0.3 0.35 x (m) y ( m ) Actual trajectory Through point Fig. 9. Two-link Cartesian path obtained by proposed method. 0 5 10 15 20 25 30 0 20 40 60 80 100 Time (sec) S p e e d e rr o r (% ) Reference [12] Proposed method Fig. 10. Comparison of Speed error resulting from decreasing segment angle Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 86 0 5 10 15 20 25 30 0 2 4 6 Time (sec) y ( m m ) Desired trajectory Proposed method Fig. 11. Trajectory of y-component with decreasing segment angles. 7. Conclusions The normal LSPB is restricted to that the acceleration must be sufficiently high. In this work, modified LSPB is engaged with PSO for generating smooth valid trajectories that passes through specified path points while satisfying velocity and acceleration constraints of physical mechanical robot manipulator. Increasing the velocity of linear portions compensates the error due to inserting parabolic part. Velocity correction is used to obtain close values to the optimal solution. This reduces the number of iterations to obtain the optimum solution. Also, exact solution of velocity can be used for LSPB path segment when there is acceleration from zero velocity to linear velocity and deceleration to zero velocity. Simulation results show that the proposed method to work well on the tested cases. The error at through points is almost zero. Advantages of the modified LSPB algorithm are: through points can be created, easily engaged with optimization method, very simple which can be used for on- line path planning, and not necessarily to use high acceleration's magnitude. The proposed method in this work has no chance to fail to create through points within a reasonable number of iterations. 8. References [1] Ellekilde, L. P. and Petersen, H. G. (2013). Motion planning efficient trajectories for industrial bin-picking. International Journal of Robotics Research, 32(9-10): 991-1004. [2] Craige, J. J. (2005). Introduction to robotics: mechanics and control. New Jersey. Person Prentice-Hell, Inc. [3] Siciliano, B., Sciavicco, L., Villani, L. and Oriolo, G. (2009). Robotics: modelling, planning and control. London. Springer- Verlag: pp.168. [4] Ata, A. A. and Sa'adah, M. Y. (2006). December 8. Soft motion trajectory for planar redundant manipulator. 9th International Conference on Control, Automation, Robotics and Vision. Singapore. [5] Xianhua, L., Shili, T., Xiaowei, F. and Hailiang, R. (2009). December 19-20. LSPB Trajectory planning: design for the modular robot arm applications. IEEE International Conference on Information Engineering and Computer Science. Wuhan. DOI: 10.1109 / ICIECS. 2009.5365861:1-4. [6] Kunz, T. and Stilman, M. (2011). Turning paths into trajectories using parabolic blends. GT-GOLEM-2011-006. Georgia Institute of Technology. [7] Kunz, T. and Stilman, M. (2012). Time- optimal trajectory generation for path following with bounded acceleration and velocity. Proceedings of Robotics: Science and Systems. Sydney, Austria. DOI: 10.15607 / RSS.2012.VIII.027: 9-13. [8] Rymansaib, Z., Iravani, P. and Sahinkaya, M.N. (2013). July 9-12. Exponential trajectory generation for point to point motions. IEEE/ASME International Conference on Advanced Intelligent Mechatronics, Wollongong-Australia, pp.906-911. [9] Rossi, C. and Savino, S. (2013). Robot trajectory planning by assigning positions and tangential velocities. ELSEVER: Robotics and Computer-Integrated Manufacturing. 29: 139- 156. [10] Kröger, T. and Wahl, F. M. (2010). Online trajectory generation: basic concepts for instantaneous reactions to unforeseen events. IEEE Transactions on Robotics, 6(1): 94-111. [11] Kröger, T. (2012). May 14-18. On-line trajectory generation: Nonconstant motion constraints. International Conference on Robotics and Automation, River Center, Saint Paul, Minnesota, USA. DOI: 10.1109 / ICRA. 2012.6225186: 2048-2054. [12] Thompson, B. and Yoon, H.-S. (2014). Efficient Path Planning Algorithm for Additive Manufacturing Systems. IEEE Transactions on components, packaging and Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 87 manufacturing technology, 4(9): 1555-1563, DOI: 10.1109/TCPMT.2014.2338791 [13] Weber, W., König, A., Nodem, D. X., Darmstadt, H. (2016). June 21 – 22, 2016. User-defined transition between path segments in terms of tolerances in speed and position deviation. Proceedings of ISR 2016, 47st International Symposium on Robotics, Munich-Germany, pp.187-193. [14] Masehian, E. and Sedighizadeh, D. (2010). Multi-objective PSO- and NPSO-based algorithms for robot path planning. Advances in Electrical and Computer Engineering, 10(4): 69-76. [15] Bailón1, W. P., Cardiel1, E. B., Campos, I. J. and Paz1, A. R. (2010). September 8-10. Mechanical energy optimization in trajectory planning for six dof robot manipulators based on eighth-degree polynomial functions and a genetic algorithm. 7th International Conference on Electrical Engineering, Computing Science and Automatic Control. México: 446 – 451. [16] Gong, D., Lu, L. and Li, M. (2009). May 18- 21. Robot path planning in uncertain environments based on particle swarm optimization. IEEE Congress on Evolutionary Computation. Trondheim. DOI:10.1109/CEC.2009.4983204: 2127- 2134. [17] Pedersen, M. E. H. and Chipperfield, A. J. (2010). Simplifying particle swarm optimization. Applied Soft Computing, 10(2): 618-628. [18] Rao, S. S. (2009). Engineering optimization theory and practice. New Jersey. John Wiley & Sons, Inc.: 4th Edition, pp. 708. [19] Chavan, S.D. and Adgokar, N.P. (2015). An overview on particle swarm optimization: basic concepts and modified variants. International Journal of Science and Research, 4(5): 255-260. [20] Alfi, A. (2012). Particle swarm optimization algorithm with dynamic inertia weight for on-line parameter identification applied to Lorenz chaotic system. International Journal of Innovative Computing, Information and Control, 8(2):1191-1203. [21] Djoewahir, A., Kanya, T. and Shenglin, M. (2012). A modified particle swarm optimization with nonlinear decreasing inertia weight based PID controller for ultrasonic motor. International Journal of Innovation and Technology, 3(3): 198-201. [22] Tian, D. (2013). A Review of convergence analysis of particle swarm optimization, International Journal of Grid and Distributed Computing, 6(6): 117-128. [23] Malwiya, R. and Rai, V. (2015). Optimal speed controlling of induction motor using new PSO. International Journal of Advanced Technology & Engineering Research, 5(2): 39-43. [24] Ibrahim, N.M.A., Atti, H.E.M., Talaat, H.E.A. and Alaboudy, A.H. K. (2015). Modified particle swarm optimization based proportional-derivative power system stabilizer. International Journal of Intelligent Systems and Applications. DOI: 10.5815 / ijisa. 2015. 03.08: 62-76. [25] Bansal, J.C., Singh, P. K., Saraswat, M., Verma, A., Jadon, S. S. and Abraham, A. (2011). October 19-21. Inertia weight strategies in particle swarm optimization. IEEE 3rd World Congress on Nature and Biologically Inspired Computing. Salamanca. DOI: 10.1109 / NaBIC. 2011. 6089659: 633- 640. [26] Yang, C. H., Tsai, S. W., Chuang, L. Y. and Yang, C. H. (2011). A modified particle swarm optimization for global optimization. International Journal of Advancements in Computing Technology, 3(7): 169-189. [27] Elsayed, S. M., Sarker, R. A. and Montes, E. M. (2013). June 20-23. Particle swarm optimizer for constrained optimization. IEEE Congress on Evolutionary Computation. Cancun-Mexico. DOI: 10.1109/CEC.2013.6557896: 2703-2711. [28] Ratanavilisagul, C. and Kruatrachue, B. (2014). A modified particle swarm optimization with mutation and reposition. International Journal of Innovative Computing, Information and Control, 10(6): 2127-2142. [29] Tian, D. (2015). Particle swarm optimization with chaotic maps and Gaussian mutation for function optimization. International Journal of Grid and Distributed Computing, 8(4): 123-134. [30] Jamous, R.A., Tharwat, A.A., EL-Seidy, E. and Bayoum, B.I. (2015). Modifications of particle swarm optimization techniques and its application on stock market: A survey. International Journal of Advanced Computer Science and Applications, 6(3): 99-108. [31] Li, J., Cheng, Y., and Chen, K. (2014). May 31-June 2. Chaotic Particle swarm optimization algorithm based on adaptive inertia weight. 26th Chinese Control and Decision Conference. Changsha. DOI: 10.1109 /CCDC. 2014. 6852369: 1310-1315. Saad Zaghlul Saeed Al-Khwarizmi Engineering Journal, Vol. 14, No. 1, P.P. 77- 89 (2018) 88 [32] Al-khayyt, S. Z. S., M. A. Abdilatef, Z. M. Yosif (2016). Visual tracking enhancement of object on circular path based on tuned kalman filter by particle swarm optimization. International Journal of Computer Applications. 146(4): 43-50. [33] Al-khayyt, S. Z. S. (2013). Tuning PID controller by neural network for robot manipulator trajectory tracking. Al- Khwarizmi Engineering Journal, 8(2): 19-28. )2018( -89 77، صفحة1د، العد14دزمي الهندسية المجلجلة الخوارم سعد زغلول سعيد 89 َخْلق نقاِط بينية في الدالة الخطيِة المندمجة مع مسار القطع المكافىِء بطريقِة تحقيِق األمثلية الخياط سعد زغلول سعيد جامعة الموصل / كلية الهندسة / قسم الميكاترونكس alkhyaat@yahoo.comالبريد األلكتروني: الخالصة كفاية. من مسار القطعة الخطية المندمجة مع مسار القطع المكافئ ينحرف عن المسار المخطط و هو مقيد بقيمة تعجيل يجب ان تكون كبيرة بما فيه الأن موجودة حاليا حول الموضوع غير قابل للتطبيق مباشرة على ناحية أخرى، التعامل مع مسار القطعة الخطية المندمجة مع مسار القطع المكافئ في المقاالت ال السرب لتوليد نقاط المسارات الحركية. في هذا العمل، اقترح تعديل على مسار القطعة الخطية المندمجة مع مسار القطع المكافئ و تم تعشيقه مع أمثلة جسيم لمتساوي لزمن مسار القطع المكافئ حول نقطة المسار، استبدلت بمعامالت مقترحة لحساب عبر المسار. أن الطرق السابقة التي تعتمد على فرضية التوزيع ا قطع المكافئ المطور الفترة الزمنية لمسار القطعة الخطية. هذه المعامالت هي دوال من السرع بين نقاط المسار. أن مسار القطعة الخطية المندمجة مع مسار ال لمسار التي تستحصل بطريقة امثلية جسيم السرب إلجبار مدبر الروبوت على المرور خالل نقاط المسار المحددة أخذا بنظر يستخدم السرع بين نقاط ا نتائج المحاكاة العددية السرعة و معادالت لحساب السرعة الفعلية. حكذلك تم اشتقاق عالقات لتصحياالعتبار تقيدي السرعة و التعجيل للروبوت المستعمل. المقترحة هذه الطريقة وان يعمل بشكل جيد في االختبارات. مع أمثلة جسيم الحشد المسار الخطي المندمج مع مسار القطع المكافئ المطور تعشيق ان أظهرت بسيطة جدا و يمكن ان تستعمل لتخطيط المسار مباشرة و غير ضروري فيها استخدام قيمة تعجيل كبيرة.