**6. Results and discussions**

*Uiter i*,*j* ¼

*Robotics Software Design and Engineering*

random number selected from set {1, 2, … , D}.

*Xiter*þ<sup>1</sup> *<sup>i</sup>* ¼

) in Eq. (14) and (*Xiter*

*DE=best=*1 : *Viter*

*<sup>i</sup>*,*<sup>j</sup>* <sup>¼</sup> *<sup>X</sup>iter*

**Pseudocode 1: Implement of proposed DE**

strategy through Eq. (23) to (24).

evaluating their fitness value.

Eq. (22).

**48**

X for the next generation as Eq. (22).

*5.1.3 Selection operation*

(*Xiter*

*<sup>r</sup>*1,*<sup>j</sup>* � *<sup>X</sup>iter r*2,*j*

Eq. (23) and (24).

*DE=best=*2 : *Viter*

*Viter*

8 < :

*Xiter*

respectively. *CR* is a crossover parameter within the interval (0,1). *j*

*Uiter*

8 < :

**5.2 Self-adaptive differential evolution with gauss distribution**

*Xiter*

*<sup>r</sup>*3,*<sup>j</sup>* � *<sup>X</sup>iter r*4,*j*

*best*,*<sup>j</sup>* <sup>þ</sup> *<sup>N</sup>* 0, *<sup>σ</sup>*<sup>2</sup> � � <sup>∗</sup> *<sup>F</sup>* <sup>∗</sup> *<sup>X</sup>iter*

Pseudocode 1 and The optimization process is described in Pseudocode 2.

1.**Initialization**: Generating randomly NP initial populations inside the bounds.

3.**Adaptive scaling factor**: Computing scale factors F by Eqs. (17) to (20).

5.**Crossover operation**: Calculating trial vector U using Eq. (21).

7. Steps 2 to 6 is repeated while termination condition is checked

6.**Selection Operation**: Comparing trial vector *Uiter*

Where N(0,*σ*2) is a Gauss random variable with mean *zero* and standard deviation *σ*. Recommended value for *σ* is 0.1. The new proposed DE is implemented as in

2.**Evaluation and ranking population**: Evaluating and ordering all individuals based on their fitness value. Next, the first best NP individuals are selected to survive and kept for the next generation.

*<sup>i</sup>* to target vector *Xiter*

4.**Mutation operation**: Mutation vectors V are created by applying adaptive selection learning

The better candidate will be chosen for propagating new offspring in the next generation by

*<sup>i</sup>*,*<sup>j</sup>* <sup>¼</sup> *<sup>X</sup>iter*

*<sup>i</sup>*,*<sup>j</sup>* otherwise*:*

Where *U*,*V*, and *X* are a trial vector, mutation vector, and current vector,

This stage will choose the better fitness between trial vector U and target vector

*<sup>i</sup>* if *f Uiter*

*<sup>i</sup>* otherwise*:*

Gauss distributions play an important role in statistics and are often used to generate real-valued random variables. Gaussian distribution gives a fantastic possibility to control the exploiting zone in optimization based on complexity of each considered problem. Our proposed strategy generates a new trial vectors in mutation operation by multiply Gauss random variable to a vector difference

The formula of schemes in mutation operation is modified as the following

*i* � �≤*f Xiter*

) in Eq. (15).

*best*,*<sup>j</sup>* <sup>þ</sup> *<sup>N</sup>* 0, *<sup>σ</sup>*<sup>2</sup> � � <sup>∗</sup> *<sup>F</sup>* <sup>∗</sup> *<sup>X</sup>iter*

*<sup>r</sup>*1,*<sup>j</sup>* � *<sup>X</sup>iter r*2,*j*

� �

*<sup>r</sup>*1,*<sup>j</sup>* � *<sup>X</sup>iter r*2,*j*

<sup>þ</sup> *<sup>F</sup>* <sup>∗</sup> *<sup>X</sup>iter*

*<sup>i</sup>* is implemented based on

� �

h i � �

*i* � �

*<sup>i</sup>*,*<sup>j</sup>* if *rand*½ � 0, 1 ≤*CR or j* ¼ *j*

*rand*

(21)

(22)

(23)

(24)

*<sup>r</sup>*3,*<sup>j</sup>* � *<sup>X</sup>iter r*4,*j*

*rand* is an integer

Surfaces shown in **Figure 5** is employed to present the walking process of biped robot. This is a absolutely flat terrain.

To observe the effect of arm swing mechanism on walking behavior, we build the 3D robot model in dynamic simulated environment of Adams software. Two configurations of the robot with different arm mechanism are considered as the following: firstly, we lock shoulder joint of the arm or in other respects the upper body is a static block with no movement. Second configuration is designed with a 1-32DoF shoulder joint which is set in sagittal plane. The biped motion is studied and evaluated on an above-mentioned environment. After applying G-SADE algorithm to solve optimization problem, we gain the optimal design variable is presented in **Table 2**. By replacing the term coefficients of *i*, *ai*, *bi*,*ci*, *di* in Eq. (1) with these optimal value, we will define four gait functions for all joints of the legs and trajectory is ruled by the principle shown by Eqs. (2)–(8). To be clear, we can see these gait patterns in **Figure 6**. After all, results of simulation are presented in **Figure 7**.

**Figure 5.** *Considered surface for simulation.*


**Table 2.** *Design variable value.*

constant which expresses the success of the simulation and the robot stands steadily on the ground. Totally, above discussions address that the model with 1-DoF shoul-

*Applying Improve Differential Evolution Algorithm for Solving Gait Generation Problem…*

Next discussion is to compare 3D gait on flat ground of both configurations with the humans in a cycle. The walking behavior is shown in **Figure 8**. As can be seen that posture of the simulation model at 1*:*2*s*, 1*:*5*s*, 1*:*8*s*, 2*:*1*s* is comparable to the human walking behavior in }*initial* � *contact*}, }*mid* � *stance*}, }*terminalstance*}, and }*toe* � *off* } periods. Highlight points on the robot posture are }*toe* � *off* } periods at 1*:*5*s* and 2*:*1*s*. This behavior is very clear and has pros on the contact between foot

der joint performs a better exhibition and should be applied in real robot.

and ground in phase transferring stage.

*DOI: http://dx.doi.org/10.5772/intechopen.98085*

**Figure 8.** *3D gait in a cycle.*

**51**

**Figure 6.**

*Gait pattern: (a) hip joint angle in frontal plane; (b) hip joint angle in sagittal plane; (c) knee joint angle; (d) ankle joint angle.*

**Figure 7.**

*Simulation result: (a) CoM trajectory in horizontal plane; (b) rotation angle of robot.*

After implementing the simulation with achieved control data, we attain the final position of the robot as the following: For configuration 1 with no shoulder joint, lateral distance of *X <sup>f</sup>* , walking distance of *Z <sup>f</sup>* and rotation angle of *Rf* are 6.17ð Þ *mm* , 172.11ð Þ *mm* , and 9.19*<sup>o</sup>* , respectively; meanwhile these value are 9.21ð Þ *mm* , 184.66ð Þ *mm* , and 3.98*<sup>o</sup>* , respectively for configuration 2 with 1-DoF shoulder joint.

To be particular, **Figure 7a** depicts the CoM trajectory of the robot, which has a approximately periodic waveform. Comparing to the humans described in [29], this performance is similar. Moreover, model with arm swing mechanism witnesses an improvement of about 9% in walking distance from 172.11ð Þ *mm* to 184.66ð Þ *mm* .

**Figure 7b** presents the rotation angle of the robot depending on time axis of the motion process. As can be seen that this line chart undergoes a fluctuation about from �25*<sup>o</sup>* to 25*<sup>o</sup>* around center line. It means that the robot's feet rotate significantly in the locomotion. This phenomenon is due to an impact of friction force between foot and ground. Furthermore, the angle rotation of configuration 2 fluctuates with smaller amplitude of 5%, at the final position, this angle decreases by about 55%. (3.0*s* - 3.3*s*) period is prepared for landing and checking stability then, the rotation angle of the robot rapidly declines. In (3.3*s* - 4.8*s*) period, this angle is

*Applying Improve Differential Evolution Algorithm for Solving Gait Generation Problem… DOI: http://dx.doi.org/10.5772/intechopen.98085*

constant which expresses the success of the simulation and the robot stands steadily on the ground. Totally, above discussions address that the model with 1-DoF shoulder joint performs a better exhibition and should be applied in real robot.

Next discussion is to compare 3D gait on flat ground of both configurations with the humans in a cycle. The walking behavior is shown in **Figure 8**. As can be seen that posture of the simulation model at 1*:*2*s*, 1*:*5*s*, 1*:*8*s*, 2*:*1*s* is comparable to the human walking behavior in }*initial* � *contact*}, }*mid* � *stance*}, }*terminalstance*}, and }*toe* � *off* } periods. Highlight points on the robot posture are }*toe* � *off* } periods at 1*:*5*s* and 2*:*1*s*. This behavior is very clear and has pros on the contact between foot and ground in phase transferring stage.

**Figure 8.** *3D gait in a cycle.*

After implementing the simulation with achieved control data, we attain the final position of the robot as the following: For configuration 1 with no shoulder joint, lateral distance of *X <sup>f</sup>* , walking distance of *Z <sup>f</sup>* and rotation angle of *Rf* are 6.17ð Þ *mm* ,

*Simulation result: (a) CoM trajectory in horizontal plane; (b) rotation angle of robot.*

*Gait pattern: (a) hip joint angle in frontal plane; (b) hip joint angle in sagittal plane; (c) knee joint angle; (d)*

To be particular, **Figure 7a** depicts the CoM trajectory of the robot, which has a approximately periodic waveform. Comparing to the humans described in [29], this performance is similar. Moreover, model with arm swing mechanism witnesses an improvement of about 9% in walking distance from 172.11ð Þ *mm* to 184.66ð Þ *mm* . **Figure 7b** presents the rotation angle of the robot depending on time axis of the motion process. As can be seen that this line chart undergoes a fluctuation about from �25*<sup>o</sup>* to 25*<sup>o</sup>* around center line. It means that the robot's feet rotate significantly in the locomotion. This phenomenon is due to an impact of friction force between foot and ground. Furthermore, the angle rotation of configuration 2 fluctuates with smaller amplitude of 5%, at the final position, this angle decreases by about 55%. (3.0*s* - 3.3*s*) period is prepared for landing and checking stability then, the rotation angle of the robot rapidly declines. In (3.3*s* - 4.8*s*) period, this angle is

, respectively; meanwhile these value are 9.21ð Þ *mm* ,

, respectively for configuration 2 with 1-DoF shoulder joint.

172.11ð Þ *mm* , and 9.19*<sup>o</sup>*

**Figure 6.**

**Figure 7.**

**50**

*ankle joint angle.*

*Robotics Software Design and Engineering*

184.66ð Þ *mm* , and 3.98*<sup>o</sup>*
