# Data-Driven Formation Control for Multi-Vehicle Systems Induced by Leader Motion
## 6 Simulation Results  
In this section, we apply the results achieved in this paper to a second-order multi-agent system depicted in Figure 1. All simulations are performed through the use of the software Matlab, The MathWorks, Inc., Natick, MA, USA. We assume that the multi-agent system is made of interconnected mobile devices moving in the plane \(xy\) so that their motion is described by Equation (5) with \(m=2\), and we assumed, without loss of generality, that \(M_{i}=1\) for each node. All the system evolutions shown in the following are run under the same initial conditions, and this is motivated by the opportunity to compare them. We consider the goal of achieving a static consensus condition, thus applying protocol (12). Protocol parameters \(\delta\) and \(\gamma\) of (12) have been set equal to \(\delta=\gamma=1\). In Figure 2, the evolution of the system running protocol (12) with no additional motion by the leader is plotted. In this simulation, it is straightforward to see that positions asymptotically move  
Figure 1: Graph topology of the multi-agent system considered in Simulations. to a common value, while velocities are asymptotically zero. This is theoretically related to Equation (13). We now apply the results of Section 4.1 and Equations (65) and (66). We set \(\mu=6\), and we sought the solution through the approach of [31], which was found equal to:  
\[\mathbf{a}= \begin{bmatrix}2.8&-0.01157&0.0238&-0.013&0.0007&0&0\end{bmatrix} ,\]  
\[\mathbf{b}= \begin{bmatrix}1&0.117&0.016&-0.013&0.002&0&0\end{bmatrix} .\]  
Figures 3 and 4 show the evolution of the consensus variables along the \(x\) and \(y\) direction. The goal of consensus seeking is easily seen in finite time with much faster convergence than the case with no leader motion. Based on the algorithm described above, we derive some formations considering the displacement-based approach. The first formation shape is an exagon inscribed in a circle of radius \(10\). Each vertex can be easily computed as \(P_{k}=\left(10\cdot\mathrm{Re}\Big{[}e^{\frac{k\pi}{y}}\Big{]},10\cdot\mathrm{ Im}\Big{[}e^{\frac{k\pi}{y}}\Big{]}\right)\), \(k=0,..,4\), so that:  
\[\mathbf{r}_{x}^{d}= \begin{bmatrix}10&5&-5&-10&-5&5\end{bmatrix} ^{\top},\]  
\[\mathbf{r}_{y}^{d}= \begin{bmatrix}0&8.66&8.66&0&-8.66&-8.66\end{bmatrix} ^{\top}.\]  
Figure 3: Evolution of multi-agent system trajectories under protocol (12) and leader motion action: consensus value along \(x\) direction. Solid lines are used to plot the positions over time, while dotted lines are adopted for agents’ velocity plots. Figure 2: Evolution of multi-agent system trajectories under protocol (12) and no leader action. Solid lines are used to plot the positions over time, while dotted lines are adopted for agents’ velocity plots. This allows us to compute, separately along the \(x\) and \(y\) axis, the displacements \(\delta_{xij}=(\mathbf{r}_{x}^{d})_{i}-(\mathbf{r}_{x}^{d})_{i}\), \(\delta_{yij}=(\mathbf{r}_{y}^{d})_{i}-(\mathbf{r}_{y}^{d})_{j}\) to reach the formation shape, through the use of (12) adjusted as (see [24] Equation (13)):  
\[\mathbf{u}_{x_{i}}(t)=-\mathbf{v}_{xi}(t)+\sum_{j=1}^{N}[\mathcal{A}]_{ij}k_{ ij}[(\mathbf{r}_{x_{j}}(t)-\mathbf{r}_{x_{i}}(t))-\delta_{xij}+(\mathbf{v}_{x_{j} }-\mathbf{v}_{x_{i}})], \tag{73}\]  
along the \(x\)-axis, and analogously for the \(y\)-axis. Figure 5 shows the \(x\)-\(y\) plot of the trajectory under protocol (73), thus showing the exagon shape of the reached formation clearly. It is worth noting that the multi-agent formation is centered around the consensus value of the initial conditions, and it may result in a key feature for several mission objectives. The results of the simulation are plotted in the next figures, and more in detail Figure 6, Figure 7, show separately the positions along the \(x\), \(y\), direction.