# Quadrotor UAV Dynamic Visual Servoing Based on Differential Flatness Theory
## 4 Simulation Results
### Global Tracking Strategy's Performance  
To validate the effectiveness of the global tracking strategy, we will consider the following experiment. The quadrotor takes off to reach a given altitude. The vehicle (target) is located just below the quadrotor. At a given moment, it begins to move according to a variable dynamic. As mentioned above, to ensure the pursuit or tracking of the vehicle, we have made three servo loops. In this section, we detail the simulation results of each loop.  
Figure 6: Performances related to the FOV constraint. (**a–d**) Displacement along the \(X\)- and \(Y\)-axes as well as the orientation along the \(Z\)-axis, both real (in red) and generated by the visual servo loop (in blue). (**e–g**) Linear translational velocities and angular rotational velocities. (**h**) Continuous detection of point \(P\) (target point) in the image plane.  
We include in this experiment the fact that the quadrotor cannot maintain a constant altitude throughout its flight. We choose the descriptor point \(P\) such that its projection on the image plane is located on the horizontal axis \(H\) which passes through the center of projection. This point will be less affected by the displacement along the \(Z\)-axis. We impose a variable altitude given by the following expression: \(z_{d}(t)=0.1 sin(0.04\pi t)+5\) for \(t\in[0,\,200\text{s}]\). The control law responsible for altitude control is given by Equations (3) and (5). The parameters of Equation (5) are chosen following experimental tests: \(k_{11}=10\) ; \(k_{12}=25\). The simulation results are given in Figure 7.  
Figure 7a represents the desired altitude and the altitude achieved by the quadrotor. We can clearly see that the quadrotor ensures the tracking of this altitude. Figure 7b represents the total force that is responsible for the displacement along the \(Z\)-axis. We note that it is a continuous command and physically realizable. In order to achieve any movement at variable speed and orientation, we have chosen (\(\omega_{1}\),\(\omega_{2}\)) as follows:  
\[\left\{\begin{array}{l}\omega_{1}(t)=20\sin(0.00026\pi t)+20\\ \omega_{2}(t)=20\sin(0.0002\pi t)+20\end{array}\right.,\text{ for }t\in[20,\,200 \text{s}]. \tag{38}\]  
The 2D dynamic visual servoing is provided by Equations (16) and (17). The coefficients of Equation (17) are given by \(k_{1}=28\) and \(k_{2}=28\). To realize the trajectory thus generated, a flatness-based control is proposed. The values of the gain that control the dynamics of the errors are given in Table 1:  
The simulation results are given by Figure 8. Figure 8a-c represent, respectively, the actual trajectory (displacement along \(X\), displacement along \(Y\), and orientation along the \(Z\)-axis) performed by the vehicle, the trajectory generated by the visual servo loop and the trajectory produced by the quadrotor using flatness control. We notice that the visual servoing algorithm generates a trajectory faithful to the real trajectory carried out by the vehicle (target). Flatness control ensures exact tracking of the generated trajectory. The evolution of the error in pixels between the position of the point \(p\) in the image plane and the desired point is given in Figure 8d,e. The evolution of the roll angle and the pitch angle,  
\begin{table}
\begin{tabular}{l c c c c c c c c c} \hline \hline
**Gain** & \(k_{21}\) & \(k_{22}\) & \(k_{23}\) & \(k_{24}\) & \(k_{31}\) & \(k_{32}\) & \(k_{33}\) & \(k_{34}\) & \(k_{41}\) & \(k_{42}\) \\ \hline
**Value** & 4 & 6 & 4 & 1 & 4 & 6 & 4 & 1 & 2 & 1 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Gain values associated with the dynamics of the errors.  
Figure 7: Loop1 simulation results. (**a**) Desired altitude vs. actual altitude. (**b**) Altitude control variations \(u_{1}\).  
respectively, are given in Figure 8f,g. We notice that these two variables remain sufficiently small during the trajectory tracking.  
Figure 8: _Cont._