Relay Positioning Strategy for Traffic Data Collection of Multiple Unmanned Aerial Vehicles Using Hybrid Optimization Systems: A FANET-Based Case Study

In the new context of Next Generation Networks, Aerial Ad Hoc Networks, also known as FANET (Flying Ad Hoc Network), are being used to monitor areas of difficult access. Owing to the dynamism and autoconfiguration of this type of network, a strategy is needed to position its devices (drones) to ensure it can achieve good performance. In light of this, this paper proposes a flight path planningmodel, which involves a metaheuristic optimization-based approach.The proposal relied on the artificial neural networks to optimize the positioning of the relay device, so that the throughput between the other devices could be increased; the benefits of the proposal were demonstrated through simulations.


Introduction
In recent years, as a result of technological advances in areas such as robotics, telecommunications, and computer networks, Unmanned Aerial Vehicles (UAVs) have emerged as an alternative means of providing diverse applications in both civilian and military areas. These UAVs aim to improve or create a network infrastructure in places that are difficult to access, such as areas of natural disasters or enemy territory. In this area, an Air Ad Hoc Network has emerged as an acceptable solution since it enables information to be collected in a more flexible, fast, and reliable way [1].
In [2], the authors state that the main challenge of FANET is to perform cooperative detection using multiple UAVs to cover an area that cannot be covered by a single UAV. In this way, it can create an overhead network in which its devices (drones) communicate by transmitting information to each other. Thus, it is necessary to have reliable and stable communication between the devices to maintain good levels of QoS (Quality of Service) and QoE (Quality of Experience).
In most FANET applications, the objective is to collect data from the environment and relay them to a ground base station. The topology of a FANET network consists of several UAVs (Unmanned Aerial Vehicles) and a UAV relay, which is responsible for receiving information from the other UAVs and transmitting it to a base station on the ground. Establishing the position of the UAV relay in relation to the other UAVs is of paramount importance to ensure the satisfactory performance of the network since it must be accessible directly or indirectly (i.e., communication via intermediary devices) to all the other elements of the network. This has led to an increase in the number of studies on UAV relay positioning in the academic community.
This paper proposes a model that can establish the best real time positioning of a UAV relay among multiple UAVs used for flight missions in scenarios such as those shown in Figure 1. The objective is to fly the drone in real time to its optimal placement based on a knowledge of the position required for flight missions or the location of the optimal placement. Thus, the proposal aims to conduct the relay in real time to an "ideal" location (where a good level of communication can be maintained with all the other devices). This positioning will be determined by the location of the other multiple UAVs of the network and the proposal outlined in this article will calculate/optimize the new UAV relay location. The proposal is divided into two key phases, which involve activating the mobility of the UAVs through the Network Simulator (NS-2) and using the mobility data of the UAVs in an Artificial Neural Network (AAN) in MatLab (the position and traffic of the UAVs with the relay were used for the training of the neural network), which will indicate the position of the UAV relay.
This article is structured as follows: Section 2 discusses reviews from related works; Section 3 describes the proposed optimizer in detail; the results obtained from the simulation are shown in Section 4; and Section 5 summarizes the conclusions and makes suggestions for future work.

Related Works
This section discusses the related work and examines the Aerial Ad Hoc Networks (FANETs). In addition, it calculates the positioning of the UAV relay with the aim of improving network performance.
In [4], UAVs are used for locating forest fires. Their approach leads to an improvement in the localization mission through a decision-making strategy, resulting from a temperature-based probabilistic model that is designed to estimate the distance to the forest fire. The UAV adjusts its trajectory according to the state of the knowledge of the fire, using a map to represent its knowledge, which is updated at each stage of its exploration.
In [5], an accurate analytical model is set out to reduce signal interference between the UAVs and the base station. The algorithm performs uniform frequency hopping within the bandwidth channel itself and has achieved service quality gains in overload or "interrupt cells." However, in the article, there is no applied artificial intelligence technique that can make the task of optimization more efficient and faster, and in most situations, only a new relay UAV positioning would be able to achieve gains.
Reference [6] suggests forming a set of Aerial Ad Hoc Networks, including several backbones of FANETs that communicate with each other and also communicate with a base station. This composition of several backbones increases the coverage area of the monitored region, but there has been no study on the proper way to position the devices to ensure that the network can perform in the best possible way.
The article of [7] includes a control scheme for the movement of the UAVs within a particular coverage area. The motion control scheme is based on the distance between the UAVs and their signal strength and allows them to have good communication, thus having good transmission rates. However, controlling the movement is not the most viable solution because certain areas of the coverage area are not sufficiently monitored.
The authors in [8] aim to minimize the number of MBSs needed to provide wireless coverage for a group of distributed ground terminals (GTs), ensuring that each GT is within the communication range of at least one MBS. A polynomial time algorithm with successive MBS placement is used, where the MBSs are placed sequentially starting on the area perimeter of the uncovered GTs along a spiral path toward the center, until all GTs are covered.
An efficient algorithm is necessary to maneuver each UAV so that the whole system can produce complex, adaptable, and flexible team behavior. The task-planning problem for UAV networks with connectivity constraint involves a number of parameters and interaction of dynamic variables. An algorithm has been proposed for such a situation [9]. There is also an algorithm for distributed intelligent agent systems in which agents autonomously coordinate, cooperate, negotiate, make decisions, and take actions to meet the objectives of a particular task. The connectivity constrained problem is NP-hard and a polynomial time heuristic has been proposed in the literature [10]. Reference [10] is the closest related work by also having proposed a heuristic algorithm, but without any evaluation of Quality of Service and Quality of Experience.
The articles cited in this section have led to several improvements being made within the context of FANET applications. However, no techniques were employed that aimed at maintaining high performance in the data transfer, which is achieved through the positioning of the UAVs. None of the papers cited used hybrid networks to manage the decision-making required for the best positioning between the mission-based UAVs and UAV relay. In light of this, Wireless Communications and Mobile Computing this work employs techniques that allow the use of these networks both in ad hoc applications and in other wireless technologies.

FANET Application Features
The main feature of the Ad Hoc Networks, referred to by the IETF (Internet Engineering Task Force) as MANET (Mobile Ad Hoc Network), is that they do not have an infrastructure, and as a result, all network's functions must be carried out by the nodes themselves. This means that the nodes that make up an Ad Hoc Network must be able to communicate with each other as routers.
Ad hoc Networks are generally used in scenarios where there is a need to quickly deploy a network and usually where there is no proper infrastructure. Nodes can move arbitrarily within them and change the network topology in an unpredictable way, which requires the constant adaptation and reconfiguration of routes so that the nodes can still communicate with each other.
In the new context of Next Generation Networks (NGNs), a derivation of Ad Hoc Networks called FANET (Flying Ad Hoc Network) arises. FANETs are Ad Hoc Networks consisting of remotely controlled flying elements (UAVs: Unmanned Aerial Vehicles) that communicate with each other [11], and because FANETs have flexibility, versatility, and even ease of operability, they are used for both military and civilian applications, such as border control in risk zones, deforestation monitoring, and traffic flow control ( Figure 2).
In FANET networks, the mobility index is much higher than in a traditional Ad Hoc Network; thus changes in topology are more frequent and even the coverage area is larger (depending on the type of hardware and technology used). That is why FANET networks have to be self-configuring and self-organizing; a FANET network must be prepared for sudden changes in its topology, in organization, and even in its communications systems.
The mobility of mobile units and their spatial arrangement are also very important in determining the communication routes. As a result of the movement, these routes are usually replanned to allow continuous interconnection of the nodes. For this reason, routing must be carried out dynamically and the activities involved in the routing protocol must be effective and simple, so as to give greater autonomy to the nodes and reduce the delay in the delivery of data from a sender node to a destination node.
The communication between the UAVs largely depends on their location, since all the information collected from the environment is concentrated in a UAV relay node (which is responsible for relaying the data to a control center). Hence, its positioning in relation to the other nodes must be strategic enough to ensure that the network maintains a good performance. It is not an ideal situation if the UAV relay has an excellent communication with some UAVs while at the same time having poor communications with the other UAVs in the network [12].
The UAVs are responsible for flying over the environment; they have sensors to collect information and a higher energy load than traditional sensor networks that means they can communicate with each other more easily by finding fewer obstacles in their line of sight. This should reduce the number of nodes needed to cover a given area, although climatic conditions can impair communication (wind, rain, etc.) [13].
It should be noted that the computational power of FANETs networks means that they have a greater capacity to transmit information, since in many cases they are responsible for transmitting information in real time (with videos from the monitored environment). There have been no specific routing protocols for FANETs so far, and the traditional protocols used in Ad Hoc Networks (e.g., AODV, OLSR) are also used in FANET.
Owing to the high mobility rate of UAVs in a FANET, updating the location of all the nodes in the network is a critical feature. The devices in the network must know the Check if there is a new P R  better than the last P R 

Machine Learning
Input ← All P U  and P R  Artificial Neural Network as GRNN (input)

Relay Position Optimization
Relocate Relay

General idea Pseudocode
Select: T n , P U  and P R  location of the other elements in real time, so in addition to the use of GPS (which, on average, sends information about the location every second), the UAVs have an Inertial Measurement Unit (UMI) capable of sending their location at a shorter interval than GPS at any time [14].
Therefore, the arrangement of the devices within a coverage area has a direct impact on the performance of the network and can either improve or worsen in accordance with their mobility. This is one of the main challenges to be solved in this type of network.

FANET Model for Optmization Position
As previously mentioned in the case of FANET, the position of the relay should be regarded as a problem to solve or as a means of improving the network performance. This work proposes a novel method for the establishment of communication between one UAV relay and other UAVs in mission flights. The proposal is largely based on the information that can be found in most of the FANET applications, and the aim is to collect data from the environment and to transmit this data to a ground base.
The objective is to drive the UAV relay in real time to the optimal placement with the knowledge of the UAVs positions and maximize the data traffic collection of the UAVs. For this optimization, an Artificial Neural Network (ANN) was used, the training phase estimates the best transmission rate considering the positions of the devices, and the bat algorithm based on the output of the ANN determines the new position for relay UAV through the objective function.
In the creation of the model of the proposal, this paper considers the following information that must be collected In a multi-UAV system that comprises all the drones arranged in the FANET, has been established as a set of UAVs, the number of UAVs in is denoted by | |, and the UAV relay is denoted by . Each , 1 ≤ ≤ | |, and in a two-dimensional plane has coordinates ( , ) that define its positions as = { , } and = { , }. In addition, is defined as the traffic between and , and also RSSI is defined as the RSSI between and . In [10], it was established that, at any moment, the distance between | | is no closer to a certain threshold and, in this way, the UAVs can avoid collisions. Using the coordinates ( , ) and the traffic as the database for this work, it was found that each moved in a plane of 200 × 200 m in a random manner to generate traffic with .
The heuristic algorithm for the traffic problem was used to solve the optimization problem (see Figure 3). This algorithm starts by selecting the positions of the UAVs and relay (and the traffic between them); after this, we look for a new relay positioning that is determined by the Artificial Neural Network. The output of the network will be the traffic that corresponds to positions and , and with these results, it is possible to reallocate the position of the relay to a position where the traffic is better than in the previous position.

Proposed Heuristics
In light of the scenario described in the previous section, this section focuses on machine learning, in particular on how the neural network works and the bat algorithm (bat) that was used as an optimization algorithm. In the case of the artificial neural networks, we used the Generalized Regression Neural Network (GRNN), the architecture of which is shown in Figure 4, and the data of , , and (UAV position, UAV relay position, and UAV traffic to UAV relay, respectively).
The the number of training pairs. The third layer is the summation layer; there are only two neurons in this layer: the so-calledsum and the second neuron, commonly called neuron -sum.
For an input vector , the output of the GRNN is calculated by the following equation: The bat algorithm simulates the prey detection instinct of micro bats and was created by Yang et al. [15]. The basic rules of the bat algorithm are as follows: (i) All bats use the echo location to sense the distance and also "know" the difference between food/prey and the obstacles surrounding them.
(ii) Bats randomly fly with velocity V at position with a fixed frequency and varied wavelength and intensity 0 to search for prey. Additionally, they automatically adjust the wavelength (or frequency) of their emitted pulses and adjust the pulse emission rate ∈ [0, 1], depending on the proximity of their target.
(iii) Although the loudness may vary in many ways, it has been established that the degree of intensity ranges from a large 0 (positive) to a constant minimum value min .
The bat algorithm yields a combination of UAV and relay positions and evaluates the positioning using the Artificial Neural Network already described. Afterwards, it continuously repeats these steps in order to find a solution that maximizes the throughput. The optimization loop is in the focus of this work. It is assumed that each of the neighboring UAVs in mission is in the range of the UAV relay. An initial population of relay positions is randomly created and is the basis for further optimization; hence, the genome = ( 1, . . . , ) with 1 ⋅ ⋅ ⋅ = relay position. The algorithm makes use of the model described in Section 4 and illustrated in Figure 3. When the optimization starts, an initial population is generated and evaluated using the fitness function (GRNN) described along with the selection process. Each iteration of the bat algorithm works in the pseudocode in Algorithm 1.

Postprocess results and visualization:
∈ [0,1] is a random vector defined from a uniform distribution. In general, fq min and fq max are defined according to the domain size of the problem of interest; at this work it was used for fq min = 1 and for fq max = 2. Pulse rate was defined initially as 0.7 and loudness as 0.5.
The loudness and pulse emission rates are regulated by the following equations: where 0 < < 1, > 0 being constants. In bat algorithm, frequency tuning essentially acts as mutation, while selection pressure is relative constant via the use of current best solution , found so far. There is no explicit crossover; however, mutation varies based on the variations of loudness and pulse emission. In addition, the variations of loudness and pulse emission rates also provide an autozooming ability so that exploitation becomes intensive as the search is approaching global optimality [16].
After the training phase in ANN, a new positioning of the UAVs was found, which formed a new scenario in which it would be necessary to adjust the position of the relay to achieve the best performance of the network. The bat algorithm finds the optimum position, between the UAVs and relay. By minimizing the objective function, called min , it will be possible to adjust the position of the relay to obtain a better estimate of the traffic. This optimization heuristic can be seen in Algorithm 2. Figure 5 shows the flowchart that illustrates the operation of the initial proposal where the bat optimizer algorithm is used to adjust the positioning of the relay in real time in search of the best traffic.

Performance Evaluation of FANET Simulations
This section analyzes the results of the computational experiments to prove the efficiency of the optimization algorithm. The proposed method is perturbation-free, does not require time separation between plant dynamics and the optimal Initialize the bat population and the velocities of the bats (V ).
Define pulse frequency at . Initialize pulse rates and the loudness While not reach the number of maximum iterations: Generate more solutions by adjusting frequency and updating velocities and locations/solutions: placement-seeking loop, and does not require (for a while) knowledge of the propagation model.
The simulations were performed in the NS-2. The NS-2 simulator, like the other simulators in the network, does not provide support to three-dimensional simulations, and for this reason, the simulations carried out in this paper assume that the drones fly over at a similar height, similar as [8] that assumes the UAVs are flying at fixed altitude with LOS (lineof-sight) links. In the simulations, all the UAVs (multiple and relay) had random mobility within an area of 200 × 200 m. Multiple UAVs performed 500 kbps transmissions for the UAV relay. The simulation parameters used in the simulations are described in Table 1.
The data obtained from the simulations were drawn for the training of the neural network and also for the configuration of the bat algorithm. The parameters contained in Table 2 correspond to the best results for the configuration of the neural network topologies and the bat algorithm.
The evaluation was divided into three parts: (1) Computational Intelligence Results; (2) Quality of Service Results; and (3) Quality of Experience Results.

Computational Intelligence
Results. The first stage entails training the neural network to learn how to relate the positioning of the UAVs and the relay to their respective network traffic. Figures 6(a) and 6(b) show the performance and training regression, respectively. In Figure 6(a), it can be observed that, through the use of cross-validation, a Mean Squared Error of 0.00072 was obtained.
After the neural network training, the bat algorithm was used by following the pseudocode shown in Figure 4, to obtain the minimization objective function. Thus, the smaller the result of f min , the greater the T U . Figure 7 shows the evolutionary pattern of f min in 1000 generations of bats. In this way, each generation seeks to maintain or improve the Wireless Communications and Mobile Computing  existing population in order to find the best positioning between U n and R L . The proposed model of this paper turned the complexity problem of relay positioning in a linear problem as showed in Figure 8. The number of iterations (10) versus increasing the number of UAVs was tested.

Quality of Service
Results. This section makes an assessment of the performance of the network before the optimization and then with the optimization. The first evaluated result was the average throughput. As discussed earlier, the positioning of the relay in relation to the other UAVs has a direct impact on the application. It can be seen in Figure 9 that the average throughput with the optimization was higher than the average throughput without the optimization and that there was an improvement of 135% in an area of 200 × 200 m. In the case of optimization, whenever the multiple UAVs are moved, a new position is found for the UAV relay and usually in a centralized position in relation to the other relays. In this way the optimizer prevents the UAV relay from being far away from the other UAVs during the movement. This optimization is possible because aside from knowing its own position, the UAV relay is given the location of the others and there is an estimation of the new position to which it must move so that it can maintain a good connection with all the multiple UAVs of the network.   Figure 10 shows the behavior of delays without optimization and after optimization. It can be concluded that without the optimization algorithm, the traffic between the UAVs and relay is subject to higher and more unstable delays (an average delay of 0.0512 ms). Owing to the mobility of the devices, there are occasions when the relay can be more distant from other devices, thus degrading the quality of communication. Therefore, a better result can be found through the optimizer, since there is not much delay variation (an average delay of 0.0034 ms), which makes it more reliable because the relay node is closer and more centralized in relation to the other nodes.
Based on the results obtained so far, Figure 11 shows the scenario for one of the samples used in the experiment in which the positioning of the relay can be seen before the optimization and its respective displacement to an optimal position. In view of the random nature of the mobility, it is not possible to determine how far away the relay will be from the other relays, and this highlights the importance of the optimizer, which is able to estimate a new position that will allow suitable communication. Thus, after going through all the stages of the optimizer, the relay was moved to a new position so that there could be an improvement of the performance of the traffic between the UAVs.   The PSNR is the most traditional objective metric and compares the quality of video received by the user with that of the original video. The PSNR is derived from another metric called the Mean Squared Error (MSE). The MSE calculates the average variation error of an actual attribute with which this same attribute was estimated. In other words, it compares the quality of the frame received by the user with regard to the original frame. Figure 12 compares the PSNR of video transmitted both without and with the optimizer. The video streamed without the optimizer had a PSNR average of 10.7 dB; thus, it was rated as a poor quality video, while the video streamed with the optimizer had a PSNR average of 42.9 dB and was rated as an excellent quality video.
Unlike the PSNR that only analyzes the error rate of the video received in relation to the original video, the SSIM evaluates the received video with regard to features such as color, brightness, and structure. The SSIM index is a decimal value between 0 and 1, where 0 means zero correlation with the original image and 1 means exactly the same image.  The video streamed without the optimizer obtained an average SSIM of 0.57, while the video transmitted with the optimizer obtained an average SSIM of 0.96. Figure 13 shows the SSIM performance during the transmission.
The VQM is more complete than PSNR and SSIM because it evaluates the color, pixel, and noise distortion if the video is "erased." The VQM determines the level of multimedia quality based on human eye perception and subjective factors, including blurring, global noise, block distortion, and color distortion. In the evaluation of the VQM results, zero is the best possible score. In the simulations, the video stream without optimization had a mean VQM of 11.1 while the video transmitted with the optimizer had a mean VQM of 0.4 ( Figure 14). The efficiency of the optimizer can be proved by comparing a frame of the video transmitted without an optimizer with a frame of the video transmitted with the optimizer. In Figure 15, the superior quality of the video transmitted with the optimizer is evident, because it has moved the relay to a suitable position in relation to the other UAVs and it is able to improve the quality of the communication between them.

Final Considerations
With the creation of Ad Hoc Networks, a new challenge has emerged of improving their performance. One of the main problems to be solved is the positioning of UAV relay in relation to the other relays to improve communication in a FANET scenario. The results obtained by simulations underline the importance of combining areas such as telecommunications and computational intelligence, by means of a metaheuristic model, thus obtaining a better result and a better performance of the network as a whole. The use of the proposed model can meet the future needs that may arise in a FANET scenario by improving the communication system, both in civil and in military applications, and obtain satisfactory and more precise results in relation to the abovementioned related works.
Other metaheuristic optimizers need to be tested to validate the method and confirm the best execution time for performance such as a genetic algorithm, Cuckoo search, and particle swarm. In addition, other scenarios can be tested such as an example of a performance evaluation of traffic caused by large crowds such as football matches, shows, and processions. The bat algorithm is part of a set of metaheuristic optimization algorithms with different applications that has demonstrated its applicability in computer networks as well as in this work.
In future work, the proposal could include a larger number of samples for optimization. This will involve expanding the FANET scenarios with communication to a 4G backbone network and carrying out simulations with other resolutions (High Definition) video traffic to evaluate network performance in terms of Quality of Experience and the impact of different propagation mechanisms on the type of signal used.

Conflicts of Interest
The authors declare that they have no conflicts of interest.