# Curved Path Following Control for a Small Fixed-Wing UAV with Parameters Adaptation
## 3 Controller Design
### The Adaptive Design of \(k_{1}(t)\) and \(k_{2}(t)\)  
In this subsection, the control parameters \(k_{1}(t)\) and \(k_{2}(t)\) are designed adaptively to improve the path-following performance. Since a given smooth path on the plane can be approximated by a certain number of straight lines and arc segments, the following research focuses on the straight-line and circular paths. **Assumption 3**. : _For each straight-line or circular path to be followed, the distance between the UAV and the target path is within 300 m, and the corresponding course angle deviation is within 90 degrees. Thus, the variation ranges of the initial values of the states \(e_{d}\) and \(e_{\chi}\) are \([-300,\ 300]\) and \([-\frac{\pi}{2},\ \frac{\pi}{2}]\), respectively._  
As shown in Equation (13), the dynamics of the parameter \(k_{1}(t)\) is determined by the parameter \(\tau\). The adaptive design of \(k_{1}(t)\) is transformed into the optimal design of parameter \(\tau\). In this study, the time constant \(\tau\) is selected by analyzing the dynamic response of Equation (9) under different initial conditions. \(k_{1,max}\) and \(k_{1,min}\) are chosen as 0.00025 and 0.0001, respectively. The objective is to establish the relationship between the time constant \(\tau\) and the initial values of the states \(e_{d}\) and \(e_{\chi}\) based on Equation (9), when \(k_{1}=0.00025\), \(k_{2}=0.0008\). In the following, the initial values of the states \(e_{d}\) and \(e_{\chi}\) are denoted as \(e_{d0}\) and \(e_{\chi 0}\) for convenience. Since the analytical solution of the nonlinear Equation (9) cannot be obtained, the numerical method is applied to study its dynamic characteristics. By discretizing the value range of \(e_{d0}\) according to equal intervals of length 30, 21 values of \(e_{d0}\) are obtained. Similarly, 19 values of the state \(e_{\chi 0}\) are obtained by discretizing its value range according to equal intervals of length \(\frac{\pi}{18}\). Thus, 399 pairs of \((e_{d0},\ e_{\chi 0})\) are obtained through combination. Under each initial state condition \((e_{d0},\ e_{\chi 0})\), the state trajectories of the nonlinear system (9) with \(k_{1}=0.00025\) and \(k_{2}=0.0008\), can be calculated by the fourth order Runge-Kutta algorithm. There are four typical trajectories of \(e_{d}\) under different initial state conditions \((e_{d0},\ e_{\chi 0})\), which can be seen in Figure 5. As shown in Figure 5a,b, if \(e_{d0}\geq 0\), the time length \(T_{1}\) is defined as the length of time it takes for the state \(e_{d}(t)\) to get the maximum value from its initial value. If \(e_{d0}<0\), the time length \(T_{1}\) is defined as the length of time it takes for the state \(e_{d}(t)\) to get the minimum value from its initial value. Figure 5c,d shows that, if \(e_{d0}\geq 0\), the time length \(T_{2}\) is defined as the length of time it takes for the state \(e_{d}(t)\) to get the minimum value from its initial value. If \(e_{d0}<0\), the time length \(T_{1}\) is defined as the length of time it takes for the state \(e_{d}(t)\) to get the maximum value from its initial value. \[T_{1}=\left\{ \begin{array}{ll}\operatorname{argmax}(e_{d}(t))&s.t.\ \ \text{Equation (\ref{eq:1}) and }\ \big{(}e_{d0},\ e_{\chi 0}\big{)},&\text{if }e_{d0}\geq 0\\ \operatorname{argmin}(e_{d}(t))&s.t.\ \ \text{Equation (\ref{eq:1}) and }\ \big{(}e_{d0},\ e_{\chi 0}\big{)},&\text{if }e_{d0}<0\end{array} \right. \tag{24}\]  
\[T_{2}=\left\{ \begin{array}{ll}\operatorname{argmin}(e_{d}(t))&s.t.\ \ \text{Equation (\ref{eq:1}) and }\ \big{(}e_{d0},\ e_{\chi 0}\big{)},&\text{if }e_{d0}\geq 0\\ \operatorname{argmax}(e_{d}(t))&s.t.\ \ \text{Equation (\ref{eq:1}) and }\ \big{(}e_{d0},\ e_{\chi 0}\big{)},&\text{if }e_{d0}<0\end{array} \right. \tag{25}\]  
In this study, the empirical relationship between the time constant \(\tau\) and the two parameters \(T_{1}\) and \(T_{2}\) are selected by analyzing the dynamic trajectory as  
\[\tau=\left\{