# Curved Path Following Control for a Small Fixed-Wing UAV with Parameters Adaptation
## 4 Simulation
### Polygon Path Following  
The desired horizontal polygon path was defined with six waypoints: A (0, 0), B (2400, 1386), C (2400, 3386), D (0, 5786), E (\(-\)2400, 5786), and F (\(-\)2400, 0). The simulation duration is 900 s. Figure 10a shows the comparison of the path following with the control parameter \(k_{1}=k_{1,max}\), \(k_{1}=k_{1,min}\), and \(k_{1,\ adaptive}\). For the convenience of description, the path following controller under the action of \(k_{1}=k_{1,max}\), \(k_{1}=k_{1,min}\), and \(k_{1,\ adaptive}\) is abbreviated as PFC_k1,max, PFC_k1,min, and PFC_k1,adaptive, respectively. To verify the effectiveness of the proposed methods, we compared the path-following performances of the methods PFC_k1,max, PFC_k1,min, PFC_k1,adaptive and vector field (VF) [20]. While executing the polygon path following, the turn-through-waypoint mode was adopted to switch course. The response to the straight-line path can be evaluated by the length of the predefined path followed (LOPPF), the convergence distance, and the error overshoot. For a given segment path, the time from the error \(f(x,y)\) converging to less than the aircraft's wingspan until the UAV starts to switch to another path is called the effective time of UAV flying along the given path. The length of the predefined path followed (LOPPF) is defined as the projection length of the UAV's flight path on the desired segment during this effective path-following time. The convergence time is defined as the time from the UAV following the desired path until \(|f(x,y)|\) is less than the aircraft's wingspan. For straight-line path following, the error overshoot is the maximum of \(|f(x,y)|\), which can be seen in the areas of I, II, III, IV, V, and VI, as shown in Figure 10b. Figure 9: The simulation in the Matlab/Simulink environment. Figure 10b shows the comparison of the \(f(x,y)\) while following the predefined polygon path with the four methods PFC_k1,max, PFC_k1,min, PFC_k1,adaptive, and VF. As shown in the areas I, II, III, IV, V, and VI, the error overshoots found by using the method PFC_k1,max are the largest. The corresponding error overshoots found by using the method PFC_k1,min  
Figure 10: Comparison of the polygon path following with the four methods PFC_k1,max, PFC_k1,min, PFC_–_k1,adaptive,_ and VF. (**a**) the position; (**b**) the distance \(f(x,y)\); (**c**) the parameter \(k_{1}\); (**d**) the parameter \(k_{2}\); (**e**) the course rate command \(u_{cmd}\); (**f**) the bank angle command \(\phi_{cmd}\). are the second smallest. When using the method PFC_\(k_{1,adaptive}\), the error overshoots are moderate and closer to those generated by the method PFC_\(k_{1,min}\). The corresponding error overshoots shown in the areas I, II, III, IV, V, and VI are all listed in Table 3.  
As Figure 10b and Table 3 show, while turning through the waypoint F (2000, 0), the deviations of the UAV from the reference path found by using the four methods are all larger than 125 m, and the largest occur during the first lap flight. These deviations show that, with the two orthogonal components of the added wind acting on the fuselage axis and the lateral axis of the UAV, the wind from 270\({}^{\circ}\) W influences the turning of the UAV dramatically. Moreover, the convergence time by using the method PFC_\(k_{1,adaptive}\) is 25.73 s, which is the longest during the first lap flight. However, the convergence time is moderate by comparing it with those obtained by using the methods PFC_\(k_{1,max}\) and PFC_\(k_{1,min}\). Table 3 lists the performance comparison of the polygon path following using the four methods PFC_\(k_{1,max}\), PFC_\(k_{1,min}\), PFC_\(k_{1,adaptive}\), and VF. The segment AB\({}_{900s}\) means that the UAV only follows part of segment AB during the second flight. The LOPFFs when the UAV follows the segments BC, CD, and EF with the method PFC_\(k_{1,adaptive}\) are the longest.