## 2 Robot Modelling
### 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 \(\mathbf{D}(\mathbf{\theta})\) is the inertia matrix, \(\mathbf{H}(\mathbf{\theta},\dot{\mathbf{\theta}})\) is the Coriolis and centrifugal forces matrix, and \(\mathbf{G}(\mathbf{\theta})\) is the gravitational loading vector.  
\[\mathbf{\tau_{J}}=\mathbf{D}(\mathbf{\theta})\ddot{\mathbf{\theta}}+\mathbf{H}(\mathbf{\theta},\dot{ \mathbf{\theta}})\dot{\mathbf{\theta}}+\mathbf{G}(\mathbf{\theta}) \tag{5}\]  
In the dynamics equation of Equation (5), the inertia matrix \(\mathbf{D}(\mathbf{\theta})\) is a \(2\times 2\) matrix and can be written as follows:  
\[\mathbf{D}(\mathbf{\theta})=\left[\begin{array}{cc}D_{11}(\theta)&D_{12}(\theta)\\ D_{21}(\theta)&D_{22}(\theta)\end{array}\right] \tag{6}\]  
where  
\[D_{11}(\theta)=I_{1}+I_{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}+ l_{2} \tag{8}\]  
\[D_{22}(\theta)=m_{2}l_{m2}^{2}+l_{2} \tag{9}\]  
The Coriolis and centrifugal forces matrix \(\mathbf{H}(\mathbf{\theta},\dot{\mathbf{\theta}})\) is shown in Equation (10).  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter (\(i\) = 1,2)** & **Thigh** & **Shank** \\ \hline Mass (\(m_{i}\)/Kg) & 4.10 & 2.24 \\ Length (\(l_{i}\)/mm) & 451.00 & 405.00 \\ COM position (\(l_{mi}\)/mm) & 210.43 & 227.20 \\ COM angle (\(\varepsilon_{i}\)/rad) & 0.037 & \(-\)0.083 \\ Moment of inertia (\(l_{i}\)/Kg\(\cdot\)m\({}^{2}\)) & 0.178 & 0.057 \\ \hline \hline \end{tabular}
\end{table}
Table 1: The parameters of the thigh and shank parts.  
\[\mathbf{H}(\mathbf{\theta},\mathbf{\theta})=\left[\begin{array}{cc}H_{11}(\theta,\theta)&H_{21 }(\theta,\dot{\theta})\\ H_{12}(\theta,\dot{\theta})&H_{22}(\theta,\dot{\theta})\end{array}\right] \tag{10}\]  
where  
\[H_{11}(\theta,\dot{\theta})=-\dot{\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_{\ell 2} \tag{13}\]  
\[H_{22}(\theta,\dot{\theta})=0 \tag{14}\]  
The gravitational loading vector \(\mathbf{G}(\mathbf{\theta})\) is  
\[\mathbf{G}(\mathbf{\theta})=\left[\begin{array}{c}m_{12}Sl_{m1}sin\theta_{\ell 1}+m_{ 2}g(l_{1}sin\theta_{1}+l_{m2}sin\theta_{\ell 12})\\ m_{2}gl_{m2}cos\theta_{\ell 12}\end{array}\right] \tag{15}\]  
In the above equations, \(\theta_{\ell 1}=\theta_{1}+\varepsilon_{1}\), \(\theta_{\ell 2}=\theta_{2}+\varepsilon_{2}\), and \(\theta_{\ell 12}=\theta_{1}+\theta_{2}+\varepsilon_{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 \(F_{G}\) is the ground reaction force vector. The calculation of \(F_{G}\) will be introduced in the next part.  
\[\mathbf{\tau}-J_{G}^{T}\mathbf{F_{G}}=\mathbf{D}(\mathbf{\theta})\ddot{\mathbf{\theta}}+\mathbf{H}(\bm {\theta},\dot{\mathbf{\theta}})\dot{\mathbf{\theta}}+\mathbf{G}(\mathbf{\theta}) \tag{16}\]