## 4 Inner Loop Controller Design
### Stability Analysis  
From Equation (7), we have  
\[\dot{s}_{i}=\ddot{e}_{i}+\gamma\dot{e}_{i}\]  
\[\ddot{q}_{i}=\ddot{q}_{i,r}-\dot{s}_{i} \tag{11}\]  
According to Equations (1), (8) and (11), the following equation can be obtained:  
\[M_{i}(q_{i})\dot{s}_{i}+C_{i}\Big{(}q_{i},\dot{q}_{i}\Big{)}\dot{s}_{i}+\tau_{ i}=\rho_{i}-\tau_{i}^{d},i=1,\ldots,n \tag{12}\]  
**Theorem 1**. : _Consider the errors of task functions in Equations (3)-(5), the Euler-Lagrange system in Equation (1) with the proposed APD-SMC law in Equation (9), and adaptation update law in Equation (10). Suppose that Properties 1-4 hold. We can conclude that_  
1. If there is no conflict between the three tasks, then they can be fulfilled simultaneously. The system is globally asymptotically stable, and the tracking error \(e_{i}\) can converge to zero. 2. If an obstacle avoidance mission is active and conflicts with an escort mission, then the gain is chosen as \(\lambda_{i,1}\Big{(}\|e_{i}\|,\|\dot{q}_{i}\|\Big{)}=\lambda_{i,1}^{\bigstar} \Big{(}\|e_{i}\|,\|\dot{q}_{i}\|\Big{)}+\varrho_{i}\), where \(\varrho_{i}\) is designed based on robustness to noise, for example, measurement noise. Then, the obstacle avoidance mission is fulfilled first. Furthermore, the system is globally asymptotically stable, and the tracking error \(e_{i}\) can converge to zero. **Proof. ** The overall Lyapunov function candidate \(V\) is considered as  
\[V=V_{1}+V_{2}\]  
Using Equation (13), we obtain  
\[\dot{V}_{2}=-\eta_{1}\overline{\sigma}_{1}^{T}\dot{\sigma}_{1}-\eta_ {2}\overline{\sigma}_{2}^{T}\dot{\sigma}_{2}-\overline{\sigma}_{3}^{T}\eta_{3} \dot{\sigma}_{3} \tag{18}\] \[=-\overline{\sigma}_{1}^{T}\eta_{1}\dot{\eta}_{1}\dot{\eta}_{d}- \overline{\sigma}_{2}^{T}\eta_{2}J_{2}\dot{\eta}_{d}-\overline{\sigma}_{3}^{T} \eta_{3}J_{3}\dot{\eta}_{d}\] \[=-\eta_{1}\overline{\sigma}_{1}^{T}\Big{(}I_{1}J_{1}^{+}\lambda_{1 }\overline{\sigma}_{1}+I_{1}(I-J_{1}^{+}I_{1})(J_{2}^{+}\Lambda_{2}\overline{ \sigma}_{2}+(I-J_{2}^{+}I_{2})J_{3}^{+}\Lambda_{3}\overline{\sigma}_{3})\Big{)}\] \[-\eta_{2}\overline{\sigma}_{2}^{T}\Big{(}J_{2}J_{1}^{+}\lambda_{1 }\overline{\sigma}_{1}+J_{2}(I-J_{1}^{+}I_{1})(J_{2}^{+}\Lambda_{2}\overline {\sigma}_{2}+(I-J_{2}^{+}I_{2})J_{3}^{+}\Lambda_{3}\overline{\sigma}_{3})\Big{)}\] \[-\eta_{3}\overline{\sigma}_{3}^{T}\Big{(}J_{1}J_{1}^{+}\lambda_{1 }\overline{\sigma}_{1}+J_{3}(I-J_{1}^{+}I_{1})(J_{2}^{+}\Lambda_{2}\overline {\sigma}_{12}+(I-J_{2}^{+}I_{2})J_{3}^{+}\Lambda_{3}\overline{\sigma}_{3}) \Big{)}\] \[=-\overline{\sigma}_{1}^{T}\eta_{1}\lambda_{1}\overline{\sigma}_{ 1}-\overline{\sigma}_{2}^{T}\eta_{2}\Lambda_{2}\overline{\sigma}_{2}- \overline{\sigma}_{3}^{T}\eta_{3}\Lambda_{3}\overline{\sigma}_{3}-\overline{ \sigma}_{2}^{T}\eta_{2}\lambda_{1}J_{1}^{+}\overline{\sigma}_{1}-\overline{ \sigma}_{3}^{T}\eta_{3}\lambda_{1}J_{1}^{+}\overline{\sigma}_{1}\] \[\ddot{q}_{i}=\ddot{q}_{i,r}-\dot{s}_{i} \tag{11}\]0 \[\ddot{q}_{i}=\ddot{q}_{i,r}-\dot{s}_{i} \tag{11}\]1  
Next, two different cases will be discussed separately: Conflicting and nonconflicting tasks. Assuming there is no conflict between each pair of tasks, an interesting property of the Jacobian matrices is utilized so that the nonconflicting relationship between three tasks can be expressed as  
\[\ddot{q}_{i}=\ddot{q}_{i,r}-\dot{s}_{i} \tag{11}\]2 \[\ddot{q}_{i}=\ddot{q}_{i,r}-\dot{s}_{i} \tag{11}\]3 \[\ddot{q}_{i}=\ddot{q}_{i,r}-\dot{s}_{i} \tag{11}\]4  
It means that the three tasks projected onto the robot velocity space are orthogonal. Therefore, they may be fulfilled simultaneously [37]. Inserting Equation (19) into Equation (18), we obtain  
\[\ddot{q}_{i}=\ddot{q}_{i,r}-\dot{s}_{i} \tag{11}\]5  
Accordingly, from the above analysis, we find that if there is no conflict between every pair of tasks, then the outer loop subsystem is globally asymptotically stable.