1 Introduction

Unmanned aerial vehicles (UAVs) have emerged as autonomous flying robots that can perform different functions remotely. Although in the early stages they had military purposes [1, 2.1.1 Routing algorithms

In 1999, Bose et al. [12] explained the initial distributed algorithms for routing which eliminate the need for duplicating packets or memory at individual nodes, while also ensuring that the packet is delivered to its intended destination. These algorithms can be further developed to create broadcasting and geocasting algorithms that also eliminate the need for packet duplication. Furthermore, on-demand multicast routing protocol (ODMRP) was presented by Lee et al. [13]. The protocol utilizes a mesh topology to enable multicast transmissions by integrating the concept of forwarding groups, and employs on-demand techniques to establish routes and manage membership within multicast groups. Malik et al. [14] and Singh et al. [15] conducted a comparison of various routing protocols in vehicular ad hoc network (VANETs), and determined that the selection of routing protocol has a significant impact on packet delivery ratio, end-to-end delay, and transmission overhead. Similarly, Coutinho et al. [16] also evaluated the performance of different routing protocols and concluded that optimized link state routing (OLSR) outperformed on-demand distance vector (AODV) and destination-sequenced distance vector (DSDV) in VANET scenarios. Moreover, Bundel et al. [17] introduced two algorithms that are designed to minimize delays by establishing collision-free links for data aggregation. Compared to existing methods, these algorithms significantly reduce latency. Frey et al. [18] outlined the difficulties involved in develo** routing protocols for sensor networks, and emphasized on the essential methods for achieving efficient energy usage and ensuring a successful delivery. Radi et al. [19] discussed the potential benefits of implementing multipath routing in order to enhance network performance by optimizing the utilization of available network resources. Lastly, Amorosi et al. [20] recently examined the optimization of routing problems involving drones, exploring various approaches based on the assumption made about the path taken by a mothership.

2.1.2 Multi-hop routing algorithms

An enhanced multi-hop clustering algorithm (EMCA) was proposed by Qian et al. [21] in 2006. It utilizes multi-hop links for both intra-cluster and inter-cluster communication, and the scalability of the network significantly improves as its scale grows larger. In addition, Yamao et al. [22] presented a method for dynamic multi-hop transmission that can improve the probability of successful packet delivery by reducing unnecessary transmissions. Moreover, Rehman and Wolf [23] argued that relaying can be a technically suitable option for multi-hop connectivity in wireless ad hoc networks, and compares the performance of a multi-hop version of the IEEE 802.11 MAC protocol with the AODV routing protocol. Next, Kumar et al. [24] proposed a multi-hop clustering algorithm that was randomized and distributed, which successfully addressed the issue of hot spots in heterogeneous Wireless Sensor Networks (WSNs). This algorithm led to a significant increase in network lifetime and more balanced load distribution when compared to existing algorithms. By examining a proposed multi-hop routing protocol, Sharma et al. [25] evaluated how modifying the packet size affected its performance. He discovered that, as the packet size increased, the throughput reached a maximum at a certain point, and then gradually decreased. Biradar et al. [26] examined various multi-hop routing protocols, and concludes that the multi-hop-LEACH (low-energy adaptive clustering hierarchy) protocol consumes less power and exhibits lower latency compared to the other protocols. In addition, Prabha et al. [27] examined the various categories of wireless multi-hop ad hoc networks, and discuss the primary advancements that have been made in this field, which includes opportunistic networks. Furthermore, Pant et al. [28] put forward a multi-hop routing protocol that utilized grid clustering, resulting in a longer lifespan for the network when compared to existing algorithms. Finally, Pinto et al. [29] characterized multi-hop aerial networks of commercial-off-the-shelf UAVs, and derived the optimal number of hops that maximize the end-to-end throughput.

The related works are very specific. Sensor networks have major disadvantages such as (a) limited scalability, (b) high packet loss, (c) high latency, and (d) limited processing capabilities. In addition, VANETs also have disadvantages such as (a) transmission limitations, (b) frequent topology changes, and (c) low infrastructure availability. The analyzed works use different types of algorithms, whether distributed, graph-based, demand-based, etc. All of them attempt to solve most of the mentioned problems under very specific conditions. Our idea, developed based on hops and gateways, allows for a more general approach, and has a number of advantages: (i) reduction of network congestion, (ii) improved routing efficiency, and (iii) greater scalability.

2.2 Coordination models

A quite unconventional approach was presented by Parunak et al. [30], which utilizes a computational analog of pheromone dynamics to enable the coordination of multiple UAVs; this method can be implemented autonomously by a UAV. Secondly, Richards et al. [31] discussed solutions for autonomous task allocation and trajectory planning for a fleet of UAVs, and compared two optimization methods that integrate task assignment and path planning to address these challenges. In addition, Souza et al. [32] proposed an algorithm which is designed for coordinating multiple UAVs in a swarm formation, while ensuring efficient utilization of bandwidth in areas covered by mobile networks. Moreover, Yanmaz et al. [33] outlined the difficulties involved in creating cooperative airborne systems made up of drones equipped with onboard sensors, processing, coordination, and communication capabilities, and offered prospective resolutions based on acquired knowledge. Kim et al. [34] suggested a control scheme that enables real-time management of multi-hop drones even when they are out of the communications range of the ground control system. Chen et al. [35] investigated communication and networking techniques suitable for drone swarms, and proposed an intelligent and robust solution for drone swarms which can effectively improve the robustness to node failures. Lastly, Saffre et al. [36] outlined two approaches to control, direct and indirect, which have applicability in designing graphical user interfaces (GUIs), hence allowing a single operator to coordinate a swarm’s movements.

Related work presents three fronts: (a) use of control stations, (b) use of flight operators, and (c) automating swarms. We find that stations bring a number of disadvantages: (i) lack of flexibility, (ii) limitations in autonomy, (iii) infrastructure costs, and (iv) point dependency. In addition, employing a flight operator also has its disadvantages: (i) limitations in control, (ii) risks of human error, and (iii) lack of autonomy. The investigated works present very specific cases, and lack of multi-hop approaches. Hence, our swarm operates automatically and autonomously. In addition, the employed swarm maintains coordination using the master–slave pattern. This mechanism provides: (i) increased accuracy, (ii) increased efficiency, (iii) scalability, and (iv) improved ability to operate in remote areas. With our solution, we provide a coordinated and multi-hop swarm capable of carrying out complex missions without infrastructure support.

3 Proposal of a swarm management protocol for multi-hop**

The main objective of the protocol is to maintain coordination, connectivity, and communication stability in dispersed swarms in a multi-hop environment. Coordination can be achieved with different mechanisms such as negotiation, consensus, and master–slave. We have chosen the master–slave approach for its effectiveness, simplicity, and precise control of actions. In this mechanism, there are two types of nodes: (i) master, which coordinates the swarm, and (ii) slave, who obeys the orders of the master. In order to increase network performance, the master node is always the central node (from a geographical perspective), while the rest are slaves.

Coordinating the swarm in a multi-hop environment is complex. Distancing the nodes may be a requirement to cover a large area, but causes increased packet loss and delays due to poorer communication conditions. In fact, multi-hop** becomes a requirement whenever any of the nodes moves beyond the transmission radius of the master nodes. Hence, intermediate nodes are required to act as relays to carry out such communication, making sure all nodes are reachable. Hence, to ensure communication between the slaves and the master in multi-hop environments, it becomes necessary to differentiate the slaves into two types: (i) intermediate nodes and (ii) leaf nodes. The intermediate nodes are in charge of routing messages. The leaf nodes are the farthest from the master, and so they do not forward incoming messages; yet, in our approach, they are the first slaves to start transmitting.

In order for the proposed protocol coordination mechanism to work, we still need to ensure the stability and connectivity of communications. To do so, we must guarantee: (i) communication between master and all slaves, (ii) routing through intermediate nodes, (iii) maintaining coordination in high-dispersion scenarios, and (iv) avoiding network congestion.

To achieve the aforementioned requirements, the designed protocol has three states: (a) neighbor discovery, to quickly find the nodes within direct radio range, (b) multi-hop network setup, to determine the routes to/from the master, and (c) mission phase, for the actual flight. These are explained in detail in the following subsections.

3.1 Neighbor discovery

This is the first state of the protocol. Each node in the swarm sends and receives messages in a loop for a predefined amount of time (see details in Sect. 5). In this way, each node discovers which nodes are within their radio range.

Algorithm 1
figure a

Neighbor discovery state

Algorithm 1 shows the behavior during this state. As long as the execution time is less than the established time, a message containing the state identifier and the node identifier is sent; after sending, the channel buffer is read. If there is a neighbor discovery state message in the buffer, it is processed. The processing is simple: first the sender’s identifier is extracted, and then this identifier is stored in the neighbor list. Discovering neighbors is crucial for the next state.

3.2 Multi-hop network setup

In this phase, each UAV must: (i) know the number of hops to the master, and (ii) know its gateway. In addition, each node has to obey the following rules:

  • The master broadcasts a few messages that include the list of all its neighbors.

  • Each slave, upon receiving a message, propagates it only if three conditions are simultaneously met:

    1. 1.

      Its number of hops is higher than that of the message received (to minimize broadcast storm effects).

    2. 2.

      Its identifier is in the list received (to guarantee that only stable links are used).

    3. 3.

      It is able to reach nodes not yet included in the list (for the forwarding to be useful); this is achieved by adding its neighbors to the list and increasing the number of hops before retransmitting.

The master has a simple function. It only needs to send a predefined number of messages with (i) its UAV identifier, (ii) the multi-hop network setup phase identifier, and (iii) its neighbor list. Unlike the previous phase, sending a pair of messages still provides improved resilience to loss, and is better than using a timer. This change reduces network congestion and allows the slaves to learn and adjust themselves in a shorter time. Algorithm 2 shows the behavior of the master; for our experiments, the value of \(N_{replicas}\) has been set to four.

Algorithm 2
figure b

Multi-hop network setup—master

The slaves execute algorithm 3 in a loop until (i) at least one message has been received, (ii) the last message was received more than \(T_{timeout}\) seconds ago; for our current implementation this value has been set to 500 ms. During this time, the slave listens on the channel. If it receives a message, it ensures that the three conditions are met. If not, it starts again. Once the message has been received, the number of hops is first checked. If its hop count is higher than the number of hops in the message, it moves on to the next rule. Next, it checks if the associated list contains its identifier. Finally, if the node reaches more nodes than those present in the list, it forwards the message. Otherwise, it is a leaf node and exits the loop.

Algorithm 3
figure c

Multi-hop network setup—slave

Slaves do not have any hop count assigned at the beginning. When they receive the first message, they determine such value by increasing the hop count registered in the incoming message. Notice that the probability of receiving a first message from a node with more hops is negligible, but it can happen. This does not affect the number of hops, but it does affect the sending of messages in the mission. To avoid this, the gates and their hops are checked. If there is a node stored as a gateway, and it has a higher hop count than the current node, it is deleted. Coordination, connectivity, and stability of communications are guaranteed at this point. Finally, it is necessary to reduce channel congestion. The following sections explain the mission, and how to reduce network congestion.

3.3 Reducing and optimizing message delivery/reception

Piggybacking is the data transmission technique used at the link layer to improve performance. Its goal is to group an acknowledgment together with the next packet sent. This mechanism offers a decrease in packet transmissions, thereby improving efficiency. Notice that, when using multi-hop forwarding, the number of messages sent, and the channel congestion, may tend to increase. In addition, we do not ensure that the messages are received by the destination. This scenario is applicable when a message has a destination. The intermediate node will piggyback the message if, and only if, (i) the message it has to send has the same destination as the received message, and (ii) both messages belong to the same state. If these conditions are not met, it sends the received message without piggybacking its own message. Another kind of message is one that has no destination (broadcast), which is typically sent by the master, being addressed to all the slaves. In this case, piggybacking is not applicable. By implementing the piggybacking behavior on our protocol, we have managed to reduce the number of messages sent and the channel congestion, while increasing the efficiency during the course of the mission.

3.4 Mission

This mission consists of reaching a series of waypoints. To reach these waypoints, nodes alternate between two sub-states: (i) Waypoint Reached and (ii) Move to waypoint; such states are repeated in a loop until the last waypoint is reached.

In the Waypoint Reached sub-state, the master waits to receive at least one message from each slave in the swarm. This message contains: (i) the message identifier, (ii) a phase state identifier, and (iii) an acknowledgement of arrival. When this condition is fulfilled, it switches to the Move To Waypoint state. On the other hand, the slaves differ in their behavior. For instance, a leaf node starts by transmitting Waypoint Reached messages. In addition, it only receives Move To Waypoint messages. Upon receiving such a message, it changes its status to Move To Waypoint. Intermediate slaves do not transmit messages until they receive a message from the leaf or its neighbor. At this point, they can send their own Waypoint Reached message. When a message is received, it can be associated to either the Waypoint Reached or the Move To Waypoint sub-state. For Waypoint Reached cases, the node retransmits this message. On the other hand, if it is a Move To Waypoint message, it also retransmits such message before transitioning to the Move To Waypoint state.

The Move To Waypoint state is simpler. The master sends messages to the slaves to tell them to move forward. The message structure consists of: (i) the message identifier, (ii) a phase identifier, and (iii) the command to move. The slave nodes read in the channel buffer. If they receive a Move To Waypoint message, they retransmit it. This last step does not apply to leaves. The main objective of this mission is to check the correct coordination of the swarm, and to measure: (i) the channel congestion and (ii) the mission duration.

4 Methods

UAV development tends to rely on two alternative strategies: real deployment or simulation experiments. Researchers tend to simulate, since using physical devices can involve significant monetary and material resources. On the other hand, simulations allow achieving a more sophisticated and optimal product, and possibly bring it to a real environment in a safer way.

There is a wide range of simulators on the market today. In this work, we relied on the ArduSim simulator [11]. This simulation tool supports real-time simulations, being an innovative feature in the market. Communications between devices are established through the use of a virtual wireless channel that emulates communications in shared environments in real time. The simulator, being open source, allows different users to create their own solutions, from protocols to specific communication channels. Below, we explain the most relevant points related to this project. For more details, we recommend reading [11].

4.1 Physical layer model & communication channels

As stated before, ArduSim is a multi-UAV simulator. In order to bring our simulator close to reality, we took great care of simulating the communications between the UAVs. The most straightforward way to provide communication between real UAVs is to rely on broadcasting (in an ad hoc network) using UDP. However, UDP packets can get lost. We can model this behavior to various degrees of accuracy. In general, the higher the accuracy, the longer it will take to calculate whether a packet will get lost. Since the communication between the UAVs is a central part of our simulator, we provide three different models:

  • Unrestricted. It uses an ideal medium where data packets always arrive to all possible destinations (basic model).

  • Fixed range. Data packets arrive to another UAV only if the distance between them is lower than the defined threshold (simple model).

  • Realistic 802.11a with 5dBi antenna. The probability that a data packet is received by another UAV depends on the distance between the UAVs. This realistic model is obtained from real experiments where the packet loss rate between two UAVs was measured using a Wi-Fi ad hoc network link in the 5 GHz band. Out of these experiments, we derived a model for the package loss as a function of the distance (x) between the UAVs. Beyond 1350 ms, we consider that packet losses reach 100%, and for smaller distances the package loss is modeled by \(y = 5.335 \cdot 10^{-7}\cdot x^2 + 3.395 \cdot 10^{-5} \cdot x\). Furthermore, in this model, we include carrier sensing functionality.

In all the three models explained above, we are also implementing carrier sensing (as a real network card would do) to ensure that one UAV will not start its broadcast while another UAV is already sending its information. Furthermore, we also consider packet collisions, the transmission time, and the size of the input buffers of the network card.

4.2 Available flight formations

Finally, within the simulator, the user has a defined set of flight formations to structure the swarm, and thus carry out the established mission. The following list shows the different formation types available:

  • Linear formation: it positions each UAV on a straight line. Each identifier is assigned from left to right, and the master node is placed in the center.

  • Random formation: as its name suggests, it distributes the drones randomly around the master. This formation has been useful for performing certain checks with the previously mentioned protocols. Due to its inherent nature, this formation hinders the development of a coherent multi-hop solution.

  • Matrix formation: it places the master node at the center of the swarm and, consequently, the slave nodes are placed around it to form a square matrix that scales as the size of the swarm increases.

  • Circular formation: it distributes the slaves around the master by drawing a circumference following a clockwise direction. The limitations of this formation are given by the communications range; therefore, it is not optimal for applying the multi-hop approach.

5 Results and discussion

The simulator has a wide variety of configurable parameters. For this article, we have used collision detection and carrier sensing. The formations used are linear and matrix. In each we have performed tests for 2, 4, and 6 hops. Messages are transmitted every 500ms (two messages per second) and received every 25ms to avoid saturating the network. The separation between nodes is 240 m. The communication range has been limited to 300 m. This limitation forces the swarm to have each node with the minimum number of neighbors (worst-case scenario). Stressing the network to the maximum allows us to check if the proposed solution is able to overcome the worst-case conditions. The following list specifies the parameters:

  • Formations: linear and matrix

  • Communication range: 300 ms

  • Distance between nodes: 240 ms

  • Maximum distance between leafs and master: 2, 4 and 6 hops

  • Number of drones (linear/matrix): 5/9, 9/25, 13/49

  • Sending time: 500 milliseconds

  • Receiving time: 25 milliseconds

5.1 Pre-mission phase time overheads

Before executing the mission, the neighbor discovery and multi-hop network setup states are executed. Neighbor discovery requires some time to define the neighbors in each node (Fig. 1). We have run the algorithm for 10 s. Here, we have captured precisely what each node requires to discover its neighbors. In Fig. 2, we observe the times in both formations. In linear formation, the leaves have one neighbor, while the master and the rest of the slaves have 2. In the matrix formation, the leaves have two neighbors, their neighbors have 3, and the remaining nodes have 4. The minimum time to complete this state is 50 ms, and the maximum is 1.5 s. We have fixed the timeout at 2 s to guarantee that all nodes are able to discover their neighbors.

Fig. 1
figure 1

Flight Formations. Different flight formations used for experiments

Fig. 2
figure 2

Multi-hop network setup overhead. The network setup overhead for linear and matrix formation depending on the number of neighbors

We have measured how long it takes to establish the leafs to measure the time overhead on the multi-hop network setup. Messages are sent every 500 ms. Therefore, two hops are theoretically reachable within 1 s. Figure 3 shows the expected behavior. Arrayed leaves take longer as they require more neighbors in the leaves. The minimum time to complete this state is 900 ms, and the maximum is 3.5 s. We have 950 ms as the minimum, and 5 s as the maximum time to establish the multi-hop network in the swarm.

Fig. 3
figure 3

Multi-hop network setup overhead. The network setup overhead for linear and matrix formation depending on the number of hops

5.2 Linear formation performance

In Fig. 4, different behaviors are observed: (i) the leaves send more messages when the number of drones grows, (ii) the rest of the slaves decrease their message sending as the swarm grows, and (iii) the master also decreases its message sending. In the Waypoint Reached state, the leaf must communicate with the master, and its message must arrive in order to enable piggybacking messages from the intermediate nodes. As the number of hops increases, packet loss also increases, so it must send more packets to increase resilience to loss. The intermediate nodes experience a decrease in the number of messages received. Hence, they will only forward the few that reach them. Likewise, the master will receive even fewer packets. This will result in less forwarding events. On the other hand, the Move To Waypoint state only involves the intermediate nodes and the master. This is the reason for the large difference detected in the sending of messages.

Fig. 4
figure 4

Sent messages per minute for the linear formation. Number of messages send per minute in the linear formation showing the difference between leaf nodes, intermediate nodes, and the master node

The reception of messages has an inverse behavior, as shown in Fig. 5. The leaf nodes are the ones that listen all the time. As we increase the number of hops, the reception decreases, meaning that the master node receives fewer messages. In addition, with more hops, the intermediate nodes become more saturated; in particular, intermediate nodes in the Waypoint Reached state experience more congestion than the rest; in fact, since they are responsible for reading messages from both states, more channel congestion and resource consumption takes place.

Fig. 5
figure 5

Received messages per minute for the linear formation. Number of messages received per minute in the linear formation showing the difference between leaf nodes, intermediate nodes, and the master node

Finally, Fig. 6 shows the total flight time. In all cases, the same behavior is observed. The master node finishes first, the intermediate nodes follow, and the leaves are the last ones to finish as expected. Also note the time difference. Theoretically, two hops are one second. Therefore, a theoretical difference of 1, 2, and 3 s is expected in each trial. However, as observed in our experiments, this time increases.

Fig. 6
figure 6

Linear formation total flight time. The total flight time in the linear formation, showing the difference between leaf nodes, intermediate nodes, and the master node

5.3 Matrix formation performance

Figure 7 shows that the matrix formation behaves similarly to the linear formation regarding the sending of messages. However, message loss levels are higher. In the latter case, it is observed how the amount of messages sent by the leaves almost equals the others. In the matrix formation, there are more routes available to forward messages. Therefore, it is expectable to experience a higher level of loss.

Fig. 7
figure 7

Sent messages per minute for the matrix formation. Number of messages send per minute in the matrix formation showing the difference between leaf nodes, intermediate nodes, and the master node

Message reception increases in this formation. Figure 8 shows the same behavior in the leaf nodes. However, the master node, instead of experiencing a reduction of received messages, experiences an increase. This behavior is caused by packet loss. The master node, during the Waypoint Reached state, must register all 48 slave identifiers. An increase in reception indicates that packet loss causes certain identifiers to take longer to arrive. This indicates that the intermediate nodes suffer more congestion in this formation due to the increased number of neighbors, which are prone to cause collisions on the channel.

Fig. 8
figure 8

Received messages per minute for the matrix formation. Number of messages received per minute in the matrix formation showing the difference between leaf nodes, intermediate nodes, and the master node

The flight time is similar to the Linear formation. In the first case, a 1-s leaf-master lag is expected. However, tests show that, in reality, this time lag is higher. In the second case, the expected time lag is 2 s; yet, the result obtained is three times greater than expected. Finally, the scenario with 49 drones should have a time lag of 3 s. However, the result obtained is almost three times the theoretical time lag. These results, obtained from Fig. 9, are associated to the high packet loss.

Fig. 9
figure 9

Matrix formation total flight time (s). The total flight time in the matrix formation showing the difference between leaf nodes, intermediate nodes, and the master node

6 Conclusions and future work

Drone swarms have great potential. Yet, swarm missions must maintain cohesion and coordination to be successful. Achieving such goals can become more complex in multi-hop environment due to channel losses and associated delays. To address this challenge, in this paper, we propose a swarm management protocol for flying in multi-hop environments. The protocol consists of three states: (i) neighbor discovery, (ii) multi-hop network setup, and (iii) mission. The first two states add a minimum time overhead of 950 ms and a maximum of 5 s. Tests show how increasing the number of hops causes an increase in packet loss. This causes an increase in the send rate, a decrease in the receive rate, and a temporal increase in the flight time. However, the swarm has been able to successfully fly in both linear (5, 9, 13 drones) and matrix (9, 25, 49 drones) formations.

As future work, we want to further investigate the effectiveness of our solutions by carrying out experiments in a real environment. In particular, we plan to determine the resilience levels achieved under adverse channel conditions, including the presence of obstructions, and highly fluctuating signal-to-noise ratios. Furthermore, we are interested in comparing our proposed solution with other existing related works.