# Building a Realistic Virtual Simulator for Unmanned Aerial Vehicle Teleoperation
## 3 Results and Discussion  
The effectiveness of the proposed framework in developing a realistic simulator for the quadrotor is evaluated in this section. For this, the behavior of the simulated quadrotor is compared to that of a real-world quadrotor. The device utilized to perform the comparisons is the DJI Ryze Tello quadrotor controlled by the GameSir T1d gamepad, as observed in Figure 8. The dynamic parameters of the quadrotor model are proposed based on the characteristics of this device and an arbitrary set of environmental conditions. These parameters are displayed in Table 1. On the other hand, interval \(dt=1\) (ms) is used to perform the dynamic simulation and as the update rate of the virtual environment. Concerning the teleoperation algorithm, its parameters are tuned with the _rand/1/bin_ variant of Differential Evolution (DE) [57]. This well-known meta-heuristic optimizer has been successfully utilized in applications from various contexts [58]. The hyperparameters selected for this optimizer are a maximum number of generations \(G_{max}=1000\), a population size \(NP=20\), and typical choices of the crossover rate \(CR=0.5\) and the scaling factor \(F=0.5\)[59]. Moreover, every searched parameter's lower and upper bounds are set as \(lb=0\) and \(ub=30\), respectively. For the optimization of these parameters, a test flight is performed with the DJI Ryze Tello quadrotor during \(t_{f}=20\) (s) to gather the required data for the problem in (32), i.e., the values of \(\hat{z}\), \(\hat{psi}\), \(\hat{\theta}\), and \(\hat{\phi}\) and the input commands of the controller \(\hat{u}_{LSV}\), \(\hat{u}_{LSH}\), \(\hat{u}_{RSV}\), and \(\hat{u}_{RSH}\). Like any other commercial vehicle, this quadrotor is equipped with sensors that allow monitoring and control. The  
Figure 8: Experimental platform based on the DJI Ryze Tello quadrotor and the GameSir T1d bluetooth controller. information is stored as a standard flight log file, and the required data is extracted using the DatCon tool ([[https://datfile.net/DatCon/intro.html](https://datfile.net/DatCon/intro.html)]([https://datfile.net/DatCon/intro.html](https://datfile.net/DatCon/intro.html)) (accessed on 16 October 2021)). It is important to mention that, due to the different sampling frequencies of the sensors, it is unlikely that the required information can be sampled every \(dt\). So, a standardization procedure is needed to work with the available data. This standardization consists of filling the unavailable values at a given instant with the available values of the previous instant. In this way, the standardized information acquired from the test flight is displayed in Figure 9. Finally, DE performs the optimization using the above information, and the resulting teleoperation parameters are observed in Table 2.  
Table 3 shows the objective function values obtained with the optimized teleoperation parameters in Table 2. In the first table, the small values of the objective functions denote a response of the simulated quadrotor close to the behavior of the real quadrotor when both receive the same input commands. This response can be observed in Figure 10. If the results in Figures 9 and 10 are compared, a similar shape is observed for the simulated and real data, but the response of the simulated quadrotor is smoother. Figure 10: _Cont._ \begin{table}
\begin{tabular}{c c} \hline \hline
**Objective Function** & **Value** \\ \hline \(J_{z}(\mathbf{p})\) & 0.8204 \\ \(J_{\psi}(\mathbf{p})\) & 0.2148 \\ \(J_{\theta}(\mathbf{p})\) & 0.0537 \\ \(J_{\phi}(\mathbf{p})\) & 0.0013 \\ \hline \(J(\mathbf{p})\) & 1.0903 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Objective function values. Figure 9: The data acquired from the DJI Ryze Tello. The optimized configuration above is used in the final simulator shown in Figure 11. Finally, an arbitrary flight is carried out in the simulator (i.e., using arbitrary commands from the Xbox Series gamepad) to verify its operation.