## 3 Proposal
### Distributed Formation Algorithm3 (Dfa3)  
The distributed formation algorithm3 (DFA3) [7] was designed to arrange robots at the vertices of a convex polyhedron surrounding a central point of interest, e.g., a rogue drone trespassing a restricted area. Each UAV calculates its relative orientation and distance to the rest of UAVs based on the beacon signals received from each swarm member. Thisformation algorithm does not rely on any localisation system, such as GPS, and it works on dynamic scenarios, as the UAV positions are calculated with respect to the other UAVs and to the rogue drone (RD) using attracting and repelling forces to achieve a stable equilibrium. Figure 1a shows fourteen UAVs surrounding a central rogue drone and the attracting/repelling forces between them, while Figure 1b shows the attracting/repelling forces between the central rogue drone and the other UAVs. Only forces involving UAVs \(i\), \(j\), and \(k\) were explicitly named as examples, to make sure the figures are comprehensible. As the UAVs move, these forces change their orientation and intensity until the final stable positions are achieved. Hence, each UAV does not have a fixed final position in the formation that is known in advance. In our experiments, the central object is tracked using its own radio signal. However, other methods can be used such as LIDAR (light detection and ranging) or images from onboard cameras. The formation problem is defined by \(P=(G,co,S,C)\), where the distance graph is given by \(\mathcal{G}=(V,E,D)\), where \(V=\{UAV_{1},\ldots,UAV_{N}\}\) are the UAVs in the swarm, \(E=\{(i,j)\in V\times V\}\) are the edges of the graph indicating the swarm connectivity, and \(D=\{d(i,j),\forall(i,j)\in E\}\) are the distances between UAVs (\(D_{UAV}\)). Moreover, \(co\) stands for the central object, the distances between the robots and the central object are given by \(S=\{d(co,u),u\in V\}\), and the problem's constraint is given by \(C=\forall d(co,j)\in S,d(co,j)=D_{CENTRE}\), where \(D_{CENTRE}\) is the desired distance to the formation centre (sphere radius). We have observed that stable UAVs formations are frequently hard to achieve, as solving this problem implies taking into account constraints such as the absence of absolute positions, limited communication ranges, and unknown initial conditions. We have proposed in [7] four parameters for the swarm to address these difficulties: a distance threshold \(D_{THRESHOLD}\) to control the attracting/repelling movement between UAVs, the minimum distance \(D_{MIN}\) to the formation centre (where the rogue drone is), the intensity of the attracting/repelling force \(F_{CENTRE}\) with respect to the central object, and the UAV speed, \(SPEED\). The block diagram of our DFA\({}^{3}\) is detailed in Figure 2 and its pseudocode can be found in [7]. Each UAV executes the same algorithm using the swarm's optimal parameters and formation radius, i.e., the desired distance to the rogue drone \(D_{CENTRE}\), which is a constant value. Once the vector \(\vec{r}=\{r_{x},r_{y},r_{z}\}\) is initialised, a calculation of the forces with respect to the other UAVs is performed based on the received beacons and the given distance threshold \(D_{THRESHOLD}\). In the next step, the same calculation is performed, taking into account the rogue drone at the centre of the desired spherical formation, using the values of \(D_{MIN}\) and the extra intensity \(F_{CENTRE}\). The calculated inclination \(\theta\) and azimuth  
Figure 1: Swarm of fourteen UAVs escorting the rogue drone at the centre. (**a**) Attracting/repelling forces between UAVs. (**b**) Attracting/repelling forces between UAVs in the swarm and the rogue drone. Only forces involving the UAV\({}_{i}\), UAV\({}_{j}\), and UAV\({}_{k}\) are represented. \(\phi\) are finally obtained from the resulting vector \(\vec{r}\) to be used as the new moving direction (in 3D space) for the UAV.