# Consensus Algorithms Based Multi-Robot Formation Control under Noise and Time Delay Conditions
## 4 Simulation Verification  
In this section, two sets of Matlab/Simulink numerical simulation experiments are carried out to verify the consensus of the system described in Theorems 1 and 2 when the communication topology is undirected graph and directed graph under the conditions of noise and various delays. **Experiment 1**. : _Let system (14) consist of four robots whose communication topology is shown in Figure 1._  
As can be seen from Figure 1, the time delay between robots 1 and 2 is \(\tau_{1}\), between robot 2 and robot 3 it is \(\tau_{2}\), between robot 3 and robot 4 it is \(\tau_{1}\), between robot 4 and robot 1 it is \(\tau_{2}\). If the adjacent communication weight \(a_{ij}\) is 1, then the Laplace matrix \(\mathbf{L}\) is:  
\[\mathbf{L}=\left( \begin{array}{cccc}2&-1&&-1\\ -1&2&-1&\\ &-1&2&-1\\ -1&&-1&2\end{array} \right) \tag{33}\]  
We can get \(\lambda_{\max}=4\). Assume that the communication noise or measurement noise is white noise with a maximum amplitude of two. According to Theorem 1, \(\tau_{\max}=0.226\). In the first group of Experiment 1, set \(\tau_{1}=0.21\), \(\tau_{2}=0.22\), and the initial posture is assumed to be (1,0), (2,0), (3,0), (4,0). The simulation results are shown in Figure 2.  
To verify Theorem 1 and compare with the first group of experiments, in the second group of experiments, set \(\tau_{1}=0.23\), \(\tau_{2}=0.24\) under the same conditions. The simulation results are shown in Figure 3.  
According to Experiment 1, system (14) satisfying lemma 1 can achieve consensus when all \(\tau_{d}\) are less than \(\tau_{\max}\), and the system will diverge when all \(\tau_{d}\) are greater than \(\tau_{\max}\), which cannot achieve consensus; thus Theorem 1 is verified. Figure 1: Experiment 1 system communication topology. Figure 3: _Cont._  
Figure 2: Experiment 1 Group 1 simulation results; \(x\) is position, \(v\) is velocity. (**a**) Trajectory of \(x\) changing with time; (**b**) Trajectory of \(v\) changing with time. **Experiment 2**. : _Let system (14) consist of four robots whose communication topology is shown in Figure 4._  
The time delay from Robot 1 to Robot 2 is \(\tau_{1}\), from Robot 2 to Robot 3 it is \(\tau_{2}\), from Robot 3 to Robot 4 it is \(\tau_{3}\), from Robot 4 to Robot 1 it is \(\tau_{4}\). If the adjacent communication weight \(a_{ij}\) is 1, then the Laplace matrix \(L\) is:  
\[L=\left( \begin{array}{cccc}2&&-1&&\\ -1&1&&-1\\ &-1&2&&\\ -1&&-1&1\end{array} \right) \tag{34}\]  
Then \(k_{0}=\min\limits_{\|\lambda_{i}\|\
eq 0}\left\{\frac{\|\lambda_{i}\|^{2} \text{real}(\lambda_{i})}{\text{imag}(\lambda_{i})}\right\}=\frac{5\times 2}{1} \text{= }10\), so \(k_{1}\in(0,10k_{2}^{2})\). Assume that the communication noise or measurement noise is white noise with a maximum amplitude of two. Set \(k_{1}=1\), \(k_{2}=1\), according to Theorem 2, \(\tau_{\text{max}}=0.137\). In the first group of experiment 2, set \(\tau_{1}=0.13\), \(\tau_{2}=0.12\), \(\tau_{3}=0.11\), \(\tau_{4}=0.1\), and the initial posture is assumed to be (1,0), (2,0), (3,0), (4,0). The simulation results are shown in Figure 5.  
To verify Theorem 2 and compare with the first group of experiments, in the second group of experiments, set \(\tau_{1}=0.14\), \(\tau_{2}=0.141\), \(\tau_{3}=0.142\), \(\tau_{4}=0.143\) under the same conditions. The simulation results are shown in Figure 6.  
Figure 4: Experiment 2 system communication topology. Figure 3: Experiment 1 Group 2 simulation results; \(x\) is position, \(v\) is velocity. (**a**) Trajectory of \(x\) changing with time; (**b**) Trajectory of \(v\) changing with time. Figure 5: Experiment 2 Group 1 simulation results; \(x\) is position, \(v\) is velocity. (**a**) Trajectory of \(x\) changing with time; (**b**) Trajectory of \(v\) changing with time.