17 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) ISSN (Print) 2313-4410, ISSN (Online) 2313-4402 Β© Global Society of Scientific Research and Researchers http://asrjetsjournal.org/ Comparative Study between Classical and Optimized Stability Margins of Quadruped Robot Creeping Gait Firas A. Raheema*, Murtadha Khudhair Flayyihb a,bUniversity of Technology, Control and Systems Engineering Department aEmail: 60124@uotechnology.edu.iq bEmail: cse.60354@uotechnology.edu.iq Abstract The ability of the quadruped (four-legged) robot locomotion was used in a lot of different applications like walking over soft and rough terrains. These applications needed to guarantee the flexibility and mobility. Generally, quadruped robots have three basic periodic gaits: creeping gait, running gait and galloping gait. The stability criteria are the main issue of the quadruped robot throughout walking with the slow motion gait like creeping gait. The gait of static stability is completely bases on the stability margins in the walking that was calculated in this paper. The quadruped robot legs walking sequence and creeping gait within the leg fixing and swinging phases carried out. The kinematics model of quadruped robot of the forward and inverse kinematics for each leg 3-DOF was calculated that lead to discover the minimum stability margins with walking on the vertical projection of the robot geometrical body. These stability margins needed to be optimized in order to obtain the best stability margin throughout this robot walking. In this paper we use the PSO optimization algorithm to get the best stability margins value. Simulation and results are verified the range of the stability margin values and the optimized results. Keywords: Quadruped Robot Simulation; Stability Margins; Quadruped Robot Gait PSO Optimization. 1. Introduction In recent years, utilization of the leg-based walking systems has been transformed into a very familiar field in robotics. These systems adapted their ability in order to deal with irregular territories especially when compared with wheel systems [1]. ------------------------------------------------------------------------ * Corresponding author. http://asrjetsjournal.org/ American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 18 This legged systems ability for transact with uneven territories also avoiding the obstacles that with the quadruped robots in the planning of standard walking gaits [2, 3]. The quadruped robots distinguish among the other legged robots by have the less complex structure, this structure give it to accomplish the requirements of the static stability gait throughout walking. The quadruped robots locomotion frequently utilized in many research that talked about the quadruped robot, its similarity in the investigation of insects and biological animals walking gaits. These studies have led to improve both dynamic running gaits and statically stable walking gait for legged robots [4]. The objective of this paper is to design and implement with robustness quadruped robot that has the static stable ability during its walking. These walking gaits are repeated to obtain the main sequence step which needed to make the quadruped robot stable on irregular places [5]. The quadruped robots also has the ability of arranging the step sequences and verification criteria of stability on incline surfaces that needed for verifying the Omni-directional statically stable throughout this walking [6]. The criteria of stability depended on some elements such as Center of Gravity (COG), Stability margin (Sm) and the support polygon which framed by the legs tip of the quadruped robot. These elements are very important particularly when the quadruped robot walking utilizing creeping gaits for walking [7, 8]. Generate of the leg sequence of placing and lifting throughout the quadruped robot walking is called gait [9]. Generally, the quadruped robot gaits are dividing in two types, the first type is the static stability gait, and the second type is dynamic stability gait [10]. During the movement of the walking the body of quadruped robot should be remain stable and has the ability to travel from one place to another. The static stability gait is the easier gait which used by the quadruped robot when it needs a slow motion movement to walk. But when the quadruped robot walking at fast speed like trotting gait, the one must be used is the dynamic gait, which aims to reality of that the vertical projection of COG is derivative of the supporting polygon and not inside it. For this case the quadruped robot will be unstable and it is imminence to drop down. thus at the quadruped robot running gaits, its need to be content with the conditions of dynamic stability instead of the requirements of static stability [11]. Generally, the quadruped robot is attempt to be statically stable with its three legs fixed on the ground while the fourth leg is swing. In this paper, the PSO optimization algorithm utilized to obtain the best stability margins throughout the robot walking gait. The creeping gait matches the nature of the biological stable gait of animals and insects. In this case the statically stable gait is necessary in order to guarantee a stable walking. Also during the quadruped walking in the creeping gait, its stability will be achieved if and only if the COG vertical projection inside the supporting polygon which is framed by the legs tips. The basic problem is how to achieve and control of the legs sequences of lifting and putting all legs within the period of time when the quadruped robot walking. 2. Description of Quadruped Robot There are a different models of the quadruped robot, these models is based on some attributes and guide lines to design the robot structure and the gait movement. The main criteria to achieve these attributes are [13]: 1. The standard walking of quadruped robot is repeated periodically during the planning path with a constant speed, steady state movement of the legs over even territories. 2. The standard design of the quadruped robot must be symmetrical in both longitudinal body direction and American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 19 lateral body direction. This point is also applied to the legs structure leads to a less mechanical complexity. 3. When the quadruped robot has a regular shape and symmetric, the vertical projection of COG of the robot body is located at the center of the supporting polygon that is resulted from the legs tips on the ground. The quadruped robot is design in Fig.(1), based on the above three criteria. In this research the walking direction assumed that the quadruped robot is walking foreword along the X-axis only. This means that there is no motion in the Y-axis stride .So the stride of every leg is a line. These stride lines are situated in the longitudinal body direction to meet the condition of forward walking. Figure 1: Quadruped robot (top view) illustrate the length (2b) and the width (2c) and the COG point As seen in Fig.(1), (2a) is the distance between the minimum point limit of the front leg stride line to the maximum point limit of the back leg. (2b) is the distance between the maximum point limit of the front leg stride line to the maximum point limit of the back leg. (2c) is the distance from front/back left leg stride line to the right leg stride line. So the definition of the leg stride line is [13]: Stride line = b – a (1) Along these considerations, the largest stride of the reachable area for a quadruped robot can be calculated from Equ. 1. Most of quadruped robots have the value of length equals to 2b and the value of width equals to 2c. Henceforth, the ratio between the length and width is equal to c/b. In this paper, the simulation design the quadruped robot leg shown that it has three joints named as the biological of the nature insects as (Coxa joint, Femur joint, Tibia joint) this make each leg has three DOF (degree of freedom). For all legs, hence, the total numbers DOFs equal to 12. The quadruped robot structure is showing in Fig.(2). In Fig.(2-a) shows the quadruped robot main parts that is mimic the natural anatomy of insects and labeling of each leg. In Fig.(2-b) shows the leg joints and the link name of each joint in the quadruped leg. Leg1 is the right front (RF) side and leg3 is the right rear (RR) side and leg2 is the left front (LF) American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 20 side and Leg4 is the left rear (LR) side. And as mentioned before, the forward direction of motion of the quadruped robot, in case of the forward direction of motion is set to be with the X-axis direction and the lateral motion of the quadruped robot will be in Y-axis. The quadruped body has a symmetrical dimension in X and Y axes. Which giving the robot better stability during the walking and making it statically stable. (a) (b) Figure 2: Quadruped Robot Simulation Using Matlab (a) quadruped robot with four legs labeling (b) showing the three joints (Coxa, Femur, and Tibia) in each legs. The main point to ensure the stable walking in the statically stable gait, the quadruped legs positions are playing an important role during the walking of the stability calculations. The legs tips positions should be found by driving the forward kinematics and inverse kinematics for the quadruped robot. 3. Creeping Gait Analysis and Sequence Description The quadruped robots have three main gaits. This gaits are classified according to its duty factor (𝛽𝛽𝑖𝑖) of each leg, where i=1,,,4. These gaits are named from the biological natural gaits of animals such as crawl gait, running gait, and the galloping gait. The quadruped robot locomotion has any type from these gaits according to its duty factor (𝛽𝛽𝑖𝑖) which is defined as the ratio of the time periods between the leg period of swinging to the period that the same leg is contact with the ground. When the quadruped robot walks using creeping gait, the value of the duty factor will equals to 0.75. When the quadruped robot is running, it will have duty factor ranged between 0.5-0.75. Finally when the quadruped robot is galloping, it will have duty factor less than 0.5. These main gaits in the robotics field have also been given a name, these names are called: creeping gait, trotting gait and the bounding gait [15]. Hence, these gaits have been used by mammals. For example, cats are using the creeping gait for a very slow walking. Creeping gait has some advantages, this gait is ensure the statically stable movement which is used with the range of low-speed walking. The sequence condition of the creeping gait is need a three legs at least are contact with the ground when the fourth leg are swing to translate to new position. This sequence condition is needed to ensure the statically stable gait. The quadruped robot creeping gait sequence has six types of legs arrangement. In this paper, quadruped robot leg sequence is (RR, RF, LR, and LF) where (R: right, L: left, R: rear, F: front). From the labeling Fig.(2)-a, it can be seen that RR is leg4, RF is leg2, LR is leg3, and LF is leg1. The advantage of choosing this leg sequence arrangement to have a safety walking which is ensure that the robot is body moving forward at the instance time[12]. There are two Cartesian American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 21 reference frames coordinate when talking about the quadruped structure, the first coordinate frame is located at the coxa joint and the second coordinate frame is located on the ground. In this Cartesian coordinate the X-axis is referred to the front side direction of the quadruped body, and Y-axis is referred to the left side of the quadruped body. So, these coordinates are very important in the analyzing and ensuring that vertical projection of COG have been located inside the supporting polygon [13]. 4. Kinematics Model of a Quadruped Robot 4.1 Forward Kinematics The quadruped robot is depending on the configuration of each leg, because its represent as the physical constraints of the robot walking. In this paper, the robot leg has three-revolute joints which are labeled in the kinematical chain as ( πœƒπœƒ1,πœƒπœƒ2 and πœƒπœƒ3). Every leg has a mechanism that is choosing according to these revolute joints. Modeling of the leg structure is to mimic the biological structures for animals and insects. To drive the geometrical model to each leg which is related to the robot center body, thus forward kinematics must be applied to find the position and orientation for each leg tip which is here named as (xi, yi, zi), i=1,2,3,and 4. In the Fig.(3) the kinematical chains for any leg is showing. Figure 3: Coordinate frames for one leg of Quadruped Robot Forward kinematics is depending on the D-H (Denavit-Hartenberg) parameters of the leg structure design; these parameters are showing in Table 1. Table 1: The Denavit-Hartenberg parameters table for one leg in our quadruped robot Link No. Link name πœΆπœΆπ’Šπ’Š (deg) π’‚π’‚π’Šπ’Š (cm) π’…π’…π’Šπ’Š (cm) πœ½πœ½π’Šπ’Š (deg) 1 Coxa 90 π‘Žπ‘Ž1 0 πœƒπœƒ1 2 Femur 0 π‘Žπ‘Ž2 0 πœƒπœƒ2 3 Tibia 0 π‘Žπ‘Ž3 0 πœƒπœƒ3 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 22 Where the links parameter:π‘Žπ‘Ž1=2.5 cm π‘Žπ‘Ž2= 5 cm, and π‘Žπ‘Ž3= 9 cm. π‘Žπ‘Žπ‘–π‘– are the lengths of the leg links. The leg structure is symmetric on the coordinate axis and the walking is set towards the X-axis. The transformation matrix used to translate from one link named i to another link named i-1 by using the D-H parameters table. Equ. 2, the general matrix is given: π‘‡π‘‡π‘–π‘–π‘–π‘–βˆ’1 = οΏ½ π‘π‘π‘π‘π‘π‘πœƒπœƒπ‘–π‘– βˆ’π‘π‘π‘ π‘ π‘ π‘ πœƒπœƒπ‘–π‘–π‘π‘π‘π‘π‘π‘π‘π‘π‘–π‘– π‘π‘π‘ π‘ π‘ π‘ πœƒπœƒπ‘–π‘–π‘π‘π‘ π‘ π‘ π‘ π‘π‘π‘–π‘– π‘Žπ‘Žπ‘–π‘–π‘π‘π‘π‘π‘π‘πœƒπœƒπ‘–π‘– π‘π‘π‘ π‘ π‘ π‘ πœƒπœƒπ‘–π‘– π‘π‘π‘π‘π‘π‘πœƒπœƒπ‘–π‘–π‘π‘π‘π‘π‘π‘π‘π‘π‘–π‘– βˆ’π‘π‘π‘π‘π‘π‘πœƒπœƒπ‘–π‘–π‘π‘π‘ π‘ π‘ π‘ π‘π‘π‘–π‘– π‘Žπ‘Žπ‘–π‘–π‘π‘π‘ π‘ π‘ π‘ πœƒπœƒπ‘–π‘– 0 0 𝑐𝑐𝑠𝑠𝑠𝑠𝑐𝑐𝑖𝑖 0 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑖𝑖 𝑑𝑑𝑖𝑖 0 1 οΏ½ (2) By multiplying each joint transformation matrix, the overall transformation matrix can be obtained as the following Eq. 3: 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑏𝑏𝑐𝑐𝑏𝑏𝑏𝑏 = 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑓𝑓𝑏𝑏𝑓𝑓𝑓𝑓𝑓𝑓 βˆ— 𝑇𝑇𝑓𝑓𝑏𝑏𝑓𝑓𝑓𝑓𝑓𝑓 𝑑𝑑𝑖𝑖𝑏𝑏𝑖𝑖𝑐𝑐 (3) The transformation matrix for each joint in the quadruped robot leg is given by the following equations: 𝑇𝑇10 = οΏ½ 𝑐𝑐1 0 𝑐𝑐1 π‘Žπ‘Ž1𝑐𝑐1 𝑐𝑐1 0 βˆ’π‘π‘1 π‘Žπ‘Ž1𝑐𝑐1 0 0 1 0 0 𝑑𝑑1 0 1 οΏ½ (4) 𝑇𝑇21 = οΏ½ 𝑐𝑐2 βˆ’π‘π‘2 0 π‘Žπ‘Ž2𝑐𝑐2 𝑐𝑐2 𝑐𝑐2 0 π‘Žπ‘Ž2𝑐𝑐2 0 0 0 0 1 0 0 1 οΏ½ (5) 𝑇𝑇32 = οΏ½ 𝑐𝑐3 βˆ’π‘π‘3 0 π‘Žπ‘Ž3𝑐𝑐3 𝑐𝑐3 𝑐𝑐3 0 π‘Žπ‘Ž3𝑐𝑐3 0 0 0 0 1 0 0 1 οΏ½ (6) Multiplications of these matrixes produce the final matrix that it used to describe the leg-tip position and orientation. This matrix is given as the following: οΏ½ c1(c2+3) βˆ’c1s2βˆ’3 s1 a3c1(c2+3) + c1(a2c2+a1) s1(c2+3) βˆ’s1(s2βˆ’3) βˆ’c1 a3s1(c2+3) + s1(a2c2+a1) s2+3 0 (c2+3) 0 0 a3(s2βˆ’3) + a2s2 0 1 οΏ½ (7) Where: 𝑐𝑐𝑖𝑖 = π‘π‘π‘π‘π‘π‘πœƒπœƒπ‘–π‘– and 𝑐𝑐𝑖𝑖 = π‘π‘π‘ π‘ π‘ π‘ πœƒπœƒπ‘–π‘– , for i=1,2, and 3. American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 23 (𝑐𝑐2+3)= cos (πœƒπœƒ2 + πœƒπœƒ3) (𝑐𝑐2βˆ’3)= sin (πœƒπœƒ2 βˆ’ πœƒπœƒ3) Thus, the final position of the leg tip can be obtained as: π‘₯π‘₯𝑖𝑖 = π‘Žπ‘Ž1𝑐𝑐1 + π‘Žπ‘Ž2𝑐𝑐1𝑐𝑐2 + π‘Žπ‘Ž3𝑐𝑐1 (8) 𝑦𝑦𝑖𝑖 = π‘Žπ‘Ž1𝑐𝑐1 + π‘Žπ‘Ž2𝑐𝑐1𝑐𝑐2 + π‘Žπ‘Ž3𝑐𝑐1𝑐𝑐2+3 (9) 𝑧𝑧𝑖𝑖 = π‘Žπ‘Ž2𝑐𝑐2 + π‘Žπ‘Ž3 𝑐𝑐2βˆ’3 (10) Where: (π‘₯π‘₯𝑖𝑖,𝑦𝑦𝑖𝑖 ,𝑧𝑧𝑖𝑖) is the leg-tip coordinates, i=1…4. 4.2 Inverse Kinematics The inverse kinematics is used to formulate and achieve the joint angles from the leg tip position and orientation which has been calculated from the forward kinematics [14]. In this paper, the goal of inverse kinematics is to find joint angles of each leg, πœƒπœƒ1,πœƒπœƒ2 and πœƒπœƒ3, from the leg position. The leg configuration assumed to be similar with the natural biological insect as illustrated in Fig.(4). Figure 4: Shows one leg of insect and its links (Coxa, Femur, Tibia) [16] To solve inverse kinematics for every legs, its need to use the geometrical methods. Firstly, its need to simple the geometrical figure of the leg from (3D) views to (2D) view. Secondly, finding each joint angle by using the geometrical analysis to find (πœƒπœƒ1,πœƒπœƒ2 and πœƒπœƒ3) as shown in Fig.(5). Figure 5: quadruped top view showing leg angle πœƒπœƒ1 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 24 πœƒπœƒ1 Can be directly calculated as: πœƒπœƒ1 = π‘‘π‘‘π‘Žπ‘Žπ‘ π‘ βˆ’1(𝑋𝑋 𝑑𝑑𝑖𝑖𝑑𝑑 π‘Œπ‘Œ 𝑑𝑑𝑖𝑖𝑑𝑑 ) (11) After finding πœƒπœƒ1, the other angelsπœƒπœƒ2 and πœƒπœƒ3 are in the same (Y-Z) plane. Firstly, finding πœƒπœƒ2 by dividing it into two parts 𝑐𝑐1and 𝑐𝑐2 to simplify the problem. From Fig.(6), it can be seen that 𝑐𝑐1 is depending on the distance L which equals to: 𝐿𝐿 = �𝑧𝑧𝑐𝑐𝑓𝑓𝑓𝑓𝑏𝑏𝑏𝑏𝑑𝑑2 + (𝐿𝐿1 βˆ’ 𝑐𝑐)22 (12) Where: c is the length of Coxa link. So 𝑐𝑐1 can be calculated as: 𝑐𝑐1 = π‘π‘π‘π‘π‘π‘βˆ’1(π‘§π‘§π‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œ 𝐿𝐿 ) (13) From the cosine rules and from Fig.(6), 𝑐𝑐2will be found as: 𝑇𝑇2 = 𝐹𝐹2 + 𝐿𝐿2 βˆ’ (2 βˆ— 𝐹𝐹 βˆ— 𝐿𝐿)cos (𝑐𝑐2) Thus: 𝑐𝑐2 = π‘π‘π‘π‘π‘π‘βˆ’1 �𝐹𝐹 2+𝐿𝐿2βˆ’π‘‡π‘‡2 2βˆ—πΉπΉβˆ—πΏπΏ οΏ½ (14) Where: F is the Femur link length and T is the Tibia Link length. Figure 6: Quadruped robot leg and its links (Coxa, Femur, Tibia), πœƒπœƒ2 andπœƒπœƒ3 [14] From Fig.(6),πœƒπœƒ2 equals to: πœƒπœƒ2 = 𝑐𝑐1 + 𝑐𝑐2 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 25 πœƒπœƒ2 = π‘π‘π‘π‘π‘π‘βˆ’1 οΏ½π‘§π‘§π‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œπ‘œ 𝐿𝐿 οΏ½ + π‘π‘π‘π‘π‘π‘βˆ’1 �𝐹𝐹 2+𝐿𝐿2βˆ’π‘‡π‘‡2 2βˆ—πΉπΉβˆ—πΏπΏ οΏ½ (15) By the same method, πœƒπœƒ3 is calculated as: πœƒπœƒ3 = π‘π‘π‘π‘π‘π‘βˆ’1 �𝐹𝐹 2+𝑇𝑇2βˆ’πΏπΏ2 2βˆ—πΉπΉβˆ—π‘‡π‘‡ οΏ½ (16) 5. Stability Margins Analysis for Quadruped Robot Creeping Gait The quadruped robot walks with a specific goal to have a statically stable movement. During the robot walking the vertical projection of COG on the ground must be inside the supporting polygon. This is the main criterion which is conditioned for the statically stable walking. The quadruped robot is stable and will not turn down when it satisfied these conditions of the statically stable walking. The main advantage of the quadruped robot walking in periodically repeated locomotion is to produce a constant speed. This property is leading to the fact that the accelerations on the robot body are equal to zero, and the disturbances on the legs will be reduced. When the quadruped robot walking using creeping gait, the static stability walking is depending on the stability margins. These margins are defined as shortest distance between the vertical projection of COG to the boundaries of the supporting pattern [13]. The next figures are showing and explaining the quadruped robot model, and the stability margins mathematically analysis to find and calculate the stability margins as the following cases: Figure 7: Quadruped robot (top-view) showing the support triangle when leg4 is swinging and other legs are fixed on the ground Case one: when the quadruped robot leg4 is swing and the other legs (1, 2, and 3) are fixed on the ground as showing in Fig. (7). The supporting area will be divided into three areas called (Area1, Area2, and Area3). The blue lines are the lines of the stability margins which are needed to be the minimum from the vertical projection of COG to the supporting lines (L1, L2, and L3). These blue lines are denoted as (T1, T2, and T3). After this method is applied, the stability margins will be found as: π΄π΄π΄π΄π΄π΄π‘Žπ‘Ž1 = 1 2 οΏ½ 1 1 1 π‘₯π‘₯𝑐𝑐𝑐𝑐𝑐𝑐 π‘₯π‘₯1 π‘₯π‘₯3 𝑦𝑦𝑐𝑐𝑐𝑐𝑐𝑐 𝑦𝑦1 𝑦𝑦3 οΏ½ Where, (π‘₯π‘₯𝑐𝑐𝑐𝑐𝑐𝑐 ,𝑦𝑦𝑐𝑐𝑐𝑐𝑐𝑐) is the center of gravity coordinate of the quadruped robot on the ground. (π‘₯π‘₯1,𝑦𝑦1) is the leg1 50 40 X 30 20 10 0 10 0 10 20 Y 30 40 Leg 4 swing Support triangle American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 26 coordinate of tip position. (π‘₯π‘₯3,𝑦𝑦3) is the leg3 coordinate of tip position. By expanding and simplify this matrix π΄π΄π΄π΄π΄π΄π‘Žπ‘Ž1can be calculated as the following: π΄π΄π΄π΄π΄π΄π‘Žπ‘Ž1 = 1 2 οΏ½οΏ½π‘₯π‘₯1 βˆ’ π‘₯π‘₯𝑐𝑐𝑐𝑐𝑐𝑐��𝑦𝑦3 βˆ’ 𝑦𝑦𝑐𝑐𝑐𝑐𝑐𝑐� βˆ’ οΏ½π‘₯π‘₯3 βˆ’ π‘₯π‘₯𝑐𝑐𝑐𝑐𝑐𝑐��𝑦𝑦1 βˆ’ 𝑦𝑦𝑐𝑐𝑐𝑐𝑐𝑐� οΏ½ 𝐿𝐿1 = οΏ½(π‘₯π‘₯1 βˆ’ π‘₯π‘₯3)2 + (𝑦𝑦1 βˆ’ 𝑦𝑦3)2 𝑑𝑑1 = 2 βˆ— (𝐴𝐴𝑓𝑓𝑏𝑏𝑐𝑐1 𝐿𝐿1 ) (17) By the same way, π΄π΄π΄π΄π΄π΄π‘Žπ‘Ž2 and π΄π΄π΄π΄π΄π΄π‘Žπ‘Ž3 will be found as: π΄π΄π΄π΄π΄π΄π‘Žπ‘Ž2 = 1 2 οΏ½οΏ½π‘₯π‘₯1 βˆ’ π‘₯π‘₯𝑐𝑐𝑐𝑐𝑐𝑐��𝑦𝑦2 βˆ’ 𝑦𝑦𝑐𝑐𝑐𝑐𝑐𝑐� βˆ’ οΏ½π‘₯π‘₯2 βˆ’ π‘₯π‘₯𝑐𝑐𝑐𝑐𝑐𝑐��𝑦𝑦1 βˆ’ 𝑦𝑦𝑐𝑐𝑐𝑐𝑐𝑐� οΏ½ 𝐿𝐿2 = οΏ½(π‘₯π‘₯1 βˆ’ π‘₯π‘₯2)2 + (𝑦𝑦1 βˆ’ 𝑦𝑦2)2 𝑑𝑑2 = 2 βˆ— (𝐴𝐴𝑓𝑓𝑏𝑏𝑐𝑐2 𝐿𝐿2 ) (18) π΄π΄π΄π΄π΄π΄π‘Žπ‘Ž2 = 1 2 οΏ½οΏ½π‘₯π‘₯2 βˆ’ π‘₯π‘₯𝑐𝑐𝑐𝑐𝑐𝑐��𝑦𝑦3 βˆ’ 𝑦𝑦𝑐𝑐𝑐𝑐𝑐𝑐� βˆ’ οΏ½π‘₯π‘₯2 βˆ’ π‘₯π‘₯𝑐𝑐𝑐𝑐𝑐𝑐��𝑦𝑦3 βˆ’ 𝑦𝑦𝑐𝑐𝑐𝑐𝑐𝑐� οΏ½ 𝐿𝐿3 = οΏ½(π‘₯π‘₯2 βˆ’ π‘₯π‘₯3)2 + (𝑦𝑦2 βˆ’ 𝑦𝑦3)2 𝑑𝑑3 = 2 βˆ— (𝐴𝐴𝑓𝑓𝑏𝑏𝑐𝑐3 𝐿𝐿3 ) (19) Finally, the first stability margin 𝑐𝑐𝑠𝑠1is the minimum distance from these three margins: 𝑐𝑐𝑠𝑠1 = 𝑠𝑠𝑠𝑠𝑠𝑠 (𝑑𝑑1,𝑑𝑑2,𝑑𝑑3) (20) The other stability margins have been calculated in each period when the other legs are swinging respectively. As 𝑐𝑐𝑠𝑠1 analyzed, the other margins are equals to: 𝑐𝑐𝑠𝑠2 = min (𝑑𝑑4,𝑑𝑑5,𝑑𝑑6) (21) 𝑐𝑐𝑠𝑠3 = 𝑠𝑠𝑠𝑠𝑠𝑠 (𝑑𝑑7,𝑑𝑑8,𝑑𝑑9) (22) 𝑐𝑐𝑠𝑠4 = 𝑠𝑠𝑠𝑠𝑠𝑠 (𝑑𝑑10,𝑑𝑑11,𝑑𝑑12) (23) Where (𝑐𝑐𝑠𝑠2,𝑐𝑐𝑠𝑠3, π‘Žπ‘Žπ‘ π‘ π‘‘π‘‘ 𝑐𝑐𝑠𝑠4) have been calculated corresponding to the other cases when the legs are swinging sequence during the robot creeping gait. And 𝑑𝑑𝑖𝑖 (i=4,...,12) are the distances between the robot center and the legs tips, when all the legs had been swing as 𝑙𝑙𝐴𝐴𝑙𝑙2, 𝑙𝑙𝐴𝐴𝑙𝑙3, and 𝑙𝑙𝐴𝐴𝑙𝑙1 respectively. American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 27 6. Stability Margins Optimization using PSO The stability margins of each leg sequence when the quadruped robot walking with creeping gait is analyzed. These margins are varying between a range of values, and its need to achieving the optimal value of each stability margin. In this section an optimization method called Particle Swarm Optimization is used to optimize the stability margins to have the best stability margin during the quadruped robot walking using creeping gait locomotion. The PSO optimization algorithm is based on some features such as: 1- The cost function: this is the main function of the problem that it needs to be optimized. In this paper, the main parameters that will pass to the cost function are the robot body center in X-axis and Y-axis and the leg tips which are presented as the constraint of the cost function. 2- The minimum and maximum values of variables: in this paper, the stability margin limiting values are presented as VARmin and VARmax 3- Number of iteration: in this paper the number of iteration is: 500 iteration 4- Number of population: in this paper the number of population equals to 5. 5- The initial weight : in this paper the initial weight π‘Šπ‘Šπ‘–π‘–π‘–π‘–π‘–π‘–π‘‘π‘‘π‘–π‘–π‘π‘π‘–π‘– = 1, and the damping weight π‘Šπ‘Šπ‘‘π‘‘π‘π‘π‘“π‘“π‘‘π‘‘ = 0.99 6- The constant values 𝐢𝐢1and𝐢𝐢2: in this paper 𝐢𝐢1=3.999 and𝐢𝐢2 = 0.0001. All these parameters are playing a very important role for enhancement the optimization method working. The PSO optimization results of the stability margins are showing in section 7. 7. Simulation and Results In this section, the quadruped robot walking according to the creeping gait sequence locomotion is shown. Each gait has its stability margin is varying between a range of values according to which leg is swing in the air. After finding the stability margin of each gait, applying the PSO optimization algorithm to achieve the best stability margin which gives the best stability that it used to balance the quadruped robot at the period when it walks with creeping gait locomotion. As shown in the following figures. (a) (b) Figure 8: (a) Leg 4 in swinging phase (b) The stability margin 𝑆𝑆𝑠𝑠1(cm) when leg4 is swing. 50 40 X 30 20 10 0 10 0 10 20 Y 30 40 Leg 4 swing Support triangle 0 50 100 150 200 250 300 350 1 1.5 2 2.5 3 3.5 4 4.5 5 iteration S m 1 (c m ) sm1 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 38, No 1, pp 17-32 28 (a) (b) Figure 9: (a) Leg 2 in swinging phase. (b) The stability margin 𝑆𝑆𝑠𝑠2(cm) when leg2 is swing. (a) (b) Figure 10: (a) Leg 3 in swinging phase. (b) The stability margin 𝑆𝑆𝑠𝑠3(cm) when leg3 is swing. (a) (b) Figure 11: (a) Leg 1 in swinging phase. (b) The stability margin 𝑆𝑆𝑠𝑠4(cm) when leg1 is swing. From above figures it can be seen the following: 1. In Fig.(8): leg4 tip is swinging and the stability margin 𝑆𝑆𝑠𝑠1(cm) equals to (1.71) cm. 2. In Fig.(9): leg2 swinging and the stability margin 𝑆𝑆𝑠𝑠2(cm) equals to (1.35) cm. 4 20 X 0 -20 -10 0 10 Y 20 30 40 Support triangle Leg 2 swing 0 50 100 150 200 250 300 1 2 3 4 5 6 7 Itration S m 2 (c m ) sm2 30 X 20 10 0 1010 0 10 20 Y 30 40 Leg 3 swing Support triangle 0 50 100 150 200 250 300 350 1 2 3 4 5 6 Iteration S m 3 ( cm ) sm3 40 20 0 20 -10 0 10 20 30 40 50 30 20 10 0 Z Y X Leg 1 swing Support triangle 0 50 100 150 200 250 300 350 0 0.5 1 1.5 2 2.5 3 3.5 4 Iteration Sm 4 ( cm ) sm4 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 37, No 1, pp 17-32 29 3. In Fig.(10): leg3 swinging and the stability margin 𝑆𝑆𝑠𝑠3(cm) equals to (2.3) cm. 4. In Fig.(11): leg1 swinging and the stability margin 𝑆𝑆𝑠𝑠4(cm) equals to (1.95) cm. The best stability margins achieving from the PSO optimization algorithm are showing in the following figures Figure 12: Best cost for the stability margin 𝑆𝑆𝑠𝑠1 Figure 13: Best cost for the stability margin 𝑆𝑆𝑠𝑠2 Figure 14: Best cost for the stability margin 𝑆𝑆𝑠𝑠3 Figure 15: Best cost for the stability margin 𝑆𝑆𝑠𝑠4 The following Table (2) is a comparison between the classical stability margins analysis and proposed optimization using PSO algorithm method used in this paper. Table 2: Stability margins comparison between the classical analyses and the optimized method Classical Analysis Method Proposed Optimization using PSO algorithm 1. When Leg 4 is swing the stability margin 𝑆𝑆𝑠𝑠1 ranging between (2 – 4.55) cm. 1. When Leg 4 is swing the best stability margin 𝑆𝑆𝑠𝑠1 equals to2.851 cm. 2. When Leg 2 is swing the stability margin 𝑆𝑆𝑠𝑠2 ranging between (3 – 6.2) cm. 2. When Leg 2 is swing the best stability margin 𝑆𝑆𝑠𝑠2 equals to2.75 cm. 3. When Leg 3 is swing the stability margin 𝑆𝑆𝑠𝑠3 ranging between (2.7 – 5.3) cm. 3. When Leg 3 is swing the best stability margin 𝑆𝑆𝑠𝑠3 equals to: 3.667 cm. 4. When Leg 1 is swing the stability margin 𝑆𝑆𝑠𝑠4 ranging between (1.6 – 3.6) cm. 4. When Leg 1 is swing the best stability margin 𝑆𝑆𝑠𝑠4 equals to: 2.308 cm. Iteration 0 100 200 300 400 500 Be st Co sts 2.84 2.86 2.88 2.9 2.92 2.94 2.96 2.98 3 Best Margin Sm1= 2.851 cm Iteration 0 100 200 300 400 500 Be st C os ts 4.75 4.76 4.77 4.78 4.79 4.8 Best Margin Sm2=4.75 cm Iteration 0 100 200 300 400 500 Be st Co sts 3.665 3.67 3.675 3.68 3.685 3.69 Best Margin Sm3=3.667 cm Iteration 0 100 200 300 400 500 Be st C os ts 2.31 2.315 2.32 2.325 2.33 2.335 Best Margin Sm4=2.308 cm American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 37, No 1, pp 17-32 30 From above figures it can be seen that: 1. In Fig.(12): the best cost of the stability margin 𝑆𝑆𝑠𝑠1equals to (1.635) cm. 2. In Fig.(13): the best cost of the stability margin 𝑆𝑆𝑠𝑠2 equals to (1.25) cm. 3. In Fig.(14): the best cost of the stability margin 𝑆𝑆𝑠𝑠3 equals to (2.173) cm. 4. In Fig.(15): the best cost of the stability margin 𝑆𝑆𝑠𝑠4equals to (2.309) cm. During the creeping gait sequence, the quadruped robot leg angles are changing. These angles are (πœƒπœƒ1,πœƒπœƒ2andπœƒπœƒ3) of each leg. This changing is showing in Fig.(19): Figure 16: Changing of Coxa-angle in one step movement Figure 17: Changing of Femur-angle in one step movement Figure 18: Changing of Tibia-angle in one step movement From above figures it can be seen that: 1. Fig.(16) is the changing of Coxa-angleπœƒπœƒ1. This angle is varying between (90 degree) to (76 degree). 2. Fig.(17) is the changing of Femur-angle πœƒπœƒ2. This angle is varying between (23 degree) to (60 degree). 3. Fig.(18) is the changing of Tibia-angle πœƒπœƒ3. This angle is varying between (30 degree) to (49 degree). 2 4 6 8 10 12 75 80 85 90 Iteration Th et a1 (d eg re e) L1,1 2 4 6 8 10 12 20 30 40 50 60 70 Iteration T he ta 2( de gr ee ) L1,2 2 4 6 8 10 12 30 35 40 45 50 Iteration Th et a3 (d eg re e) L1,3 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 37, No 1, pp 17-32 31 8. Conclusion Illuminating the basic points of this paper, analyze of the quadruped robot walking of creeping gait and the derivation, emphasize and showed that the quadruped robot is statically stable throughout walking. To access the objective of the work, firstly, the whole forward and inverse kinematics model have been derived and utilized for stability validation of walking steps. So the intersection between sequence of robot creeping gait and the geometric modeling of robot legs-tip which are derived to find the entire static stability margins during walking. The results certainly proved the best of stability margins that own the minimum values with utilizing PSO algorithm to guarantee the robot COG preservation into the supporting triangle via the swing phase for one leg with the rest legs that on the ground. Furthermore, an improvement for future work, it’s necessary to analyze and enhance the quadruped robot walking on hard and rough terrain. References [1] Kumar, T. Komal, R. Kumar, S. Mogily, D. Goel, N. Pareekutty, S. V. Shah, and K. Madhava Krishna. "Implementation of gaits for achieving omnidirectional walking in a quadruped robot."Proceedings of the 2015 Conference on Advances In Robotics - AIR '15(2015). [2] Rebula, J. R., Neuhaus, P. D., Bonnlander, B. V,.Johnson, M. J., Pratt, J. E. (2007). β€œA controller forthelittledog quadruped walking on rough terrain”.ICRA, 1467-1473. [3] Raibert, M., Blankespoor, K., Nelson, G., Playter, R.(2008). Bigdog, the rough-terrain quadruped robot. InProc, of the 17th World Congress, 17(1), 10822-10825. [4] Shimoyama, I., Miura, H., Horita, M., Hattori, Y.(1991). Analysis of walk for quadruped. IROS,1541- 1544. [5] Fukuoka, Y., Kimura, H., Cohen, A. H. (2003).Adaptive dynamic walking of a quadruped robot onirregular terrain based on biological concepts. The Int.J. of Robotics Research, 22(3-4), 187-202. [6] Ma, S., Tomiyama, T., Wada, H. (2005).Omnidirectional static walking of a quadrupedrobot.Transactions on Robotics, 21(2), 152-161. [7] Lee, T. T., Shih, C. L. (1986). A study of the gaitcontrol of a quadruped walking vehicle. J. of Roboticsand Automation, 2(2), 61-69. [8] Kim, B. H. (2009). Centroid-based analysis ofQuadruped-robot Walking Balance. Int. Conf. onAdvanced Robotics, 1-6. [9] Firas A. Raheem, Hind Z. Khaleel, "Hexapod Robot Static Stability Enhancement using Genetic Algorithm Al-Khwarizmi Engineering Journal,Vol. 11, No. 4, P.P. 44-59, 2015. [10] Chen, Binbin, Shaoyuan Li, and Dan Huang. "Quadruped robot crawl gait planning based on DST." American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2017) Volume 37, No 1, pp 17-32 32 Proceedings of the 33rd Chinese Control Conference (2014). [11] Liu, Fei. Research about "Gait Planning and Balance Control ofQuadruped Robot", Doctoral dissertation, University of Scienceand Technology of China, 2010. [12] Buchli, Jonas and Kalakrishnan, Mrinal and Mistry, Michaeland Pastor, Peter and Schaal, Stefan, Compliant quadruped locomotion over rough terrain, The 2009 IEEE/RSJ InternationalConference on Intelligent Robots and Systems: 814–820, 2009. [13] Liu, F., D. Wu, and K. Chen. "The Simplest Creeping Gait For A Quadruped Robot". Proceedings of the Institution of Mechanical Engineers, Part C: Journal of Mechanical Engineering Science 227.1 (2012): 170-177. Web. [14] MΔƒnoiu-OlaruSorin, NiΕ£ulescuMircea, β€œMatlabSimulator for Gravitational Stability Analysis of a HexapodRobot,” The Romanian Review PrecisionMechanics, Optics &Mechatronics, 158 2011, No. 39 Mechanics, Optics &Mechatronics, 2011. [15] FreyrHardarson,"Stability analysis and synthesis ofstatically balanced walkingfor quadruped robots",DoctoralThesisMechatronicsLabDepartment of Machine DesignRoyal Institute of Technology, KTHS-100 44 Stockholm, Sweden,2002. [16] F. Moldovan, V. Dolga, C. Sticlaru, "A New Type of Walking Robot Based upon Jansen Mechanism", Advanced Materials Research, Vols. 463-464, pp. 997-1001, 2012.