## 2 System Modeling
### Computation of Desired Attitude Angles  
The prescribed reference path is denoted as \(P_{p}=\left[x_{p}(s),y_{p}(s)\right]^{T}\), with \(s\) representing the path parameter and \(x_{p}(s)\) and \(y_{p}(s)\) being the second-order derivatives with respect to \(s\). Then, the desired path angle can be written as  
\[\psi_{p}=\arctan 2\left(y_{p}(s),x_{p}(s)\right) \tag{1}\]  
where \(\arctan 2(^{*})\) represents the quadrant function. The transformation matrix from \(Oxty_{I}\) to \(P_{p}x_{p}y_{p}\) can be given using  
\[L_{pg}= \begin{bmatrix}\cos\psi_{p}&-\sin\psi_{p}\\ \sin\psi_{p}&\cos\psi_{p}\end{bmatrix}  \tag{2}\]  
The following errors can be computed using Figure 1:  
\[e=\left[x_{e},y_{e}\right]^{T}=L_{pg}\big{(}P-P_{p}\big{)} \tag{3}\]  
Differentiating Formula (3) relative to time yields  
\[\dot{e}=\dot{L}_{pg}\big{(}P-P_{p}\big{)}+L_{pg}\left(\dot{P}-\dot{P}_{p}\right) \tag{4}\]  
One can also have  
\[\dot{L}_{pg}=S_{p}L_{pg} \tag{5}\]  
\[S_{p}= \begin{bmatrix}0&\dot{\psi}_{p}\\ \vdots&\\ -\dot{\psi}_{p}&0\end{bmatrix}  \tag{6}\]  
Figure 1: Path following on the latitude plane. The transformation matrix from \(Px_{K}y_{K}\) to \(P_{p}x_{p}y_{p}\) can be given using  
\[L_{pk}= \begin{bmatrix}\cos\psi_{r}&\sin\psi_{r}\\ -\sin\psi_{r}&\cos\psi_{r}\end{bmatrix}  \tag{7}\]  
By considering the wind velocities along \(Px_{b}\) and \(Py_{b}\) denoted as \(u_{w}\) and \(v_{w}\), respectively, the perturbed airspeed denoted by \(V_{g}\) can be calculated using \(V_{g}=\sqrt{\left(u+u_{w}\right)^{2}+\left(v+v_{w}\right)^{2}}\). Since \(V_{kg}=\left[V_{g},0\right]^{T}\), we can have  
\[\dot{P}=L_{pg}^{T}L_{pk}V_{kg} \tag{8}\]  
The velocity of the desired path in \(P_{p}x_{p}y_{p}\) can be expressed as \(V_{pg}=[V_{p},0]^{T}\); then, we can derive  
\[\dot{P_{p}}=L_{pg}^{T}V_{pg} \tag{9}\]  
and  
\[\left|\dot{P_{p}}\right|=\left|L_{pg}^{T}V_{pg}\right| \tag{10}\]  
where \(\left|*\right|\) represents the norm of a vector. It can be determined from Formula (10) that  
\[\dot{s}=\frac{V_{p}}{\sqrt{x_{p}^{\prime}{}^{2}(s)+y_{p}^{\prime}{}^{2}(s)}} \tag{11}\]  
where \(x_{p}^{\prime}(s)=\frac{\partial x_{p}(s)}{\partial s}\) and \(y_{p}^{\prime}(s)=\frac{\partial y_{p}(s)}{\partial s}\). Bringing Formulas (5), (8), and (9) into (4) yields  
\[\dot{e} =S_{p}L_{pg}\big{(}P-P_{p}\big{)}+L_{pg}\big{(}L_{pg}^{T}L_{pk}V_{ kg}-L_{pg}^{T}V_{pg}\big{)} \tag{12}\] \[=S_{p}e+L_{pk}V_{kg}-V_{pg}\]  
Then, the desired yaw angle can be calculated as  
\[\psi_{d}=\psi_{r}+\psi_{p}-\beta \tag{13}\]  
with \(\psi_{r}\) defined as  
\[\psi_{r}=\arctan\left(\frac{-y_{e}}{\Delta}\right) \tag{14}\]  
Take the following Lyapunov function:  
\[V_{e}=\frac{1}{2}e^{T}e \tag{15}\]  
Differentiating the Lyapunov function relative to time yields  
\[\dot{V_{e}} =e^{T}\dot{e} \tag{16}\] \[\dot{P_{p}}=L_{pg}^{T}V_{pg} \tag{9}\]0  
It is easy to prove that \(e^{T}S_{p}e=0\). Then, via carrying out a simple mathematical operation, one can derive  
\[\dot{P_{p}}=L_{pg}^{T}V_{pg} \tag{9}\]1To guarantee \(\dot{V}_{e}\leq 0\), we can take  
\[\dot{P_{p}}=L_{pg}^{T}V_{pg} \tag{9}\]2  
where \(\tau>0\) is a tuning variable. Bringing Formula (18) into (11) yields  
\[\dot{P_{p}}=L_{pg}^{T}V_{pg} \tag{9}\]3  
Bringing Formulas (14) and (18) into (17) yields  
\[\dot{P_{p}}=L_{pg}^{T}V_{pg} \tag{9}\]4  
It can be seen from the definition that the velocity \(V_{g}\) must be a positive number. \(\Delta\) is the look-ahead distance, which is a positive number and has also been defined before. Thus,\(V_{g}>0\) and \(\Delta>0\) can guarantee \(-V_{g}\frac{\Delta{y_{e}}^{2}}{\sqrt{\Delta^{2}+{y_{e}}^{2}}}<0\), which also implies \(\dot{V_{e}}<0\). Formula (20) indicates that the real flight path of the FWUAV can converge gradually to the prescribed reference path under the designed desired yaw angle (14). The complete curved path-following scheme can be summarized as follows:  
\[\left\{