## 5 Experiments and Results
### Experimental Results and Analysis  
To evaluate the performance of the proposed tracking and targeting system, we test it in different situations. After selecting a target in the video streams, the gimbal system is activated and rotates the camera to point at the selected target, which can be regarded as a step response. The boresight error pixels are plotted in azimuth and elevation, respectively, which are also printed on the top left of the screen. As shown in Figure 16, the system responds rapidly and the steady-state error is about \(\pm 3\) pixels, while the initial errors are hundreds of pixels. This test is usually used to tune all the control parameters of the gimbal system, which can be completed on the ground. Then, the gimbal system and the onboard computer are fixed on the experimental quadrotor platform for further tests. To aim at a target from the UAV, the motion and vibration of the platform should be isolated. Once the target is locked, the UAV is in a fully autonomous mode controlled by the integrated system. Figure 17 shows the results of the boresight error while the UAV is following a pedestrian moving at 0.9-2 m/s. In about 250 seconds' flight, an accuracy of \(\pm 9.34\) pixels in the azimuth and \(\pm 5.07\) pixels in the elevation was achieved. Figure 16: Boresight error in pixels during ground step tests. (**a**) the response of the gimbal system in azimuth; (**b**) the response of the gimbal system in elevation. While tracking a ground moving pedestrian, the altitude change of the target can be ignored in most situations, which makes the task less difficult. However, tracking a flying drone is much more complicated. The drones are able to change its position and velocity in a very short time, which may cause tracking errors or failures. During the flight experiment, autonomous tracking of an intruded drone has been achieved. Figure 18 shows the results of the boresight error while the UAV is tracking a flying drone. Some oscillations still remain in the current configuration, which occurred when the flight path of the target suddenly changed. It is a great challenge for the system to catch up with the target in such a short time. The deviations caused by the image transmission delay cannot be ignored, which is about 220 milliseconds for the current system. Other factors such as image noises and illumination changes may also have an impact on the tracking accuracy to some extent. The root mean square errors (RMSEs) of boresight errors in drone tracking experiment are listed in Table 1, compared with the other two tests. Figure 17: Boresight error in pixels while the UAV is following a human target moving at pedestrian speed. (**a**) the response in azimuth; (**b**) the response in elevation. Figure 18: Boresight error in pixels while the UAV is tracking a flying drone. (**a**) the response in azimuth; (**b**) the response in elevation. Figure 19 shows the process of a successful drone tracking experiment. During the flight, the roll/pitch/yaw angle of the UAV, camera, and gimbal frames are plotted, respectively, in Figure 20a-c. The actual approaching speed of the UAV has tracked the setpoint changes accurately as shown in Figure 20d. The trajectories of the intruded drone and the interceptor are plotted in a local NED frame as shown in Figure 21.  
Higher control rate and less image transmission delay would significantly improve the response speed and the accuracy, if better hardware configuration were used. However, considering that all the sensors and onboard devices are low-cost, the performance of the proposed tracking system is very attractive in practical applications. A video of the experiments is available in the Supplementary Materials section (Video S1). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**RMSE (Pixel)** & **Azimuth** & **Elevation** & **2D** \\ \hline Step test & 31.57 & 4.83 & 31.94 \\ Pedestrian & 9.34 & 5.07 & 10.63 \\ following & 21.50 & 19.28 & 28.88 \\ \hline \hline \end{tabular}
\end{table}