# Speed-Gradient Adaptive Control for Parametrically Uncertain UAVs in Formation
## 2 Point-Mass Model of UAV Dynamics
### Design of Main Control Loop  
We take the control for the system (21)-(22) in the following form:  
\[ \begin{split}\bar{v}_{1}&=-\hat{m}(k_{x}y_{x}-\ddot {r}_{x}(t))+\hat{k}_{x}y_{x},\\ \bar{v}_{2}&=-\hat{m}\big{(}k_{y}y_{y}-\ddot{r}_{y}( t)\big{)}+\hat{k}_{y}y_{y},\\ \bar{v}_{3}&=-\hat{m}(k_{h}y_{h}-\dot{r}_{h}(t)-g)+ \hat{k}_{h}y_{h},\end{split}  \tag{23}\]  
where \(\hat{m}\), \(\hat{k}_{x}\), \(\hat{k}_{y}\), \(\hat{k}_{h}\) are adjustable parameters and \(k_{x}>0\), \(k_{y}>0\), \(k_{h}>0\) are fixed (design) parameters. Substituting (23) into (22), we have  
\[ \begin{split}\dot{y}_{x}&=-a_{x}^{2}e_{x1}+\left( \alpha_{x}-\frac{\hat{m}}{m}k_{x}+\frac{\hat{k}_{x}}{m}\right)y_{x}+\left( \frac{\hat{m}}{m}-1\right)\ddot{r}_{x}(t),\\ \dot{y}_{y}&=-a_{y}^{2}e_{y1}+\left(\alpha_{y}-\frac {\hat{m}}{m}k_{y}+\frac{\hat{k}_{y}}{m}\right)y_{y}+\left(\frac{\hat{m}}{m}-1 \right)\ddot{r}_{y}(t),\\ \dot{y}_{h}&=-a_{h}^{2}e_{h1}+\left(\alpha_{h}-\frac {\hat{m}}{m}k_{h}+\frac{\hat{k}_{h}}{m}\right)y_{h}+\left(\frac{\hat{m}}{m}-1 \right)(\dot{r}_{h}(t)+g).\end{split}  \tag{24}\]  
Now, the following Proposition can be stated. **Proposition 1**. : _For system (21) and (22) with control (23) and with a known value of \(m\), it is always possible to find values of control parameters \(\hat{m}\), \(k_{x}\), \(k_{y}\), \(k_{h}\), \(\hat{k}_{x}\), \(\hat{k}_{y}\), \(\hat{k}_{h}\) such that control goal (19) is fulfilled and the closed-loop system is exponentially stable._  
**Proof of Proposition 1. ** Take the following parameter values:  
\[ \begin{split}\hat{m}_{*}&=m,\\ k_{x}&=\alpha_{x},\ \ k_{y}=\alpha_{y},\ \ k_{h}= \alpha_{h},\\ \hat{k}_{x*}&=-\lambda_{x}m,\ \ \hat{k}_{y*}=- \lambda_{y}m,\ \hat{k}_{h*}=-\lambda_{h}m,\end{split}  \tag{25}\]  
where \(\lambda_{x}>0\), \(\lambda_{y}>0\), \(\lambda_{h}>0\) are arbitrarily chosen positive constants (the design parameters). Then, substituting (25) into (24) provides us with  
\[ \begin{split}\dot{y}_{x}&=-\alpha_{x}^{2}e_{x1}- \lambda_{x}y_{x},\\ \dot{y}_{y}&=-\alpha_{y}^{2}e_{y1}-\lambda_{y}y_{y}, \\ \dot{y}_{h}&=-\alpha_{h}^{2}e_{h1}-\lambda_{h}y_{h}. \end{split}  \tag{26}\]  
Take the following Lyapunov function:  
\[V(t)=Q_{t}(e_{\text{xyh}},y_{\text{xyh}}) \tag{27}\]  
and calculate the time derivative of \(V(t)\) along the trajectories of system (21) and (26):  
\[\dot{V}=e_{x1}\dot{e}_{x1}+my_{x}\dot{y}_{x}+e_{y1}\dot{e}_{y1}+my_{y}\dot{y}_ {y}+e_{h1}\dot{e}_{h1}+my_{h}\dot{y}_{h}. \tag{28}\]  
Grouping the terms for the \(x\), \(y\), and \(h\) axes in (28) results in  
\[\dot{V}=\dot{V}_{x}+\dot{V}_{y}+\dot{V}_{h}, \tag{29}\]where  
\[\dot{V}_{x}=e_{x1}e_{x1}+my_{x}\dot{y}_{x},\] \[\dot{V}_{y}=e_{y1}e_{y1}+my_{y}\dot{y}_{y}, \tag{30}\] \[\dot{V}_{h}=e_{h1}e_{h1}+my_{h}\dot{y}_{h}.\]  
Below, only the expression for \(\dot{V}_{x}\) is considered; however, transformations for \(\dot{V}_{y}\), \(\dot{V}_{h}\) can be made similarly. Making substitutions of expressions for derivatives, we obtains  
\[\dot{V}_{x}=e_{x1}(-\alpha_{x}e_{x1}+y_{x})+my_{x}(-\alpha_{x}^{2}e_{x1}-\lambda _{x}y_{x})=-\alpha_{x}e_{x1}^{2}+\left(1-ma_{x}^{2}\right)e_{x1}y_{x}-m\lambda_ {x}y_{x}^{2}. \tag{31}\]  
It can be easily seen that \(\dot{V}_{x}\) can be represented as a following quadratic form  
\[\dot{V}_{x}=\eta_{x}{}^{\rm T}H_{x}\eta_{x}, \tag{32}\]  
where vector \(\eta_{x}=[e_{x1}\quad y_{x}]^{\rm T}\) and matrix  
\[H_{x}=\left[ \begin{array}{cc}-\alpha_{x}&0.5\big{(}1-ma_{x}^{2}\big{)}\\ 0.5\big{(}1-ma_{x}^{2}\big{)}&-m\lambda_{x}\end{array} \right] \tag{33}\]  
are introduced. Matrix \(H_{x}=H_{x}^{\rm T}\) is negative definite if its first angular minor is negative and its second is positive.