*2.2. The Dynamics Modelling*

In order to obtain the energy consumptions of the robot, the joint torques must be acquired. The RF leg is used to build the dynamics model of the robot. The standard form of the dynamic equation can be written as Equation (5), where *D*(*θ*) is the inertia matrix, *H*(*θ*, *θ*˙) is the Coriolis and centrifugal forces matrix, and *G*(*θ*) is the gravitational loading vector.

$$\pi\_{\!\!\!\!/} = D(\theta)\ddot{\theta} + H(\theta, \theta)\dot{\theta} + G(\theta) \tag{5}$$

In the dynamics equation of Equation (5), the inertia matrix *D*(*θ*) is a 2 × 2 matrix and can be written as follows:

$$D(\theta) = \begin{bmatrix} D\_{11}(\theta) & D\_{12}(\theta) \\ D\_{21}(\theta) & D\_{22}(\theta) \end{bmatrix} \tag{6}$$

where

$$D\_{11}(\theta) = l\_1 + l\_2 + m\_1 l\_{m1}^2 + m\_2 (l\_1^2 + l\_{m2}^2 + 2l\_1 l\_{m2} \cos \theta\_{c2}) \tag{7}$$

$$D\_{12}(\theta) = D\_{21}(\theta) = m\_2 l\_{m2}^2 + m\_2 l\_1 l\_{m2} \cos \theta\_{c2} + I\_2 \tag{8}$$

$$D\_{22}(\theta) = m\_2 l\_{m2}^2 + I\_2 \tag{9}$$

The Coriolis and centrifugal forces matrix *H*(*θ*, *θ*˙) is shown in Equation (10).

*Appl. Sci.* **2019**, *9*, 1771

$$H(\theta,\theta) = \begin{bmatrix} H\_{11}(\theta,\dot{\theta}) & H\_{21}(\theta,\dot{\theta}) \\ H\_{12}(\theta,\dot{\theta}) & H\_{22}(\theta,\dot{\theta}) \end{bmatrix} \tag{10}$$

where

$$H\_{11}(\theta,\theta) = -\theta\_2 m\_2 l\_1 l\_{m2} \sin \theta\_{\ell 2} \tag{11}$$

$$H\_{12}(\theta,\dot{\theta}) = -(\dot{\theta}\_1 + \dot{\theta}\_2) m\_2 l\_1 l\_{m2} \sin \theta\_{\ell 2} \tag{12}$$

$$H\_{21}(\theta, \dot{\theta}) = \dot{\theta}\_1 m\_2 l\_1 l\_{m2} \sin \theta\_{c2} \tag{13}$$

$$H\_{22}(\theta, \dot{\theta}) = 0\tag{14}$$

The gravitational loading vector *G*(*θ*) is

$$\mathbf{G}(\boldsymbol{\theta}) = \begin{bmatrix} m\_1 g l\_{m1} \sin \theta\_{\ell 1} + m\_2 g (l\_1 \sin \theta\_1 + l\_{m2} \sin \theta\_{\ell 12}) \\ m\_2 g l\_{m2} \cos \theta\_{\ell 12} \end{bmatrix} \tag{15}$$

In the above equations, *θε*<sup>1</sup> = *θ*<sup>1</sup> + *ε*1, *θε*<sup>2</sup> = *θ*<sup>2</sup> + *ε*2, and *θε*<sup>12</sup> = *θ*<sup>1</sup> + *θ*<sup>2</sup> + *ε*2.

Equation (5) shows the situation with no contact between the feet and the ground. When considering the ground reaction force, the dynamics model of the single leg changes to Equation (16), where *FG* is the ground reaction force vector. The calculation of *FG* will be introduced in the next part.

$$\boldsymbol{\pi} - \boldsymbol{J}\_G^T \mathbf{F}\_G = \boldsymbol{D}(\boldsymbol{\theta}) \ddot{\boldsymbol{\theta}} + \boldsymbol{H}(\boldsymbol{\theta}, \dot{\boldsymbol{\theta}}) \dot{\boldsymbol{\theta}} + \boldsymbol{G}(\boldsymbol{\theta}) \tag{16}$$
