*3.2. Stability*

The influence of different configurations on landing stability is determined by the shortest distance from the ground projection point of the center of mass to each side of the supporting polygon (*d*) and the area of the supporting polygon (*S*). The dimensionless index *SAI* is proposed to evaluate the stability of each configuration and is written as follows:

$$SAI = \frac{d}{d\_{VI}} \* \frac{S}{S\_{VI}}\tag{3}$$

where *dV I* and *SV I* are the values of *d* and *S* in normal six-legged landing configuration VI, respectively. If the center of mass is within the supporting polygon, then *d* > 0. On the contrary, *d* < 0.

Eventually, the *SAI* value in each configuration can be calculated because the legs are deployed to the predetermined position from the folded status for the buffer landing. According to the *SAI*, the configuration stabilities will be divided into three statuses: stable, critical stable and unstable, and can be written as follows:

$$SS = \begin{cases} \begin{array}{c} Stable \left(S\right), \quad if \ SAI > 0; \\\ Crritical \text{ Stable (CS)}, \quad if \ SAI = 0; \\\ \begin{array}{c} \text{Unstable (LIS)}, \quad if \ SAI < 0. \end{array} \end{cases} \tag{4}$$

As seen in Table 3, the stable configurations have eight cases: VI-1, V-1, V-2, IV-2, IV-3, IV-4, IV-6 and III-4, in which the robot can execute fault-tolerant landing. The critical stable configurations have five cases: IV-1, IV-5, III-2, III-3 and III-5. In these cases, the robot can only perform soft-landing if the landing site is absolutely even. The unstable configurations include III-1 and III-6. Owing to the irregular lunar surface, the lander cannot finish soft-landing under both critical stable and unstable configurations.


**Table 3.** Stability evaluation results of landing configurations.

#### *3.3. Relationship between Fault Number and Configuration*

When the number of faulted IDUs is *Nm*, all the possible configurations will be concluded by the following equation:

$$\begin{cases} \sum\_{i=1}^{3} N\_i \cdot i = N\_m\\ \sum\_{i=1}^{3} N\_i = N\_L \end{cases} \tag{5}$$

$$\text{s.t.} \begin{cases} \begin{array}{l} 0 \le N\_L \le \min\{6, N\_m\} \\ 0 \le N\_m \le 18 \\ 0 \le N\_l \le 6, \ i = 1, 2, 3 \end{array} \end{cases} \tag{6}$$

where *Ni* is the number of legs with i faulted IDUs, *NL* is the total number of failed legs. The solve set 3 *N*1, *N*2, *N*<sup>3</sup> 4 illustrates the faults distribution. Considering the faulttolerant capacity of a single leg in Table 1, we can get the possible configuration details. When *Nm* is 1, the solve set is 3 1, 0, 0 4 . The landing configuration is VI if the failed leg is E11. On the contrary, the landing configuration is V if the failed leg is E12. Similarly, when *Nm* is 2, there are two solve sets. Different fault leg groups will result in VI, V, or IV configuration. Table 4 lists all possible landing configurations when the number of faulted IDUs is less than seven. Lastly, we can get landing configuration type II by substituting the number of failed legs into Table 2. If the faulted number is more than six, the combination results can be obtained by the above Equations (5) and (6), similarly.


⎪⎪⎨ ⎪⎪⎩

**Table 4.** Fault combination results.

#### **4. Fault-Tolerant Landing Algorithms**

During the buffer landing period, the force and torque equations of the lander can be written as: ⎧

$$\begin{aligned} F\_{cz} &= m\_b g + \sum\_{i=1}^{N} F\_{\mathbb{S}^{iz}} \\ \mathsf{r}\_{\mathsf{exp}} &= \sum\_{i=1}^{N} \left( r\_{\mathsf{c}} + r\_{bfi} \right) \times F\_{\mathbb{S}^{iz}} \end{aligned} \tag{7}$$

where *mb* is the mass of the lander, *g* is the gravity acceleration on the moon, *N* is the number of normal supporting legs, *Fgiz* is the vertical supporting force of the i-th leg, *rc* is the vector from the center of mass to the origin *Ob* of the body coordinate frame, *rbfi* is the vector from *Ob* to the i-th foothold, *Fgiz* <sup>=</sup> 0 0 *Fgiz <sup>T</sup>* is the vector form of *Fgiz*, *Fez* and *<sup>τ</sup>exy* <sup>=</sup> *<sup>τ</sup>ex <sup>τ</sup>ey <sup>T</sup>* are dividedly the resultant force and torque.

By adjusting the leg force *Fgiz*, we can control the stable body states. After landing, we desire a constant body height and a horizontal body plane. The *Fez* will be set to zero and the *τexy* will be employed to control the angle deviation of pitch and roll. The PID controller will generate the adjusted torque in real-time. Considering the desired stable values of angle and angular velocity are zero, the *τexy* will be calculated from the following equation:

$$\begin{cases} \ \tau\_{ex} = -k\_{px}\theta\_{ra} - k\_{dx}\dot{\theta}\_{ra} - k\_{ix}\int \theta\_{ra}dt\\ \ \tau\_{cy} = -k\_{py}\theta\_{pa} - k\_{dy}\dot{\theta}\_{pa} - k\_{iy}\int \theta\_{pa}dt \end{cases} \tag{8}$$

where *kpx*, *kdx*, *kix*, *kpy*, *kdy* and *kiy* are the proportional, integral and derivative gains in the x-axis and y-axis, respectively. *<sup>θ</sup>ra* and *<sup>θ</sup>pa* are the actual angles of roll and pitch. . *<sup>θ</sup>ra* and . *θpa* are the corresponding velocities.

#### *4.1. VI Configuration*

In six-legged normal soft-landing, the force/torque balance equations can be written as follows in matrix form by substituting Equation (8) and *Fez* = 0 into Equation (7).

$$
\begin{bmatrix}
1 & 1 & 1 & 1 & 1 & 1 \\
 r\_{\rm ff} + \eta\_{\rm f}\eta\_{\rm f} & r\_{\rm ff} + \eta\_{\rm f}\eta\_{\rm f} & r\_{\rm ff} + \eta\_{\rm f}\eta\_{\rm f} & r\_{\rm ff} + \eta\_{\rm f}\eta\_{\rm f} & r\_{\rm cf} + \eta\_{\rm f}\eta\_{\rm f} \\
 r\_{\rm ff} + r\_{\rm f}\eta\_{\rm f} & r\_{\rm cf} + r\_{\rm f}\eta\_{\rm f} & r\_{\rm cf} + \eta\_{\rm f}\eta\_{\rm f} & r\_{\rm cf} + r\_{\rm f}\eta\_{\rm f} & r\_{\rm cf} + \eta\_{\rm f}\eta\_{\rm f} \\
\end{bmatrix}
\cdot
\begin{bmatrix}
F\_{\rm f}\text{\underline{r}} \\
F\_{\rm f}\text{\underline{r}} \\
F\_{\rm f}\text{\underline{s}} \\
F\_{\rm f}\text{\underline{s}} \\
F\_{\rm f}\text{\underline{s}} \\
\end{bmatrix} = 
\begin{bmatrix}
\tau\_{\rm cr} \\
\tau\_{\rm cr} \\
\tau\_{\rm cy}
\end{bmatrix}
\tag{9}
$$

However, Equation (9) is an indeterminate equation group and has numerous solutions. It is time-consuming to solve the generalized inverse matrix in a real-time system. Here, a virtual three-legged supporting method (VTLSM) is proposed to allocate the adjusted force *Fgiz* quickly. As illustrated in Figure 7, we divide the six supporting legs into two groups: leg 1-3-5 supporting (group A) and leg 2-4-6 supporting (group B). During buffer landing, the legs of each group provide half the adjusted force and torque. Then Equation (9) can be rewritten as follows:

$$
\begin{bmatrix} 1 & 1 & 1 \\ r\_{\rm cy} + r\_{\rm bfxy} & r\_{\rm cy} + r\_{\rm bfmy} & r\_{\rm cy} + r\_{\rm bfny} \\ r\_{\rm cx} + r\_{\rm bfnx} & r\_{\rm cx} + r\_{\rm bfnx} & r\_{\rm cx} + r\_{\rm bfnx} \end{bmatrix} \cdot \begin{bmatrix} F\_{\rm gkx}^{kmn} \\ F\_{\rm gmz}^{kmn} \\ F\_{\rm gz}^{kmn} \end{bmatrix} = \frac{1}{2} \begin{bmatrix} -m\_b g \\ \tau\_{\rm cx} \\ \tau\_{\rm cy} \end{bmatrix} \tag{10}
$$

where *k*, *m* and *n* are the number of supporting legs in each group. Particularly, *k* = 1, *m* = 3 and *n* = 5 in group A while *k* = 2, *m* = 4 and *n* = 6 in group B. Lastly, the indeterminate Equation (9) is transformed into a two determinate Equation (10) that will generate the adjusted foot force *Fgiz* easily in real-time by solving the inverse matrix of a 3 × 3 matrix.

**Figure 7.** Virtual three-legged supporting method (VTLSM).

The desired torque of the joint impedance controller in Equation (2) comes from the following equation:

$$\boldsymbol{\pi}\_{\rm des} = \boldsymbol{J}(\boldsymbol{q})\_f^{-1} \mathbf{F}\_{\rm \mathcal{S}} \tag{11}$$

where *Fg* <sup>=</sup> 0 0 *Fgz <sup>T</sup>* is the vector form of adjusted leg force and *<sup>J</sup>*(*q*)*<sup>f</sup>* is the force Jacobian matrix.

#### *4.2. V Configuration*

As for five-legged landing, the 3 × 6 coefficient matrix in Equation (9) will be transformed into a 3 × 5 matrix that is still indeterminate. Here we chose configuration V-2 to illustrate the allocated process of leg forces. The force/torque balance equations are written as:

$$
\begin{bmatrix} 1 & 1 & 1 & 1 & 1 \\ 
 r\_{\mathcal{G}\mathcal{Y}} + r\_{\mathcal{bf}\mathcal{Y}\mathcal{Y}} & r\_{\mathcal{G}\mathcal{Y}} + r\_{\mathcal{bf}\mathcal{Y}\mathcal{Y}} & r\_{\mathcal{G}\mathcal{Y}} + r\_{\mathcal{bf}\mathcal{Y}\mathcal{Y}} & r\_{\mathcal{G}\mathcal{Y}} + r\_{\mathcal{bf}\mathcal{Y}\mathcal{Y}} & r\_{\mathcal{G}\mathcal{Y}} + r\_{\mathcal{bf}\mathcal{Y}\mathcal{Y}} \\ 
 r\_{\mathcal{c}\mathcal{X}} + r\_{\mathcal{bf}\mathcal{X}\mathcal{Y}} & r\_{\mathcal{c}\mathcal{X}} + r\_{\mathcal{bf}\mathcal{Z}\mathcal{X}} & r\_{\mathcal{c}\mathcal{X}} + r\_{\mathcal{bf}\mathcal{X}\mathcal{Y}} & r\_{\mathcal{c}\mathcal{X}} + r\_{\mathcal{bf}\mathcal{Y}\mathcal{X}} \\ 
\end{bmatrix} \cdot \begin{bmatrix} F\_{\mathcal{S}\mathcal{Y}z} \\ F\_{\mathcal{S}\mathcal{Z}z} \\ F\_{\mathcal{S}\mathcal{Z}z} \\ F\_{\mathcal{S}^{\mathcal{G}\mathcal{Z}z}} \\ F\_{\mathcal{S}^{\mathcal{G}\mathcal{Z}z}} \\ F\_{\mathcal{S}^{\mathcal{G}\mathcal{Z}z}} \end{bmatrix} = \begin{bmatrix} -m\_{\mathcal{b}}\mathcal{g} \\ \tau\_{\mathcal{c}\mathcal{X}} \\ \tau\_{\mathcal{c}\mathcal{g}} \\ \end{bmatrix} \\ \tag{12}$$

The VTLSM will be again used to quickly solve the foot force. There are ten virtual triangles (C3 <sup>5</sup> = 10) constructed by any three supporting legs. They are divided into two cases according to the ground projected position of the center of mass of the lander. If this point is inside the virtual supporting triangles, these triangles are valid, and the number of them is *Nv*. On the contrary, if the others are invalid and their number is *Ni*. The supporting legs of the valid triangle are leg 1-2-4, leg 1-2-5, leg 1-3-4, leg 1-4-5, leg 2-3-5 and leg 2-4-5, while the ones of the invalid triangle are leg 1-2-3, leg 2-3-4 and leg 3-4-5. Then the *Nv* is seven and *Ni* is three. Meanwhile, the Equation (10) is modified as follows:

$$
\begin{bmatrix} 1 & 1 & 1 \\ r\_{\rm cy} + r\_{\rm bfxy} & r\_{\rm cy} + r\_{\rm bfmy} & r\_{\rm cy} + r\_{\rm bfny} \\ r\_{\rm cx} + r\_{\rm bfnx} & r\_{\rm cx} + r\_{\rm bfnx} & r\_{\rm cx} + r\_{\rm bfnx} \end{bmatrix} \begin{bmatrix} F\_{\rm gzn}^{kmn} \\ F\_{\rm gzn}^{kmn} \\ F\_{\rm gwz}^{kmn} \end{bmatrix} = \frac{1}{N\_{\rm v}} \begin{bmatrix} -m\_{\rm b} \mathfrak{g} \\ \tau\_{\rm tx} \\ \tau\_{\rm cy} \end{bmatrix} \tag{13}
$$

Noticeably, the i-th supporting leg provides adjusted force in multiple valid triangles, so we will obtain the eventual foot force by the following sum operation:

$$\begin{cases} F\_{\mathbb{S}1z} = F\_{\mathbb{S}1z}^{124} + F\_{\mathbb{S}1z}^{125} + F\_{\mathbb{S}1z}^{134} + F\_{\mathbb{S}1z}^{135} + F\_{\mathbb{S}1z}^{145} \\ F\_{\mathbb{S}2z} = F\_{\mathbb{S}2z}^{124} + F\_{\mathbb{S}2z}^{125} + F\_{\mathbb{S}2z}^{235} + F\_{\mathbb{S}2z}^{245} \\ F\_{\mathbb{S}3z} = F\_{\mathbb{S}3z}^{134} + F\_{\mathbb{S}3z}^{135} + F\_{\mathbb{S}2z}^{235} \\ F\_{\mathbb{S}4z} = F\_{\mathbb{S}4z}^{124} + F\_{\mathbb{S}4z}^{134} + F\_{\mathbb{S}4z}^{145} + F\_{\mathbb{S}4z}^{245} \\ F\_{\mathbb{S}5z} = F\_{\mathbb{S}5z}^{125} + F\_{\mathbb{S}5z}^{135} + F\_{\mathbb{S}5z}^{145} + F\_{\mathbb{S}5z}^{235} + F\_{\mathbb{S}5z}^{245} \end{cases} \tag{14}$$

In configuration V-1, we will just change the leg number to 2, 3, 4, 5 and 6. Then the adjusted force can be found by the similar Equations (13) and (14). The detailed classification of the virtual supporting triangle is listed in Table 5.

**Table 5.** Classification of virtual supporting triangle of stable configuration in five-legged soft-landing.


#### *4.3. IV and III Configurations*

As for four-legged landing, the 3 × 6 coefficient matrix in Equation (9) will be transformed into a 3 × 4 matrix. For example, in IV-2 configuration, the force/torque balance equations are written as:

$$
\begin{bmatrix}
1 & 1 & 1 & 1 \\
 r\_{\rm cy} + r\_{\rm bf2y} & r\_{\rm cy} + r\_{\rm bf4y} & r\_{\rm cy} + r\_{\rm by9y} & r\_{\rm cy} + r\_{\rm by6y} \\
 r\_{\rm cx} + r\_{\rm bf2x} & r\_{\rm cx} + r\_{\rm bf4x} & r\_{\rm cx} + r\_{\rm by9x} & r\_{\rm cx} + r\_{\rm by6x} \\
\end{bmatrix}
\cdot
\begin{bmatrix}
F\_{\mathcal{G}2z} \\
F\_{\mathcal{G}4z} \\
F\_{\mathcal{G}5z} \\
F\_{\mathcal{G}6z}
\end{bmatrix} = 
\begin{bmatrix}
\tau\_{\rm cx} \\
\tau\_{\rm cy}
\end{bmatrix}
\tag{15}
$$

Similarly, we utilize the VTLSM to calculate the adjusted leg force in real-time. The classification of the virtual supporting triangle is listed in Table 6.

**Table 6.** Classification of virtual supporting triangle of stable configuration in four-legged soft-landing.


As for three-legged landing, the 3 × 6 coefficient matrix in Equation (9) will be transformed into a 3 × 3 matrix. For configuration III-4, the equation is written as follows:

$$
\begin{bmatrix} 1 & 1 & 1 \\ r\_{\rm cy} + r\_{\rm bf1y} & r\_{\rm cy} + r\_{\rm bf3y} & r\_{\rm cy} + r\_{\rm bf8y} \\ r\_{\rm cx} + r\_{\rm bf1x} & r\_{\rm cx} + r\_{\rm bf3x} & r\_{\rm cx} + r\_{\rm bf8x} \end{bmatrix} \cdot \begin{bmatrix} F\_{\rm \mathcal{S}1z} \\ F\_{\rm \mathcal{S}3z} \\ F\_{\rm \mathcal{S}5z} \end{bmatrix} = \begin{bmatrix} -m\_b g \\ \tau\_{\rm cx} \\ \tau\_{\rm cy} \end{bmatrix} \tag{16}$$

Then we can get the adjusted force directly by solving the inverse matrix without the usage of VTLSM.

#### **5. Quasi-Incentre Stability Optimization**

After buffer landing, the normal legs need to support the lander to finish the sampling task using the drill or spoon mounted on the body. If the fault does not occur, the ground projected point just locates on the center of the hexagon constructed by all leg footholds. In this case, the robot has the largest stability margin without adjustment demand for the center of mass. However, if several IDUs have failed, the old center of the hexagon does not coincide with the new center of the supporting polygon constructed by the remaining normal leg footholds. We should find a new center that maximizes the supporting stability margin.
