# Simulation of Autonomous Underwater Vehicles (AUVs) Swarm Diffusion
## 2 Materials and Methods
### Simulation  
We have considered that the swarm must be composed of 25 UAVs because they were uniformly distributed over the entire surface. Obviously, in operating conditions in a wider scenario, we can imagine the presence of nine drones in stand-by conditions that would occur in the case of the malfunction of one or more elements of the swarm. In our simulation, at time \(t=0\), all vehicles are put into the sea all at the same time in the _\"Start point 0,0\"_, which corresponds to the corner of the square area. This is a real case: As our drones do not need a support boat, they can be released into the sea like a simple dinghy from a slide. The diffusive parameters of Equation (25) are the same as those in Table 2:  
The simulation was performed with the combined Matlab(r)/Simulink(r) tool: The results were validated separately on a sample of 30 specific points. The values were derived from experimental tests. It starts (see Figure 7) from the previous _status_ of the drone: its _health_ (evaluated in accordance with the self-purging redundancy paradigm) is then inserted if this is off-line; otherwise, it is declared operational. In this case, it triggers the navigation cycle based on the inertial system (INS), \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline \# of Vehicles & 25 \\ \(\varphi_{r}\) & 0.0055 \\ \(\varphi_{a1}\) & 0.81 \\ \(\varphi_{a2}\) & 3 \\ \(\varphi_{a3}\) & 0.099 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters of the simulation. Figure 6: Surface probability vs. time. which evaluates expression (30) of Section 2.6, which provides the speed to which a random part is first added and then the swarm component is added. First, however, it is also assessed on the basis of the proximity of the other drones: If one of them is too close, an automatic anti-collision procedure is started, which will then update the Kalman filter register. Eventually, we reach the speed of the drone: This data will also update the Kalman filter register. At the end, the speed data will return to the inertial computer (INS), which can be interrupted at any time by a possible malfunction that will make the health condition critical. In Figure 8, we show how the probability density varies spatially by taking three \"snapshots\" over time, at intervals of 0, 0.5, 1, 4, 8, and 12 h.  
In the initial conditions, \(t=0\), all 25 drones are entered at point \"0.0\": The point chosen is precisely the port of Piombino. Once slipped into the sea, vehicles are free to spread throughout the previously defined area. When a drone reaches the limit of the surveillance area, it behaves exactly like a gas particle: The AUV \"bounces\" on the limit with a purely elastic impact, that is, it changes its velocity vector by a complementary angle at 180\({}^{\circ}\), maintaining its absolute value in speed. As mentioned above, the variations in the depth plane are absolutely modest compared to the displacements on the horizontal plane: This is due to the fact that the drone was designed for use in shallow waters and the payload, in our case study, is designed for exclusive surface use. We observe the progressing development of the simulation. Figure 8a illustrates the blue square in which the simulation superimposed on the nautical chart of the Piombino strait takes place: All the drones (red dots) are inserted in the _start point_ corresponding, for accuracy, to the commercial port of _Salivoli_. At time \(t=0\), they are all very close, almost coincident. In Figure 8b, we see the expansion of the drones at \(t=0.5\) h.  
They are still concentrated in the corner but begin to push toward the center of the square. In Figure 8c,d, we still see two other phases of the expansion in which the drones begin to frequent even the most distant areas. In Figure 8e, we have a very low \"swarm speed\"; moreover, the probability density is almost constant. In Figure 8f, the evolution is completed: From a dynamic point of view, the drones move but their density is constant and the _swarm speed_ is zero.