Dynamic Imbalance Analysis and Stability Control of Galloping Gait for a Passive Quadruped Robot

Some imbalance and balance postures of a passive quadruped robot with a simplified mathematical model are studied. Through analyzing the influence of the touchdown angle of the rear leg on the posture of the trunk during the flight phase, the stability criterion is concluded: the closer are the two moments which are the zero time of the pitching angle and the peak time of the center of mass, the better is the stability of the trunk posture during the flight phase. Additionally, the validity of the stability criterion is verified for the cat, greyhound, lion, racehorse, basset hound, and giraffe. Furthermore, the stability criterion is also applicable when the center of the mass of body is shifted. Based on the stability criterion, the necessary and sufficient condition of the galloping stability for the quadruped robot is proposed to attain a controlled thrust. The control strategy is designed by an optimization dichotomy algorithm for seeking the zero point of the balance condition. Through the control results, it is demonstrated that the imbalance posture of the trunk could be stabilized by adjusting the stiffness of four legs.


Introduction
In recent years, some models were presented to study the trotting, bounding, and galloping gait of quadruped robot. The spring loaded inverted pendulum (SLIP) model was suitable to study the hopping of one-legged robot [1,2], bipedal running of human [3][4][5], and trotting of quadruped robot [6,7]. Meanwhile, the studying of SLIP model was a fundamental work for other models of the quadruped robot. The planar model consisted of a rigid body and four springy massless legs was derived from the SLIP [8]. Many bounding [9][10][11][12] and galloping [7,13] gaits were achieved in simulation or experiment environments based on the beam and springy leg (BSL) model.
The stability was an important property of locomotion, since the stability could ensure the quadruped robot form a successive locomotion. Most of the authors studied the motion stability of quadruped robot by employing the Poincaré return map (PRM) based on the Newton-Raphson method [10,11,[14][15][16]. The PRM method was designed to search for a group of initial values for maintaining a stable cyclic motion through solving the dynamic equation of the quadruped robot. If the selected initial values were not able to maintain a steady-state bounding or galloping, another group of initial values was used to solve the dynamic equation to judge whether the locomotion was stable or not. The procedures above were repeated until the desired stable locomotion was achieved. Ultimately, many stable cyclic motions would be achieved by the same mechanical parameters of robot. Due to the difficulty in hand-tuning multiple parameters, the optimization algorithm was chosen to search for the initial values when the system was passive [14,17] or was used to design the control parameters when the system was controlled [18][19][20]. From the analysis of the PRM method, the passive dynamic bounding and galloping gait were achieved by cut and try. The necessary and sufficient conditions of the stability during the stride were not concerned when using the PRM method. Therefore, the dynamic stability inside the stride was an elusive issue for being not studied elaborately.
Meanwhile, other authors also focused on achieving the stable bounding or galloping gait by control strategies. Marhefka et al. [13] presented a fuzzy control strategy for the high-speed quadruped bounding and galloping. The fuzzy logic controller was able to search for the touchdown angles and the thrusts of legs by tracking the desired running height and the desired velocity of a quadruped robot in one stride. Finally, the galloping gait was stabilized by the fuzzy logic controller with the planar BSL model. Krasny and Orin [18] realized a 3D galloping gait of a small dog with the finite state machine. The controller adjusted the rest position of leg spring to match the designed energy of each leg when it was at the maximum compression. The control algorithm could stabilize the pitching motion and the vertical displacement of center of mass (COM) which were considered to be the two key indicators of the stability in the sagittal plane. Seyfarth et al. [21] presented a movement criterion for running. They concluded that the mechanical self-stabilized running would be achieved by adjusting the leg stiffness for a certain attack angle. At last, the stable running was realized for a SLIP model by the PRM method. Herr and McMahon [22] employed a 'hip thrusting and shoulder braking' method to ensure the pitching stability and realized a stable galloping gait of a horse. Designing a control strategy could attain stable running including the trotting, bounding, and galloping gait. However, the dynamic balance conditions were not analyzed elaborately. Hence, a necessary and sufficient condition must be proposed for judging the stability of the quadruped robot.
As stated in previous paragraph, the stability indicators in the sagittal plane are the pitching angle and the height of COM. Meanwhile, the pitching angular velocity of the trunk during the flight phase also plays an important role in maintaining stable locomotion of the robot. In this paper, the instable state is defined as the tumble of robot; that is, the bottom or the head falls down on the ground while the quadruped robot is galloping. Through the BSL model, the imbalance postures of the robot with improper pitching angular velocity are studied in this paper. Then, the stability criterion is achieved. Next, the controlled thrust is designed by adjusting the leg stiffness on the basis of the stability criterion. Finally, through some simulations, it is demonstrated that the control method is feasible to stabilize the trunk posture under the instable initial parameter while the quadruped robot is galloping.
In Methods, the simplified model is introduced and the controlled thrust is proposed. In Results, by analyzing the impacts of the pitching angle and angular velocity on the trunk posture, the stability criterion is proposed. Meanwhile, the controlled thrusts are obtained to stabilize the locomotion by adjusting the leg stiffness. In Discussions, the validity of the stability criterion is verified for various animals. Finally, in Conclusions, some summaries are given.

Dynamical Model and Galloping Simulation of a Simplified
Quadruped Robot. In the paper, a quadruped robot is used for the purpose of analyzing the stability of the galloping gait and is simplified as a BSL model in sagittal plane [6,12], as shown in Figure 1. The COM coordinate is ( , ), the body pitching angle is , and the leg orientation angle is while the quadruped robot is running. In addition, the four legs (front leading leg, front trailing leg, rear leading leg, and rear trailing leg) are indicted as fl, ft, rl, and rt, respectively. Furthermore, based on the energy conservation and the Lagrange equations, the dynamic model of the BSL system is constructed when the damping energy dissipation terms are ignored.
The dynamic model is derived as ] . In addition, ( ) = Through the dynamic model Equation (1), Figure 2 shows the vertical displacement of the COM, the pitching angle , and the pitching angular velocity under the mechanical parameters and initial values in Table 1. The initial values include the horizontal displacement 0 and the vertical displacement 0 of COM, their velocities V 0 and V 0 , the pitching angle 0 and the pitching angular velocity 0 , and the orientation angles td ft and td rt at the moment of touchdown. The distance between the leading and trailing leg when the legs are in contact with the ground is defined as follows: From Figure 2(a), a periodic galloping process of a cheetah is shown. At the moments 0 and 8 , the spine of cheetah shows a maximum flexion posture and the COM of cheetah is at the peak in vertical direction. In addition, at the moments 1 , 2 , and 3 , the rear legs touch down the ground, and the legs endure the ground reaction force (GRF). At the moment 4 , the spine of cheetah shows a maximum extension when the COM of cheetah is at the peak in vertical direction and the pitching angle is zero. Furthermore, at the moments 5 , 6 , and 7 , the front legs touch down the ground. Correspondingly, Figure 2(e) gives the footfall pattern and the stance duration of the four legs (fl, ft, rl, and rt). While one and two legs contact the ground during the stance phase, the velocity(V , V , ) of the trunk is changing. On the contrary, during the flight phase, the legs do not exert the thrusts on the trunk, and, as a result, the velocity(V , V , ) is constant.
However, practically, the trajectories of the galloping gait for the quadruped robot cannot be always a single kind of symmetrical locomotion. When the cheetah suffers from a disturbance, such as stepping on a loose stone, catching a small animal, or jumping over an obstacle, the cheetah then must keep the balance of the trunk for running forward. The trunk stability is dependent on the pitching angle and pitching angular velocity . In Results, the instability and stability analyses of the quadruped robot according to (1) are presented.

Control Design.
Based on the passive dynamic model [6,14,29], the mutual transformation of the kinetic energy and potential energy is widely studied. As shown in Figure 3,  first, when the rear trailing leg touches down the ground, the leg starts retracting in a clockwise direction together with compression. Then, when the leg obtains the maximum compression, the elastic potential energy stored in the rear leg is the maximum. Finally, the stored elastic potential energy is released until the length of the leg reaches the rest length 0 , and the leg starts to lift off the ground and the orientation angle is lo rt . In addition, the maximum elastic potential energy stored in the two rear legs is shown in Figure 4 when = 0 and the orientation angle td rt is increasing. Apparently, the elastic potential energy increases gradually and is expressed as where max[⋅] is a maximum function. From (5) and Figure 4, the stiffness of the legs could be adjusted to keep the energy constant when td rt is increased. As a result, the passive controlled thrusts are designed from the view of the mutual conversion of elastic potential energy, kinetic energy, and gravitational potential energy. The designed thrusts may be written as where Δ is the stiffness compensation achieved by an optimizing condition which will be discussed in Section 3. During locomotion of the quadruped robot, the stiffness of legs has not been fully used to support the trunk. The leg stiffness is not constant but it can be adjusted by itself. When the robot wants to accelerate forward, the leg stiffness will decrease and when the robot wants to decelerate forward, the leg stiffness will increase. Therefore, in the paper, the stiffness compensation is thought as a passive control method [30] and plays an instruction role in active control [31] for the quadruped robot.

Stability Analysis of the Quadruped Robot.
For the passive quadruped robot, both the imbalance and balance postures depend on the initial mechanical parameters. When the touchdown angle td rt = (0 ∼ /2) rad and = 0 under the initial values of the other parameters in Table 1, the trajectory ( , , ) of the trunk may vary with different td ft . As shown in Figure 5, the larger the touchdown angle td rt is, the larger, in the negative direction, the pitching angular velocity fp of the trunk during the flight phase is. In addition, the pitching angular velocity fp during the flight phase is given in Figure 6 under the different orientation angles td rt . As shown, fp increases approximately linearly when td rt = (0 ∼ 1.2) rad. Next, the three states of the robot will be discussed with the different orientation angles td rt . Figure 7 shows the imbalance posture of the trunk with an insufficient pitching angular velocity. The black half body and white half body indicate "head" and "bottom" of the quadruped robot, respectively, in Figure 7(a). When the two rear legs touch down the ground at the same time under the orientation angle td rt = 0.14 rad, the pitching angular velocity fp of the trunk is insufficient and the pitching angle is increasing in an anticlockwise direction after the legs lift off the ground in Figure 7(d). is the vertical displacement of the bottom. In Figure 7(c), when is zero, the bottom contacts the ground to make the quadruped robot fall down at the moment 3 . Therefore, the insufficient touchdown angle td rt will lead to the insufficient pitching angular velocity fp of the trunk. Consequently, the bottom first falls down on the ground in Figure 7  the trunk is sufficient. As a result, the trunk shows a balance posture at the moment 2 in Figure 8. At the same time, the pitching angle is approximately zero at the peak time of COM in Figure 8(d). Consequently, the posture of the trunk is stable enough before it is supported by the two front legs at the moment 3 as shown in Figure 8(a). When the initial touchdown angle td rt is equal to 0.54 rad, the pitching angular velocity fp is overlarge. As shown in Figure 9(d), the pitching angle of the trunk is more than − /2 rad at the moment 2 before the COM reaches the peak of vertical displacement. In addition, the pitching angle  Applied Bionics and Biomechanics at the moment 3 is about −4.2 rad. Then, the head of the quadruped robot may fall down on the ground at the moment 4 as shown in Figure 9(a). is the vertical displacement of the head shown in Figure 9(b). Therefore, the overlarge fp will result in the pitching angle up to more than − /2 rad before COM reaches the peak of the vertical displacement during the flight phase, so that the head, the bottom, or the back of the trunk may fall down according to the height of COM.
By analyzing the balance and imbalance postures of the trunk Figures 7∼9, the initial condition td rt will affect the pitching angle and pitching angular velocity fp during flight phase. Moreover, during td rt = (0 ∼ /2) rad, when the two moments, which are the zero time of the pitching angle and the peak time of COM during flight phase, occur at the same time, the trunk shows the best balance posture. In Figure 10, when the td rt increases from 0 to /2 rad, the zero time curve of and peak time curve of COM are given. As is shown, when td rt = 0.32 rad and the moment is about 0.25 s, the pitching angle is zero. At the same time, the COM reaches the peak of vertical displacement. When td rt is far less than 0.32 rad, the bottom of the quadruped robot will fall down on the ground. When the td rt is far higher than 0.32 rad, the pitching angle of the trunk will be negatively more than − /2 rad during the flight phase. In other words, the closer are the two moments which are the zero time of the pitching angle and the peak time of COM, the better is the stability of the trunk posture during the flight phase.

Control Result for the Instability of the Quadruped Robot.
V lo , lo , and lo indicate the vertical velocity, pitching angle, and angular velocity of the quadruped robot when rear leading leg lifts off the ground and the locomotion of the COM is described as where Δ is the vertical displacement of COM from liftoff to the peak during the flight phase, is the corresponding time interval, is the acceleration of gravity, and is the time interval from liftoff to the zero point of during the flight phase.
Based on the discussion of Figure 10, if = , a best balance posture of the trunk during the flight phase is presented. Therefore, (7) may be transformed as In a word, (8) is the necessary and sufficient condition of a best balance for the quadruped galloping. When the quadruped robot exposes an imbalance posture with a random touchdown angle td rt , the controlled thrusts equation (6)  is designed to compensate the difference between the zero time of pitching angle and the peak time of COM by solving the best balance condition equation (8) and the dynamic equation (1) coordinately. Then, the controlled thrust which depends on the coefficient Δ in (6) is achieved by using an optimization algorithm to find zero point of (8). Figure 11 shows an imbalance posture of the quadruped robot based on the parameters in Table 1 without control. When the initial condition is set as td ft = 0.6 rad, td rt = 0.5 rad, = 0.1 m, and = 0.5 m, the pitching angle nearest to zero is at time = 0.2063 s. However, the vertical displacement of COM does not reach the peak at this time. Therefore, after touchdown and liftoff of the front legs, the trunk rotates up to about −2.9 rad at the moment 4 in Figure 11(c). This will cause a tumbling and even a pulled muscle for the animals.
Therefore, the controlled thrusts of the hind limb are required to stabilize the pitching motion and the height of COM which are considered to be the indicators of stability in sagittal plane. The designed thrusts are given as follows based on (6): The stiffness variation as the control input is achieved by solving the dynamic equation (1) with the control objectives equation (8). Meanwhile, the galloping stability criterion equation (8) is solved to seek its zero point by a dichotomy algorithm [32,33]. At last, Δ and Δ are achieved as Δ = −3.9626 × 10 4 N/m, Δ = −3.4357 × 10 4 N/m.
The control result is presented in Figure 12. With the controlled thrusts, a balance posture of the quadruped robot is achieved. With the stiffness compensation Δ , the two rear legs touch down the ground with initial conditions td rt = 0.5 rad and = 0.5 m. At the end of the stance phase, the legs lift off the ground with Con = 0 (namely, lo rl V lo ,rl + lo rl = 0). At the moment 2 , the COM reaches the peak (Figure 12(b)), and, meanwhile, the pitching angle is zero (Figure 12(c)) during the first flight phase. Furthermore, with the stiffness compensation Δ , the front legs touch down the ground with td ft = 0.6 rad and = 0.1 m. Then, the front legs lift off the ground with Con = 0, (namely, lo fl V lo ,fl + lo fl = 0). Finally, at the moment 4 , the trunk reaches the second peak with V = 0 and = 0 during the second flight phase in Figure 12(a). Moreover, the controlled thrusts are calculated and shown in Figure 13; the legend "rt", "rl", "ft," and "fl" indicate the rt , rl , ft , and fl , respectively.

Scale Factor of Stability Criterion.
As shown in Section 3.1, the stability criterion is applicable for the parameters of a quadruped robot listed in Table 1. In this section, the applicability of the stability criterion is verified for several animals including cat, grey hound, lion, and horse, as their body weights vary from small to large [23][24][25][26][27][28]. The corresponding parameters are listed in Table 2.
As shown in Figure 14, the domestic cat also complies with the stability criterion. When the touchdown angle td rt is set as 0.07 rad, at the moment 3 , the bottom of the cat falls down on the ground which is an imbalance posture due to the less thrust provided by the hind limb during stance phase (Figure 14(a)). The balance posture conforming to the stability criterion equation (8) is shown in Figure 14 Figure 14(d) demonstrates the variation of zero time of pitching angle and peak time of COM with touchdown angle. As stated in Section 3.1, the closer are the two moments which are the zero time of the pitching angle and the peak time of COM, the better is the stability of the torso posture during the flight phase. As a result, the touchdown angle td rt at the intersection of the two curves could make the cat form a stable state during flight phase.
The imbalance and balance postures of greyhound, lion, and racehorse are shown in Figures 15∼17. All of the tests comply with the stability criterion equation (8). In addition, all the imbalance and balance postures are also similar to the cat. For instance, when the touchdown angle is smaller than the stable touchdown angle (STA) at the intersection of the zero time curve of pitching angle and the peak time curve of COM, the animals will emerge as an overlarge noseup pitching motion. Thereby, the bottom of the animals will contact the ground. On the contrary, if the touchdown angle is larger than the STA, the overlarge nose-down motion will emerge, and, consequently, the head will contact the ground or the body will generate a clockwise somersault during flight phase. The curves of pitching angle and height of COM vary from animal to animal, although there are same regulations of the tumble for them. Just because of the same regulations 8 Applied Bionics and Biomechanics  of the tumble of greyhound, lion, and racehorse as cat, their imbalance and balance postures will not be elaborated again.

The Applicability of the Stability Criterion for the Animals with Special Body
Size. The basset hound and the giraffe are two special animals for the length proportion between leg and torso. The legs of basset hound are much shorter than the torso, while the legs of giraffe are much longer than the torso. The lengths of leg and torso are listed in Table 2. Therefore, we test the applicability of the stability criterion for the two animals in this section. The imbalance and balance postures of basset hound are shown in Figure 18. The overlarge nose-up motion of basset hound emerges which is induced by the small thrust when the touchdown angle is less than the STA. As a result, the bottom of the basset hound will contact the ground when the touchdown angle is set as 0.2 rad (Figure 18(a)). The stable state emerges when the touchdown angle of hind limb is set as 0.4 rad which is equal to the STA. Meanwhile, the zero time of pitching angle that is the peak time of COM is 0.26 s (Figures  18(b) and 18(e)). When the touchdown angle is larger than the STA, the nose-down motion of basset hound emerges. Then, the head contacts the ground when the touchdown angle is set as 0.49 rad (Figure 18(c)). When the touchdown angle is set as 0.78 rad, the zero time of pitching angle and the peak time of COM are very close (Figure 18(e)). According to the stability criterion, the posture of basset hound is almost stable with a touchdown angle of 0.78 rad (Figure 18(d)).
The imbalance and balance postures of giraffe are shown in Figure 19. There are two intersections between the zero time curve of the pitching angle and peak time curve of COM. Therefore, there are two STAs for the given mechanical parameters and initial values of giraffe listed in Table 2. The first STA is 0.34 rad, and the second one is 0.50 rad. All of the instable touchdown angles are divided into three sections by the two STAs. The peak time of COM is earlier than the zero time of pitching angle when the touchdown angle is less than the first STA or larger than the second STA (Figure 19(f)). As a result, the torso emerges as a positive angle when the giraffe is at the peak time of COM; at last, the backward somersault is generated (Figures 19(a) and 19(e)). The two STAs result in different stable states, and the height of COM and the amplitude of the pitching angle with the second STA are both larger than those with the first STA. That is the larger thrust is exerted by the hind limb with the second STA (Figures 19(b)  and 19(d)). The peak time of COM is later than the zero time of pitching angle when the touchdown angle is set inside the range between the first and second STAs. Consequently, the torso emerges as a negative angle when the giraffe is at the peak time of COM. Finally, the imbalance postures with an overlarge nose-down motion are achieved (Figure 19(c)).

The Stability Analysis with the Shift of COM.
The COM of the carnivore will be shifted when it runs with a prey in its mouth. The running dynamics will be changed with the displacement of COM. So, we analyze the influence of the COM shift on the stability and dynamics of carnivore. The additional mass is in the mouth of the carnivore and varies from 0 to 75 kg. The largest additional mass is twelve percent of the carnivore mass. The ratio between additional weight and carnivore weight can mimic the case that the carnivores hold a prey in the mouth. The simplified force diagram is shown in Figure 20, where indicates the body mass of  prey and indicates the body mass of the carnivore. The simulation parameters and the initial values of the carnivore are shown in Table 1.
All of the simulations comply with the stability criterion equation (8) when the additional mass varies from 0 to 75 kg. However, the stable point, that is, the intersection of the zero time curve of pitching angle and the peak time curve of COM, increases almost linearly with the increasing of the prey weight ( Figure 21). In other words, the larger the prey weight, the larger the STA and the longer the time needed to achieve the stable state. As a result, larger thrusts provided by the hind limb are needed. However, as shown in Figure 21, the zero time of pitching angle varies from 0.2565 to 0.2632 s, and the time difference of 0.0067 s is a very small interval. The same case emerges in the STA which varies from 0.315 to 0.365 rad. Hence, the angular difference (namely, 0.05 rad) is also a small interval. In conclusion, the influence induced by the COM shift is so little that it could be even neglected.

The Control Strategy
Based on Passive Dynamics. The structural parameters of a robot have been fixed when the dynamic model is built; in this case, the stable running could be achieved by adjusting the stiffness and the touchdown angle of leg when the initial conditions are given [21]. When the quadruped robot exposes an imbalance posture with the instable touchdown angle, the leg stiffness is adjusted to compensate the attitude deviation. On the contrary, when the robot exposes an imbalance posture for certain leg stiffness, touchdown angle could be adjusted to compensate the attitude deviation. The latter method is same as the process in which we achieve the stability criterion. At last, both of the control methods comply with the stability criterion equation (8). In this paper, the dynamic equation of the robot is simulated passively which could reveal the inherent dynamic characteristics of the robot. Meanwhile, the control method presented in this paper is also based on the passive dynamics. If a robot runs with the passive stable state, just as the state meets the stability criterion of (8), then it needs a little control action to maintain the stable running [11]. Additionally, the strength of the control action varies monotonously with the deviation degree between the zero time of pitching angle and the peak time of COM. Although the model simulated in our study is simple, the stability criterion is instructive for the design theory and the control strategy of robot.

Conclusions
In the paper, a stability criterion is presented based on the passive dynamic galloping. First, the dynamical model of the quadruped robot is constructed on the basis of the energy conservation law. Through the mathematical model, the imbalance and balance postures of a passive quadruped robot are analyzed. Then, a necessary and sufficient balance condition that is the stability criterion is attained. In addition, the validity of the stability criterion is verified against cat, greyhound, lion, and racehorse with the body weight varying from small to large. Besides, the stability criterion is applicable to the basset hound and giraffe, whose legs are much shorter or much longer than the torso. Furthermore, the applicability of the stability criterion is verified when the carnivore holds a prey in its mouth. The results support the conclusion that the influence of the COM shift on the stability criterion is almost negligible. Next, the controlled thrust is obtained with an optimization dichotomy algorithm for seeking the zero point of the stability criterion when the animal exposes imbalance postures. Finally, the imbalance postures of a galloping gait are stabilized with the controlled

Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.