# Simulation of Autonomous Underwater Vehicles (AUVs) Swarm Diffusion
## 2 Materials and Methods
### Reliability of the Swarm
#### 2.4.2 Reliability of K-out-of-\(n\) System  
The simple reliability of the previous section is not practicable for us, because the loss of only one of the drones would lead to the loss of the whole mission and, therefore, for us, this is not acceptable. We have established that the minimum number of drones to complete the mission is 16 (k = 16): Assigning to each drone an area equal to 1.51 \(\times\) 0.5 km, we obtain a perimeter equal to 6 km; in the worst case, the drone runs along the perimeter, at an average speed of 30 km/h, in just under 13 min. In our mission, the GPS checks take place at an average of one hour, so it has time to travel the perimeter four times, more than enough to detect what is required of it. Now, posing R = 0.9 as, according to the classical calculation, we will obtain insufficient reliability, we have to support it with a number of other drones so that it can complete the mission. The value 0.9 is a requirement that was placed on us by the Coast Guard when setting up the study on this system. We now consider the main objective of this section: To obtain an expression for the reliability of the k-out-of-\(n\) system (drones):  
\[R_{k/n}=\sum_{i=k}^{n}\left( \begin{array}{c}n\\ i\end{array} \right)p^{i}(1-p)^{n-i} \tag{19}\]  
where:  
\(n=25\) is the number of items (drones). \(k=16\) is the minimum number of drones necessary to accomplish the mission  
\(p=1.651\times 10^{-9}\) is the probability of failure of the single drone at time \(t\) = 168 h  
Thus, we have  
\[R_{16/25}=0.981\]  
Above the required reliability of \(R_{required}=0.9\), the overall \(1.651\times 10^{-9}\) value was deduced starting from the reliability value of the single drone whose calculation was performed some time ago by our working group, and it is not the subject of this paper [15]. **Self-purging Redundancy**  
Our redundancy scheme is a self-purging redundancy, a scheme that uses a threshold voter based on fuzzy logic that \"purges\" the failed drones and declare it off-line. Each drone, at regular intervals, performs a BIT (Built-in Test) to check the operating status of all its subsystems. This is the first technical check that, if not passed, puts the drone off-line. Subsequentchecks are necessary as these vehicles are designed for medium-long missions at sea and, therefore, the occurrence of a failure is high (see Figure 4). Another BIT method lays the foundations on the prognostics of the subsystems: As digital systems also undergo analog degradation, today, the level of confidence with the electronics and on-board systems is extremely high, so we can have, in advance, the model of fin degradation of the single component. Therefore, from a reliability point of view, we can know what the \"safety margin\" of the subsystem in question is, as a function of the useful life that is decreasing over time. In other words, at time t, we can say that the subsystem \"x\" has a well-known percentage of useful life. Not only that, but its degradation state \(f_{i}^{s}\) is \"weighed\" with another parameter \(f_{i}^{m}\), which is peculiar to the mission in which the \(i^{th}\) drone subsystem is involved at the time of the BIT. This gives us the general state of efficiency \(\mathcal{F}_{i}\) according to the mission _m-type_:  
\[\mathcal{F}_{i}=\frac{f_{i}^{s}}{f_{i}^{m}} \tag{20}\]  
For example, in a mission of very short duration, the state of the batteries \(f_{BatteryPack}^{s}\) is acceptable even if partially degraded to 50% because it is called to respond only with a fraction of the stored energy; on the contrary, if the mission requires the identification of crude oil leaks, the sensor that detects the hydrocarbons is required for maximum efficiency. In our case, _fuzzification_ consists of the conversion of input values (which, in our case, is degradation value) into linguistic values with a degree of membership that can be given, as in our case, by continuous functions peculiar to each single subsystem.