*3.1. Energy Model*

In order to analyze the energy consumption conditions of SCalf, the energy model must be established. For SCalf, the calculation of the energy consumption is obtained by the integration of the joint power. The joint power consists of the mechanical power and heat rate, as shown in Equation (34), where *T* is the gait cycle, *E* is the energy consumption in one gait cycle, and *P* is the joint power.

$$\begin{split} E &= \int\_{0}^{T} Pdt\\ &= \int\_{0}^{T} (|\tau \dot{\theta}| + f\_{f} \dot{\mathbf{x}}\_{p}) dt \end{split} \tag{34}$$

In the second line of Equation (34), *f <sup>f</sup>* and *x*˙ *<sup>p</sup>* are the friction and piston velocity of the hydraulic cylinder, respectively. The joint torque *τ* can be acquired by the dynamics analysis.

The structure of the hydraulic actuator is shown in Figure 4. The displacement and force of the piston can be measured by the position and force sensors. The motions of the piston are controlled by the servo valve.

**Figure 4.** The structure of the hydraulic actuator.

The friction of hydraulic cylinders are strongly coupled by many parameters, and it has a high nonlinearity. It depends on many conditions like the cylinder velocity *x*˙ *<sup>p</sup>*, the pressure difference Δ*p* across the piston and possibly on the cylinder position *xp*, and the temperature *t* [15]. The SCalf uses the asymmetry cylinders to realize the joint motions. The model parameters are different when the actuator are extending or shorting. According to the research made by Nissing, the model of the hydraulic frictions can be written in Equation (35) [16].

$$f\_f(\dot{\mathbf{x}}\_p) = \begin{cases} B^+ \dot{\mathbf{x}}\_p + \left( F\_{c0}^+ + F\_{s0}^+ e^{-\frac{|\dot{x}\_p|}{C\_s^+}} \right), \dot{\mathbf{x}}\_p > 0 \\\\ B^- \dot{\mathbf{x}}\_p - \left( F\_{c0}^- + F\_{s0}^- e^{-\frac{|\dot{x}\_p|}{C\_s^-}} \right), \dot{\mathbf{x}}\_p < 0 \end{cases} \tag{35}$$

In Equation (35), *B* is the viscous friction coefficient (Ns/m), *Fc*<sup>0</sup> is the Coulomb friction coefficient (N), *Fs*<sup>0</sup> is the static friction coefficient (N), and *CS* is the attenuation coefficient of static friction. Using the measured result made by Polzer et al. [17], the parameters in Equation (35) can be obtained as follows. When *x*˙ *<sup>p</sup>* ≥ 0, *B* = 220 Ns/m, *Fc*<sup>0</sup> = 50 N, *Fs*<sup>0</sup> = 30 N and *Cs* = 0.015 m/s. When *x*˙ *<sup>p</sup>* < 0, *B* = 180 Ns/m, *Fc*<sup>0</sup> = 50 N, *Fs*<sup>0</sup> = 20 N, and *Cs* = 0.007 m/s.

The cylinder velocities can be obtained by the differential of cylinder lengths. The cylinder lengths can be calculated by the mechanical parameters in Figure 5 and Table 2.

**Figure 5.** The mechanical structure parameters of the leg.

**Table 2.** The mechanical parameters used in Figure 5.


The relationship between the cylinder lengths and mechanical parameters are shown in Equation (36)

$$\begin{cases} c\_1 = \sqrt{a\_1^2 + b\_1^2 - 2a\_1b\_1\cos(-\theta\_1 + \frac{\pi}{2} - c\_1 - c\_2)}\\ c\_2 = \sqrt{a\_2^2 + b\_2^2 - 2a\_2b\_2\cos(-\theta\_2 + \pi - c\_3 + c\_4)} \end{cases} \tag{36}$$

#### *3.2. Energetic Criterion*

In order to evaluate the energy consumptions of robot motions, the corresponding energetic criterion should be designed.

In this paper, a criterion called energy cost is considered. The energy cost *Ecost* is defined as the energy consumption for a unit distance. It represents the energy consumption of the robot movements intuitively. It is defined by assuming that the negative work produced by the actuators are dissipated.

$$E\_{\rm cost} = \frac{1}{\mathbf{x}(T) - \mathbf{x}(0)} \int\_{0}^{T} \mathbf{P}dt \quad [f/m] \tag{37}$$

#### **4. The Foot Trajectory Analysis**

The SCalf team has already done some research on the gait trajectory planning [18–20], but they only considered the situations under the duty cycle as 50%. In this paper, a more general trot gait trajectory is proposed. In the trot gait, *S* is the step length, *T* is the gait cycle, *H* is the step height, and *H*<sup>0</sup> is the standing height, as illustrated in Figure 6. *β* is the duty cycle of the trot gait. The velocity of the robot *vr* can be obtained by the step length *S* and the gait cycle *T* by using Equation (38).

**Figure 6.** The illustration of the gait parameters.

*+*

*6*

During the movements of the robot, the legs will swing periodically with respect to the trunk. In order to make the quadruped robot walk at a steady speed, this work realizes the trajectory planning of the robot by simulating the trajectory of the quadruped animals' feet. Based on the motions of the horses, a foot trajectory including the cubic spline interpolation curve and the straight line is studied. The phases of the four legs are shown in Figure 7, where the two feet on the diagonal have the same movements.

**Figure 7.** The leg phases of the trot gait.

Here, the trajectory of the RF leg is analyzed. During the stance phase, the trunk of the robot is moving forward. According to Equations (16), (22), and (34), in order to minimize the energy consumption, joint torques have to be as small as possible. Then, the first component of *M*, which is *Fx* = *Ma*, have to be small. Therefore, the trunk acceleration *a* is set as zero, and the motions of the stance phase become uniform motions in the *x* direction. The positions in the *z* direction are equal to −*H*0. The trajectory equation of the stance phase in the coordinate frame {*Ob*} can be obtained in Equation (39).

$$\begin{cases} x(t) = \frac{S}{2} (1 - \frac{2t}{\beta T}) \\ z(t) = -H\_0 \end{cases}, \quad 0 < t \le \beta T \tag{39}$$

In order to obtain the parameters of the foot trajectory during the swing phase, the initial and terminated conditions of the stance phase are listed in Table 3, including the positions and velocities of the foot endpoint in the *x* and *z* directions.


**Table 3.** The initial and terminated conditions of the stance phase.

In the swing phase, the cubic spline interpolation and the cosine curve are used in the *x* and *z* directions respectively. In the trajectory expression of the *x* direction, the coefficients of the cubic equation are obtained from the data in Table 3. For the cosine curve in the *z* direction, the foot endpoint reaches the curve's top in the middle of the swing phase. According to the above conditions, the foot trajectory can be written in Equation (40).

$$\begin{cases} x(t) = \frac{S}{2} (a\_3 t^3 + a\_2 t^2 + a\_1 t + a\_0) \\ z(t) = -H\_0 + \frac{H}{2} \left\{ 1 - \cos \left[ \frac{2 \pi t}{(1 - \beta T)} - \frac{2 \pi \beta}{(1 - \beta)} \right] \right\}' \end{cases} \quad \nexists T < t \le T \tag{40}$$

where

$$\begin{cases} \gamma = \left(\beta - 1\right)^{3} \\ a\_{0} = \frac{\left(\beta^{3} - \beta^{2} - 3\beta - 1\right)}{\gamma} \\ a\_{1} = \frac{-2\left(\beta^{3} - 3\beta^{2} - 3\beta - 1\right)}{\gamma\beta^{7}} \\ a\_{2} = \frac{-6\left(\beta + 1\right)}{\gamma\beta^{7}T^{2}} \\ a\_{3} = \frac{4}{\gamma\beta^{7}T^{3}} \end{cases} \tag{41}$$

The curves of the foot trajectory are shown in Figure 8, including the curves of the *x* direction, of the *z* direction, and in coordinate frame {*Oh*}. Here, the gait parameters are chosen as follow: *S* = 0.25 m, *T* = 0.5 s, *H* = 0.08 m, *H*<sup>0</sup> = 0.5 m, and *β* = 0.3.

**Figure 8.** The foot trajectory curves.

The advantages of this foot trajectory are listed as follows:

(a) When gait phases switch, the velocities of the foot endpoint are zero, which can eliminate the collisions between the foot and the ground.

(b) The trunk velocity and the velocity of the swing leg are changing with no mutation.

(c) At the beginning and end of the swing phases, the foot endpoint will move back some distance, which can improve the ability of the robot to move over obstacles and to adapt to certain undulating grounds.

#### **5. Simulations**

In this section, we will study the influences of different gait parameters on the energy consumptions. The four legs of the SCalf have the same structure and mechanical parameters; therefore, the energy consumption of the RF leg can be regarded as a quarter of the total energy consumption.

A set of experiments are implementing in MATLAB. The total energy consumptions as well as the energy consumptions during the stance and swing phases using different gait parameters are calculated, and the energetic criterion is used to evaluate the robot motions. The flow chart of the simulation is illustrated in Figure 9.

In the simulations, the robot trunk can be regarded as a cuboid, and the mass of trunk is *M* = 200 kg. The distances between the origins of {*Ob*} and {*Oh*} in the *x* and *z* directions are 0.68 m and 0.15 m respectively, which are used to confirm the position of the foot endpoints in {*Ob*}.

Different gait parameters such as step length *S*, gait cycle *T*, step height *H*, standing height *H*0, and duty cycle *β* are studied in this section. The default values of the gait parameters are listed in Table 4. Under the default condition, the velocity of the robot is 1 m/s.

**Figure 9.** The flow chart of the simulation.

**Table 4.** The default values of the gait parameters.

