# Calculation of the Center of Mass Position of Each Link of Multibody Biped Robots
## 3 Second Theoretical Formulation
### Implementation of the Analytical Formulation  
The example shown in Figure 4 has four unknown parameters (\(r_{b}\), \(l_{b}\), \(r_{c}\), \(l_{c}\)), but four linearly independent equations can be obtained by the formulas shown in Section 3.1. In this case, we suppose to have \(m_{a}\), \(m_{b}\), \(m_{c}\), \(r_{a}\), \(l_{a}\), as input. Figure 5 shows in details the configurations \(b\) and \(c\) shown in Figure 4. In particular, the four unknown parameters (\(r_{b}\), \(l_{b}\), \(r_{c}\), \(l_{c}\)) which should be determined using analytical formulation are found using polar coordinates. \(\overset{\rightarrow}{\boldsymbol{t}}_{b}\) and \(\overset{\rightarrow}{\boldsymbol{t}}_{c}\) are the position vectors of the mass \(m_{w}\) respect to the local reference system \(P\)-\(X_{P}Y_{P}Z_{P}\) and respectively of the configuration \(b\) and \(c\). \(\overset{\rightarrow}{\boldsymbol{s}}_{b}\) and \(\overset{\rightarrow}{\boldsymbol{s}}_{c}\) are respectively the position vectors of the masses, \(m_{b}\) and \(m_{c}\), respect to the local reference system of each link.  
Using (22), \(Z_{2b}\), \(X_{2b}\), and \(Z_{2c}\), \(X_{2c}\), can be calculated as shown in following  
\[\left\{\begin{array}{c}Z_{2b}=f(\theta_{b},m_{2},\beta_{b},\theta_{a},\alpha_ {a},m_{a},l_{a},L_{a},r_{a},\alpha_{b})\\ X_{2b}=\alpha_{b}+\beta_{b}\cdot Z_{2b}\end{array}\right. \tag{28}\]  
\[\left\{\begin{array}{c}Z_{2c}=f(\theta_{c},m_{2},\beta_{c},\theta_{a},\alpha_ {a},m_{a},l_{a},L_{a},r_{a},\alpha_{c})\\ X_{2c}=\alpha_{c}+\beta_{c}\cdot Z_{2c}\end{array}\right. \tag{29}\]  
Using (23)-(25), \(r_{wb}\), \(l_{wb}\), and \(r_{wc}\), \(l_{wc}\), can be determined (see Figure 5) and the modules and angles of the two position vectors (\(\overset{\rightarrow}{\boldsymbol{t}}_{b}\) and \(\overset{\rightarrow}{\boldsymbol{t}}_{c}\)) are found  
\[r_{wb}=\frac{X_{2b}\cdot m_{2}-m_{u}\cdot r_{u}}{m_{w}};\;l_{wb}= \frac{Z_{2b}\cdot m_{2}-m_{u}\cdot l_{u}}{m_{w}}-L_{a} \tag{30}\] \[r_{wc}=\frac{X_{2c}\cdot m_{2}-m_{u}\cdot r_{u}}{m_{w}};\;l_{wc}= \frac{Z_{2c}\cdot m_{2}-m_{u}\cdot l_{u}}{m_{w}}-L_{a}\] (31) \[t_{b}=\sqrt{r_{wb}^{2}+\left(l_{wb}+L_{a}\right)^{2}};\;\chi_{b} =\tan^{-1}\biggl{(}\frac{r_{wb}}{\left(l_{wb}+L_{a}\right)}\biggr{)}\] (32) \[t_{c}=\sqrt{r_{wc}^{2}+\left(l_{wc}+L_{a}\right)^{2}};\;\chi_{c} =\tan^{-1}\biggl{(}\frac{r_{wc}}{\left(l_{wc}+L_{a}\right)}\biggr{)} \tag{33}\]  
Using (26) and (27), the modules of the position vectors \(\overset{\rightarrow}{\boldsymbol{s}}_{b}\) and \(\overset{\rightarrow}{\boldsymbol{s}}_{c}\) (respectively the position vectors of the masses \(m_{b}\) and \(m_{c}\) respect to the local reference system of each link) are determined. In the following, detailed equations are shown which can determine the four unknown parameters (\(r_{b}\), \(l_{b}\), \(r_{c}\), \(l_{c}\)).  
Figure 5: Example for implementing the formula.  
Another advantage of the formulation presented in this paper, as underlined in the first section, is that if the total CoM position of the platform is known a priori, the first formulation proposed in [2,3] and shown in Section 2 of this paper can be bypassed and the CoM positions of each link of the platform can be calculated analytically without using force-torque sensors and motor's torque. In this case, only the formulation of the Section 3 can be used.