**3.1 Trajectory generation remarks**

A reference trajectory is created by using the developed Optimal Trajectory Generation [21] manipulators. The path constraint motion of the industrial robots plays a vital role in welding, cutting, surgery and machining applications. A sample reference trajectory with 15 segments is shown below in **Figure 2**.

**Figure 1.** *The schematic diagram of OTGA.*

*3.2.1 Objective function*

Such as, *Jv* <sup>¼</sup> *<sup>d</sup><sup>θ</sup>*

*3.3.1 Fitness evaluation*

be framed as,

For selecting and tracking of a continuous path with minimal tracking error is the prime function of the developed OTG method. This tracking error function can

Where, *pd*ð Þ*<sup>i</sup>* denotes the desired trajectory for ð Þ*<sup>i</sup> th* robotic arm; *pa*ð Þ*<sup>i</sup>* defines the

current trajectory for ð Þ*<sup>i</sup> th* robotic arm. Also, the following conditions must be

min *Jv*, *Ja*, *J <sup>j</sup>*

On Basis of minimum tracking error, during each recurrence, joint velocity (jv), joint acceleration (Ja) and joint jerk (Jj) obtained for each set of manipulator joint.

The Gray Wolf Optimization (GWO) is an effective optimization method which emulates the leadership grading, trapping protocol and hunting mechanism of gray wolves in nature. In GWO, the process of optimal trajectory tracking is performed by four gray wolves namely; alpha, beta, delta and omega wolves. Decisions about hunting, time and place are being made by the alpha, The beta and gamma wolves is basically considered as subordinate wolves that help the alpha in decision making, the timid part of the gray wolves hierarchy is being represented by omega only.

Following steps are there to evaluate the fitness function as written below.

In GWO, the *α*, *β* and *δ* wolves guide each other and encircles the prey. It is pretended that *α*, *β* and *δ* gives an appropriate knowledge regarding the exact location of the prey from overall solution. Due to which, the primary best solutions are achieved and now it is considered to generate newer solutions, which can be

!

*<sup>r</sup>*ðÞ�*t M* ! � *Q* !

*<sup>r</sup>*ð Þ�*t W* ! ð Þ*t*

� �

!

represents the coefficient vectors respectively and '*t*' denotes the no.

� � <sup>¼</sup> min <sup>ð</sup>*Tracking Error*Þ þ min *Jv*, *Ja*, *<sup>J</sup> <sup>j</sup>*

satisfied in order to get a smooth continuous path motion.

*dt* ; *<sup>J</sup> <sup>j</sup>* <sup>¼</sup> *dJa dt* .

*dt*; *Ja* <sup>¼</sup> *dJv*

*Optimal Trajectory Generation of Parallel Manipulator DOI: http://dx.doi.org/10.5772/intechopen.96462*

**3.3 The Gray Wolf Optimization (GWO)**

*Fitness At*

systematically established as beneath:

In the above Eq. (4), *Q*

*W* !

**63**

location, *M* ! *and S*! *n*

Mathematical approach for search operation:

*W* !

> *Q* ! ¼ *S* ! � *W* !

is represented as the gray wolf actual location, *W*

!

ð Þ¼ *t* þ 1 *W*

can be given as,

� � �

*Tracking Error* <sup>¼</sup> min *pd*ðÞ�*<sup>i</sup> pa*ð Þ*<sup>i</sup>* � � (1)

n o (2)

n o (3)

� (5)

*<sup>r</sup>* represents prey desired

(4)

#### **Figure 3.** *GWO flow chart.*

Based on the reference trajectory, the design of 6 DOF robotic manipulator is analyzed. For analysis, primary trajectory is approximately created and then optimized using Gray Wolf optimization algorithm. The primary trajectory is calculated for each segment starting from the 'Start'segment to the 'End'segment on the reference trajectory.

#### **3.2 GWO for the optimal trajectory generation**

In this section, the Gray Wolf Optimization (GWO) algorithm is employed for the optimal trajectory generation [21–26]. Here, initially the joint coordinates of the parallel robotic arms are obtained using opposite kinematic approach. Then this sets of joint coordinates, they are optimally fixed by minimizing the path tracing error. After this, the manipulator joint coordinates like speed, acceleration and jerk are calculated by utilizing the finest set if joint angles. The flowchart for the GWO methodology is described below in **Figure 3**.

#### *3.2.1 Objective function*

For selecting and tracking of a continuous path with minimal tracking error is the prime function of the developed OTG method. This tracking error function can be framed as,

$$\text{Traching Error} = \min\left(p\_d(i) - p\_a(i)\right) \tag{1}$$

Where, *pd*ð Þ*<sup>i</sup>* denotes the desired trajectory for ð Þ*<sup>i</sup> th* robotic arm; *pa*ð Þ*<sup>i</sup>* defines the current trajectory for ð Þ*<sup>i</sup> th* robotic arm. Also, the following conditions must be satisfied in order to get a smooth continuous path motion.

$$\min \left\{ J\_{\nu}, J\_{a}, J\_{j} \right\} \tag{2}$$

Such as, *Jv* <sup>¼</sup> *<sup>d</sup><sup>θ</sup> dt*; *Ja* <sup>¼</sup> *dJv dt* ; *<sup>J</sup> <sup>j</sup>* <sup>¼</sup> *dJa dt* .

On Basis of minimum tracking error, during each recurrence, joint velocity (jv), joint acceleration (Ja) and joint jerk (Jj) obtained for each set of manipulator joint.

#### **3.3 The Gray Wolf Optimization (GWO)**

The Gray Wolf Optimization (GWO) is an effective optimization method which emulates the leadership grading, trapping protocol and hunting mechanism of gray wolves in nature. In GWO, the process of optimal trajectory tracking is performed by four gray wolves namely; alpha, beta, delta and omega wolves. Decisions about hunting, time and place are being made by the alpha, The beta and gamma wolves is basically considered as subordinate wolves that help the alpha in decision making, the timid part of the gray wolves hierarchy is being represented by omega only.

#### *3.3.1 Fitness evaluation*

Following steps are there to evaluate the fitness function as written below.

$$Fitness \left( A\_n^t \right) = \min \left( Tracking \ Error \right) + \min \left\{ I\_v, I\_a, I\_j \right\} \tag{3}$$

Mathematical approach for search operation:

In GWO, the *α*, *β* and *δ* wolves guide each other and encircles the prey. It is pretended that *α*, *β* and *δ* gives an appropriate knowledge regarding the exact location of the prey from overall solution. Due to which, the primary best solutions are achieved and now it is considered to generate newer solutions, which can be systematically established as beneath:

$$
\overrightarrow{\dot{W}}(t+1) = \overrightarrow{\dot{W}}\_r(t) - \overrightarrow{\dot{M}} \cdot \overrightarrow{Q} \tag{4}
$$

In the above Eq. (4), *Q* ! can be given as,

$$\overrightarrow{Q} = \left| \overrightarrow{\mathbf{S}} \cdot \overrightarrow{\mathbf{W}}\_r(t) - \overrightarrow{\mathbf{W}}(t) \right| \tag{5}$$

*W* ! is represented as the gray wolf actual location, *W* ! *<sup>r</sup>* represents prey desired location, *M* ! *and S*! represents the coefficient vectors respectively and '*t*' denotes the no.

Based on the reference trajectory, the design of 6 DOF robotic manipulator is analyzed. For analysis, primary trajectory is approximately created and then optimized using Gray Wolf optimization algorithm. The primary trajectory is calculated for each segment starting from the 'Start'segment to the 'End'segment on the

In this section, the Gray Wolf Optimization (GWO) algorithm is employed for the optimal trajectory generation [21–26]. Here, initially the joint coordinates of the parallel robotic arms are obtained using opposite kinematic approach. Then this sets of joint coordinates, they are optimally fixed by minimizing the path tracing error. After this, the manipulator joint coordinates like speed, acceleration and jerk are calculated by utilizing the finest set if joint angles. The flowchart for the GWO

reference trajectory.

**Figure 3.** *GWO flow chart.*

**62**

**Figure 2.** *Reference trajectory.*

*Collaborative and Humanoid Robots*

**3.2 GWO for the optimal trajectory generation**

methodology is described below in **Figure 3**.

of operations. We can obtain the coefficient vectors *M* ! *and S*! by the equations given below:

$$
\overrightarrow{M} = 2\overrightarrow{m} \cdot \overrightarrow{\varkappa}\_1 - \overrightarrow{m} \tag{6}
$$

$$
\overrightarrow{\mathbf{S}} = \mathbf{2} \cdot \overrightarrow{\mathbf{x}}\_2 \tag{7}
$$

Here '*m* !' denotes the constant value that decreases from 2 to 0 and *x* ! <sup>1</sup> and *x* ! 2 denotes any random values between [0, 1]. *m* ! is selected within the range between 2 to 0 in every operations as per the below equation,

$$
\overrightarrow{m} = 2 - t \left(\frac{2}{t\_{\text{max}}}\right) \tag{8}
$$

steps [27]. The chromosome shaped by six factors of lattice *θ*ð Þ *jo*int*angle* [28, 29] to accomplish ideal worth. Variation boundaries of GA are appeared in the beneath

**Algorithm Parameters Outcome** Variables counts 6 [*θ*1**,** *θ*2**,** *θ*3**,** *θ*4**,** *θ*5**,** *θ*6]

Maximum Generation 250 Population Size 60 Encoding Binary Selection Uniform Crossover 0.7 Mutation 0.3 Total number of counts 258

In this section, the analysis for the developed GWO based OTG method and GA for optimal planning of the trajectory for designing the 6 DOF Robotic manipulator.

A 3-degree-of-freedom (3-DOF) planar parallel manipulator performing highspeed, high-acceleration, and high-accuracy trajectory tracking as similar to the novel experimental pick-and-place manipulator is designed and constructed. At the time of trajectory tracking, multiple closed-loop performance specifications like tracking accuracy, settling time, control effort, and robustness to parameter uncertainty must be satisfied simultaneously. Commonly, closed loop requirement is clashing, i.e., when one requirement is improved, others may break down.

An Optimal Trajectory Generation Algorithm (OTGA) is created for producing least time smooth movement directions for 6 DOF equal controllers. The proposed OTGA utilizes the Gray Wolf enhancement procedure for the ideal direction age utilizing numerous goal capacities. Alongside this, to follow the smooth movement of mechanical controllers, the joint speed, joint increasing speed and joint jerks requires optimal value. At each cycle, the proposed Gray Wolf improvement

The below graph 1 to 6 in **Figure 4** shows, the comparison of joint velocity for all

The below graph 1 to 6 in **Figure 5** shows, the comparison of joint acceleration for all active joints angles *θ*1, *θ*2, … , *θ*<sup>6</sup> of the manipulator between the proposed and existing methods. The below simulated results shows smooth motion with optimal

The below graph 1 to 6 in **Figure 6** shows, the comparison of joint jerks for all active joints angles *θ*1, *θ*2, … , *θ*<sup>6</sup> of the manipulator between the proposed and existing methods. The below simulated results shows smooth motion with

The above figures show that the comparison between projected GWO technique, existing GA and default methods for trajectory generation. We have taken

active joints angles *θ*1, *θ*2, … , *θ*<sup>6</sup> of the manipulator between the proposed and existing methods. The below simulated results shows smooth motion with optimal

method chooses the ideal directions utilizing the goal limitations.

velocity at each joints of the robotic arm (manipulator).

acceleration at each joints of the robotic arm (manipulator).

minimum jerks at each joints of the robotic arm (manipulator).

The applied methods are implemented by MATLAB.

**Table 1**.

**65**

**Table 1.**

**4. Result analysis**

*Transformative algorithm parameters of GA.*

*Optimal Trajectory Generation of Parallel Manipulator DOI: http://dx.doi.org/10.5772/intechopen.96462*

Where, '*t*max' represents the maximum allowed iterations. Assuming that, the information about the position of prey is possibly confirmed by the Alpha, Beta and Delta solutions; whereas the updates in position of Omegas is govern by previous solutions. The position updating of wolves is depended on all three best solutions as shown below:

$$
\vec{W}\_1 = \left| \vec{W}\_a(t) - \vec{M}\_1 \cdot \vec{Q}\_a \right| \tag{9}
$$

$$\vec{\dot{W}}\_2 = \left| \vec{\dot{W}}\_\beta(t) - \vec{\dot{M}}\_2 \cdot \vec{\dot{Q}}\_\beta \right| \tag{10}$$

$$
\overrightarrow{\dot{W}}\_3 = \left| \overrightarrow{\dot{W}}\_\delta(t) - \overrightarrow{\dot{M}}\_3 \cdot \overrightarrow{\dot{Q}}\_\delta \right| \tag{11}
$$

Where, *Q* ! *<sup>α</sup>*, *Q* ! *<sup>β</sup>*, *Q* ! *<sup>δ</sup>* are calculated as:

$$
\overrightarrow{Q}\_a = \left| \overrightarrow{\mathbf{S}}\_1 \cdot \overrightarrow{\mathbf{W}}\_a - \overrightarrow{\mathbf{W}} \right| \tag{12}
$$

$$
\overrightarrow{Q}\_{\beta} = \left| \overrightarrow{S}\_2 \cdot \overrightarrow{W}\_{\beta} - \overrightarrow{W} \right| \tag{13}
$$

$$\overrightarrow{Q}\_{\delta} = \left| \overrightarrow{S}\_3 \cdot \overrightarrow{W}\_{\delta} - \overrightarrow{W} \right| \tag{14}$$

Based on the above Eqs. (10)-(12), the solution for next iteration will be obtained as follows:

$$
\overrightarrow{\dot{W}}(t+1) = \frac{\left(\overrightarrow{\dot{W}}\_1 + \overrightarrow{\dot{W}}\_2 + \overrightarrow{\dot{W}}\_3\right)}{3} \tag{15}
$$

The process of updating of wolf current positions takes place continuously until the maximum iteration is reached. If the overall optimum solution is does not reached to its maximum, or likewise the new solution will be updated for which the best feasible solution take place and hence based on the best suitable solution the next updates will be executed continuously. Due to this, the optimal continuous path is selected with error-free tracking path.

#### **3.4 The Genetic Algorithm (GA)**

Genetic Algorithm (GA) is ordered among three distinct parts for example multiplication, hybrid and change and it is expounded momentarily in couple of


#### **Table 1.**

of operations. We can obtain the coefficient vectors *M*

*Collaborative and Humanoid Robots*

denotes any random values between [0, 1]. *m*

to 0 in every operations as per the below equation,

*M* !

*m* ! <sup>¼</sup> <sup>2</sup> � *<sup>t</sup>*

*W* !

*W* !

*W* !

*<sup>δ</sup>* are calculated as:

*Q* ! *<sup>α</sup>* ¼ *S* ! <sup>1</sup> � *W* ! *<sup>α</sup>* � *W* !

*Q* ! *<sup>β</sup>* ¼ *S* ! <sup>2</sup> � *W* ! *<sup>β</sup>* � *W* !

*Q* ! *<sup>δ</sup>* ¼ *S* ! <sup>3</sup> � *W* ! *<sup>δ</sup>* � *W* !

ð Þ¼ *t* þ 1

*W* !

path is selected with error-free tracking path.

**3.4 The Genetic Algorithm (GA)**

<sup>1</sup> ¼ *W* !

<sup>2</sup> ¼ *W* !

<sup>3</sup> ¼ *W* !

 

> 

 

 

Based on the above Eqs. (10)-(12), the solution for next iteration will be

*W* ! <sup>1</sup> þ *W* ! <sup>2</sup> þ *W* ! 3

the maximum iteration is reached. If the overall optimum solution is does not reached to its maximum, or likewise the new solution will be updated for which the best feasible solution take place and hence based on the best suitable solution the next updates will be executed continuously. Due to this, the optimal continuous

Genetic Algorithm (GA) is ordered among three distinct parts for example multiplication, hybrid and change and it is expounded momentarily in couple of

The process of updating of wolf current positions takes place continuously until

 

 

¼ 2*m* ! � *x* ! <sup>1</sup> � *m*

> ¼ 2 � *x* !

> > 2 *t*max

!' denotes the constant value that decreases from 2 to 0 and *x*

Where, '*t*max' represents the maximum allowed iterations. Assuming that, the information about the position of prey is possibly confirmed by the Alpha, Beta and Delta solutions; whereas the updates in position of Omegas is govern by previous solutions. The position updating of wolves is depended on all three best solutions as

> *<sup>α</sup>*ðÞ�*t M* ! <sup>1</sup> � *Q* ! *α*

> *<sup>β</sup>*ðÞ�*t M* ! <sup>2</sup> � *Q* ! *β*

> *<sup>δ</sup>*ðÞ�*t M* ! <sup>3</sup> � *Q* ! *δ*

 

 

 

 

 

 

*S* !

below:

Here '*m*

shown below:

Where, *Q* ! *<sup>α</sup>*, *Q* ! *<sup>β</sup>*, *Q* !

obtained as follows:

**64**

! *and S*!

by the equations given

! <sup>1</sup> and *x* ! 2

(8)

! (6)

<sup>2</sup> (7)

! is selected within the range between 2

(9)

(10)

(11)

(12)

(13)

(14)

<sup>3</sup> (15)

*Transformative algorithm parameters of GA.*

steps [27]. The chromosome shaped by six factors of lattice *θ*ð Þ *jo*int*angle* [28, 29] to accomplish ideal worth. Variation boundaries of GA are appeared in the beneath **Table 1**.
