# Curved Path Following Control for a Small Fixed-Wing UAV with Parameters Adaptation
## 2 Problem Formulation  
A small fixed wing UAV equipped with autopilot can realize the stable feedback control of altitude, attitude, and airspeed. In this case, these states converge with the desired response to their commanded values. In typical application fields such as mapping and searching, the airspeed and altitude remain unchanged using a zero climb rate under the control of the autopilot so that the UAV works in the safe flight envelope [25]. The following kinematic model in the horizontal plane can describes the motion of the fixed-wing UAV:  
\[\left\{ \begin{array}{l}\dot{x}=V_{a}cos(\psi)+W_{x}=Vcos(\chi)\\ \dot{y}=V_{a}\sin(\psi)+W_{y}=V\sin(\chi)\\ \dot{\chi}=u_{cmd}\end{array} \right. \tag{1}\]  
where \(x\), \(y\), and \(V\) denote the inertial position and speed of the UAV in a 2D inertial frame, respectively. \(W_{x}\) and \(W_{y}\) represent the \(x\) and \(y\) components of the wind velocity \(W\). \(V_{a}\) and \(\psi\) denote the airspeed and heading, respectively. \(\chi\in(-\pi,\,\pi]\) is the course of the UAV. \(u_{cmd}\) is the course rate command of the UAV. When the fixed-wing UAV is flying, the speed \(V\) will always be positive. Thus, the following assumption is adopted. **Assumption 1**. : _The speed \(V\) and its derivative \(\dot{V}\) are both bounded, and \(V_{p1}\geq V\geq V_{p2}>0\), where \(V_{p1}\) and \(V_{p2}\) are all positive constants._  
**Definition 1**. : _(Horizontal Path). Let \(\mathcal{P}_{r}=\{(x,y)|f(x,y)=0,x,y\in R\}\) be an implicit expression of a reference path, where \(f(x,y)\) is a twice continuously differentiable function._  
**Definition 2**. : (_Level Set_). A level set of a function \(f(x,y)\) is the set \(\{(x,y)|f(x,y)=C\}\), where \(C\) is a given constant._  
Following [30], the value \(f(x,y)\) when the UAV is in \((x,y)\) is used as the distance value. Given that the gradient of \(f(x,y)\) is not zero on the path, the value of \(f(x,y)\) can represent the position of the UAV relative to the desired path. If \(f(x,y)=0\), it means that the UAV is on the path. Let \(f_{x}\) and \(f_{y}\) be the first-order partial derivatives of \(f(x,y)\), and the gradient modules of \(f(x,y)\) is \(\|f\|=\sqrt{f_{x}^{2}+f_{y}^{2}}\). As shown in Figure 1, the vector \(\big{(}f_{x}\), \(f_{y}\big{)}\) represents the desired orientation along the level path. The desired orientation \(\chi_{d}\) can be given as  
\[\chi_{d}=\left\{ \begin{array}{ll}tan^{-1}\Big{(}-\frac{f_{x}}{f_{y}}\Big{)},\,if\,f_{y}\
eq 0\\ cot^{-1}\Big{(}-\frac{f_{y}}{f_{x}}\Big{)},\,if\,f_{x}\
eq 0\end{array} \right. \tag{2}\]  
For some given \(f(x,y)\), the value of \(\|\
abla f\|\) may be zero in some points \((x,y)\). If the UAV's initial position is at these points, the guidance to be designed below will fail, and the UAV will lose control. In the following, the safe flying area for the UAV is defined as \(D_{\rm s}=\{(x,y)|x,y\in R,\|\
abla f\|\geq\lambda\}\), where \(\lambda\) is a positive constant. **Assumption 2**. : \(f_{x}\)_, \(f_{y}\), \(f_{xx}\), \(f_{yy}\), and \(f_{yy}\) are bounded in any bounded domain \(D\subset R^{2}\)._  
The virtual distance error \(e_{d}\) is introduced as  
\[e_{d}=f(x,y) \tag{3}\]  
Figure 1: Path level set and the position of the UAV with respective to the desired path. By differentiating Equation (3) with respect to time, we obtain  
\[ \begin{array}{ll}\dot{e}_{d}&=\frac{d}{dt}f(x,y)=f_{x}\dot{x}+f_{y}\dot{y}\\ &=f_{x}V\cos(\chi)+f_{y}V\sin(\chi)\\ &=V\|\
abla f\|\left(\frac{f_{x}}{\|\
abla f\|}\cos(\chi)+\frac{f_{y}}{\|\
abla f \|}\sin(\chi)\right)\\ &=V\|\
abla f\|\sin(\chi-\chi_{d})\\ &=V\|\
abla f\|\sin(e_{\chi})\end{array}  \tag{4}\]  
Let the course angle error \(e_{\chi}\) be defined as  
\[e_{\chi}=\chi-\chi_{d} \tag{5}\]  
Hence,  
\[\dot{e}_{\chi}=\dot{\chi}-\frac{d}{dt}tan^{-1}\left(-\frac{f_{x}}{f_{y}}\right) =u_{cmd}-\frac{d}{dt}tan^{-1}\left(-\frac{f_{x}}{f_{y}}\right) \tag{6}\]  
The error kinematics model suitable for control purposes is summarized as  
\[\left\{