# Target Tracking Based on a Nonsingular Fast Terminal Sliding Mode Guidance Law by Fixed-Wing UAV
## 3 Target Tracking Based on Sliding Model Control  
### Loitering Algorithm  
Form the Definition 1, the goal of the target tracking is to keep the distance error as small as possible. However, Equation (5) indicates that there is no direct relationship between the distance error \(r\) and the UAV's heading angular velocity \(\omega_{\psi}\). Consequently, the control strategy should be designed to drive the distance error \(r\) to zero. Therefore, it is reasonable to set \(\dot{r}=0\), namely, \(v_{a}\cdot\sin(\psi_{a}-\lambda)-v_{t}\cdot\sin(\psi_{t}-\lambda)+v_{w}\cdot \sin(\psi_{w}-\lambda)=0\). In order to simplify the formula complexity, define \(\bar{\psi}_{*}=\psi_{*}-\lambda\), the steady value of \(\bar{\psi}_{a}\) can be given by  
\[\bar{\psi}_{a}^{d}=\arcsin\left(\frac{v_{t}\sin\bar{\psi}_{t}-v_{w}\sin\bar{ \psi}_{w}}{v_{a}}\right)\qquad\in(-\pi/2,\pi/2]. \tag{7}\]  
From Equation (7), the control goal in Definition 1 is replaced as to drive \(\bar{\psi}_{a}\) to \(\bar{\psi}_{a}^{d}\), such that \(\parallel\dot{r}(t)\parallel\mapsto 0\). In this condition \(\bar{\psi}_{a}=\bar{\psi}_{a}^{d}\), the distance \(L\) reaches its steady state with no changing. Defining the heading angle error is \(\bar{\psi}_{a}=\bar{\psi}_{a}-\bar{\psi}_{a}^{d}\), \(\bar{\psi}_{a}\in(-\pi,\pi]\). By using the trigonometric identities \(\cos\sigma=1-2\sin^{2}(\sigma/2)\) and \(\sin\sigma=2\sin(\sigma/2)\cos(\sigma/2)\), the dynamics of the distance error in Equation (5) is rewritten as  
\[\dot{r}=v_{a}(\sin\bar{\psi}_{a}^{d}(\cos\bar{\psi}_{a}-1)+\cos\bar{\psi}_{a}^{ d}\sin\bar{\psi}_{a})=2v_{a}\sin\left(\frac{\bar{\psi}_{a}}{2}\right)\cos \left(\frac{\bar{\psi}_{a}+\bar{\psi}_{a}^{d}}{2}\right). \tag{8}\]  
Due to \(\bar{\psi}_{a}^{d}\in(-\pi/2,\pi/2]\), the inequality \(\cos((\bar{\psi}_{a}+\bar{\psi}_{a}^{d})/2)>0\) is valid when \(\bar{\psi}_{a}\in(-\pi/2,\pi/2]\). Therefore, the monotonicity of \(\dot{r}\) is the same as the monotonicity of \(\bar{\psi}_{a}\), and \(\dot{r}\cdot r\leq 0\) is equivalent to \(\bar{\psi}_{a}\cdot r\leq 0\).  
Hence, one needs to construct a monotonic function \(f(r)\) satisfying \(\bar{\psi}_{a}=-f(r)\). On account of \(\bar{\psi}_{a}\in(-\pi,\pi]\), we define \(f(r)\), for example, as follows  
\[f(r)=\arctan(c\cdot r),\quad c>0. \tag{9}\]Definition 2: The target tracking problem defined in Definition 1 can be redefined feasibly as: designing the turning rate \(\omega_{\psi}\) to drive the following condition for UAV:  
\[\tilde{\psi}_{a}=-f(r)\mapsto 0, \tag{10}\]  
where \(\tilde{\psi}_{a}=\psi_{a}-\lambda-\tilde{\psi}_{a}^{d}\), while \(\psi_{a}\) can be controlled directly by \(\omega_{\psi}\).  
From Equation (5), factors that determine the relative motion between the UAV and the target include not only distance error rate \(\dot{r}\) but also azimuth angle rate \(\dot{\lambda}\). Definitions 1 and 2 just consider \(r\) convergence to zero, with \(\lambda\) as a free variable. The UAV flying circle around the ground target is intuitive when the UAV's speed is larger than the target's. In addition, the UAV follows behind the target at the desired distance. Therefore, the UAV is loitering around the target due to the target's maneuver. The desired position trajectory forming a circle with a radius of \(R_{d}\) divides the plane into two parts. This feature is suitable for using the sliding mode control method, in which the sliding manifold is designed to generate the appropriate circle trajectory for the heading angle to reach control objectives. The next section will apply SMC to design a guidance law to satisfy the conditions in Definitions 1 and 2.