An Energy-Aware and Predictive Fuzzy Logic-Based Routing Scheme in Flying Ad Hoc Networks (FANETs)

Today, unmanned aerial vehicles (UAVs), also known as drones, have become very popular in military applications, commercial applications, and academic research. Flying ad hoc network (FANET) is a new type of ad hoc network, which groups small drones into an ad hoc form. These networks have unique characteristics, including moving in a 3D space, high mobility, frequent topological changes, limited resources, low density of nodes, and so on, which impose various challenges when designing a proper and efficient routing scheme. In this paper, we present a fuzzy logic-based routing scheme for flying ad hoc networks. The proposed routing scheme has two phases: route discovery phase and route maintenance phase. In the first phase, we propose a technique for calculating the score of each node in the network to prevent the broadcast storm problem and control the flood of the control messages, which have been broadcast to discover a new route in the network. This score is calculated based on various parameters such as movement direction, residual energy of nodes, link quality, and node stability. Moreover, in the route selection process, we design a fuzzy system to select routes with more fitness, less delay, and fewer hops for data transfer. The second phase includes two steps: preventing route failure in order to detect and modify paths at the failure threshold, and reconstructing failed routes in order to recognize and quickly replace these routes. Finally, the proposed routing scheme is implemented in NS2 to evaluate its performance and determine its efficiency. The simulation results are compared with three routing methods, namely ECaD, LEPR, and AODV. These results show that the proposed routing method outperforms other routing schemes in terms of end to end delay, packet delivery rate, route stability, and energy consumption. However, it has slightly increased the routing overhead.


I. INTRODUCTION
In the last decade, the use of unmanned aerial vehicles (UAVs) has growth significantly for various applications and services. When UAVs are organized as connected groups The associate editor coordinating the review of this manuscript and approving it for publication was Nafees Mansoor .
in the ad hoc form, they operate successfully in complex missions, and create a flying ad hoc network (FANET) [1], [2]. FANET is a new type of mobile ad hoc network (MANET), so that its nodes are drones. In these networks, all UAVs create an ad hoc network and only a subset of them connect to the ground station (GS) [3]. FANET is a multi-UAV system in which UAVs carry out missions collaboratively VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ and cooperatively. Therefore, it is faster and more efficient than single-UAV systems [4], [5]. Compared to single-UAV systems, multi-UAV systems are more useful in terms of reliability and survivability via redundancy. This means that if one of the UAVs fails in a mission, other drones can continue this mission. These networks have many applications in various fields, including military [6], forest fire monitoring, search and rescue operations [7], [8], reconnaissance operations, transportation, etc [9], [10]. Flying ad hoc networks are a subset of vehicular ad hoc networks (VANETs) and mobile ad hoc networks (MANETs). FANETs share some features with these ad hoc networks, such as the self-organization ability and communication between nodes without centralized infrastructure. However, they have their own characteristics [11]. In the following, some of these features are described briefly.
In FANET, there are several types of routing methods according to their strategy in the routing process: topologybased routing schemes, geographical routing schemes, hybrid routing schemes (a combination of topology-based and geographical routing schemes) and nature-based routing schemes [5], [19]. In the following, we describe each of these routing schemes.
• Topology-Based Routing Protocol: This routing type uses topology information of nodes to send data packets in the network. In these protocols, it is necessary to create a proper route from the source to the destination before starting the data transmission process. Topologybased routing schemes are categorized as proactive and reactive [5], [20].

A. PROACTIVE ROUTING SCHEME
It is also known as table-driven protocol. In this routing type, each UAV exchanges the latest route information with other UAVs in the network, regardless of whether they have data packets to send or not. Route information is stored in the routing table of each UAV [20]. These tables is periodically updated and route information is shared between UAVs in the network. Proactive routing is not suitable for FANETs. Because it is weak against frequent topological changes. As a result, it has a high degree of disconnected links [21], [22].

B. REACTIVE ROUTING SCHEME
It is also known as on demand protocol. In this routing type, if an UAV is to send its data packets and there is no route to the destination node in its own routing table, then it initiates the route discovery process. In these routing protocols, only information about active routes is stored in the routing table. Therefore, a route maintenance mechanism is used to maintain valid routes and remove invalid routes [12], [23]. When the network topology is changed, the failed routes are deleted and the route discovery process is restarted. In this scheme, routing tables are periodically updated. As a result, bandwidth will be more efficient in reactive routing protocols compared to proactive routing protocols [20], [22].

• Geographical Routing Protocol (Location-Based):
These protocols use spatial position information of flying nodes to perform routing operations on the network. In geographical routing protocols, it is important to estimate the location of the destination node using the information obtained from a positioning system or location prediction techniques to perform the routing process efficiently [5], [20].
• Hybrid Routing Protocol: These protocols integrate geographic and topology-based routing mechanisms to take the advantage of both [5], [20].
• Nature-Inspired Routing Protocol: These protocols originate from natural phenomena such as ant colony, bee colony, bird swarm and so on to improve the routing process. However, they have weaknesses in terms of operational capability such as increased delay, high communication overhead, and increased energy consumption in the network [20]. In fact, nature-inspired routing schemes are a subset of topology-based routing methods, especially reactive routing [22], [24]. According to the content mentioned above, traditional routing algorithms cannot meet the requirements of FANETs. For this reason, many researchers focus on designing routing schemes for FANET. When designing routing schemes, it is very important to select an appropriate route. This is an important issue to communicate two node in FANET. However, it is always difficult to choose a benchmark to decide on the best path. When designing routing schemes in FANETs, they must consider criteria like, efficient use of network resources, energy saving, not having loop, reconstruction capability, and scalability [25]. Moreover, in FANET, routing protocols must be efficient, meaning that they should have low overhead, high reliability, low packet loss rate, acceptable delay, and appropriate stability. Although, achieving all the criteria mentioned in a routing method is very difficult or even impossible.
In this paper, we seek to address some of the mentioned problems by proposing an efficient routing scheme in FANET. In this paper, our focus is to solve two main problems, i.e. failing the communication routes and flooding the routing messages in the network. The first problem is due to high mobility of nodes in the network and can increase the packet loss rate (PLR) and delay in the data transmission process in the network. The second problem is due to the fact that most of the AODV-based routing algorithms flood routing messages in the network to find paths to the desired destination. This can lead to a broadcast storm. In this paper, we present a fuzzy logic-based routing scheme in FANETs. In our proposed method, we propose two main approaches to solve the first problem. The first is to create stable paths in the route discovery process and the second is to find the paths, which are at the failure threshold, and correct them rapidly. Also, we improve the AODV routing protocol and limit the nodes, which broadcast routing messages, to prevent the broadcast storm. In the proposed routing method, we consider various parameters, including link quality, node stability, and energy of UAVs in the routing process to establish stable routes and increase packet delivery rate (PDR). Furthermore, we seek to balance energy consumed by flying nodes in our scheme to increase the network lifetime. The proposed routing method has two phases: 1) the route discovery process 2) the route maintenance process.
• Route Discovery Process: This process starts its operations when the source node has a data packet, which must be sent to the destination node, and there is no route in its routing table. In this condition, the source node broadcasts a route request message (RREQ) to its neighboring nodes. Upon receiving the RREQ message, neighboring nodes calculate their score based on various parameters such as movement direction, residual energy, link quality, and node stability. If they obtain the desired score, then they rebroadcast the RREQ message. Otherwise, they delete this message. We believe that this solution improves the performance of our routing method and prevent the broadcast storm problem. Moreover, we have designed a fuzzy system to select routes with more fitness, less delay, and fewer hops for data transfer.
• Route Maintenance Process: This phase includes two steps: preventing the route failure and reconstructing the failed routes. In the first step, the purpose is to detect and correct routes at the failure threshold. This helps to avoid interruption in the data transmission process.
In the second step, the purpose is to quickly recognize and replace failed routes to reduce delay in the data transmission process. In the following, the paper is organized as follows: In Section II, some routing schemes in FANETs are reviewed. Section III introduces the basic concepts used in the proposed routing scheme. Furthermore, the system model applied in the proposed scheme is presented in Section IV. Section V details the formats of the control routing messages namely, RREQ and RREP, and data packet format. In Section VI, the proposed routing method is explained in detail. Section VII presents the simulation results of our proposed routing scheme. Finally, the conclusion and the future research direction are stated in Section VIII.

II. RELATED WORKS
Oubbati et al. [26] proposed a routing scheme called energyefficient connectivity-aware data delivery (ECaD) for FANETs. It is a desirable scheme based on AODV. However, ECaD has some weaknesses. We can solve these weaknesses to improve the performance of this scheme. In ECaD, UAVs with high energy levels participate in the route discovery process and less-energy nodes are forbidden from participating in the data delivery process. Its purpose is to create high-energy routes, but it has a weakness: if the energy of all neighbors of a node is less than the predetermined threshold, this node cannot establish any routes with other nodes. As a result, it is isolated in the network. It seems that choosing a predefined threshold value is not suitable in the network. Therefore, it is better to determine this value dynamically and based on network conditions. Moreover, in ECaD, decision-making for rebroadcasting the RREQ message is based on only one parameter i.e. energy of nodes. This is not sufficient. It must be done based on different factors. In addition, this scheme may be faced with a broadcast storm problem. The authors ignore this problem in their paper. We have considered these issues in our paper. This method takes into account the stability of the routes, balanced energy consumption, route failure prediction, and route connectivity expiration time. Moreover, ECaD has been implemented in a 3D space. Hence, it is compatible with FANET. However, its design does not consider the movement direction of UAVs in the route selection process. It is very important to consider the movement direction of flying nodes to establish more stable VOLUME 9, 2021 routes so that UAVs move in almost same direction in a route. In addition, the link quality parameter is not considered in the route discovery process. When this parameter is ignored, lowquality paths may be created and quickly failed. This makes interruptions in the data transmission process. Furthermore, ECaD does not consider the node stability in the route discovery process.
Perkins et al. [27] suggested the ad hoc on-demand distance vector (AODV) routing protocol. It has a very important feature, namely on-demand, meaning that the route discovery process is done only when there is a route request. Today, many AODV-based routing algorithms have been proposed for FANET. Therefore, AODV is still a valuable algorithm for evaluating many routing schemes. However, it is very challenging to use AODV algorithm in FANETs because this protocol is not compatible with the unique features of these networks, including high-speed flying nodes, frequent disconnection of communication links, and so on. Moreover, in this scheme, the route discovery process has high delay and may cause a broadcast storm problem that weakens the network performance. In AODV, when the source node is to send a data packet to the destination node and it does not find no valid route to the destination in its routing table, then the source node broadcasts a route request message (RREQ) to its neighbors. Then, neighboring nodes broadcast RREQ to their neighbors as well. This process continues until RREQ reaches the destination node or an intermediate node, which has a valid path to the destination node. After receiving RREQ by the destination node or the intermediate node, it unicasts a route reply message (RREP) to the neighboring node, which has sent RREQ for the first time. When RREP is sent back through the reverse route, nodes in this route update their routing tables and add a new entry to record the route information in this table, if a new route has been discovered. In AODV, a route maintenance mechanism is provided to detect failed routes. AODV has a major weakness: when the network size is large, the nodes may experience a high delay in the route discovery process. In addition, if a link failure occurs during route discovery process, then it causes the increased delay and bandwidth consumption.
Darabkh et al. [28] introduced an AODV-based routing scheme called the multi data rate mobility aware (MDRMA) protocol for FANETs. MDRMA is originated from the mobility aware dual phase ad-hoc on-demand distance vector with adaptive Hello messages (MADP-AODV-AHM) protocol. This scheme includes two algorithms: routing algorithm and power controlled algorithm. In MDRMA, the first algorithm aims to reduce the flood of RREQ messages and accelerate the data transmission process based on the distance between nodes in the network. Furthermore, it selects intermediate nodes in a route, based on their data transmission rate, speed, and movement direction to establish stable and reliable routes. The data transmission rate is selected according to a mathematical model, which is based on the pointto-point connectivity of a node with its neighboring nodes, the density of nodes in the network and their transmission range. The power controlled algorithm aims to control the data transmission power on each wireless link in the route. MDRMA is a desirable method that can be modified in the future to improve its performance. It should be noted that this method does not consider the energy of UAVs in the route discovery process. It is a very important issue in small UAVs. Moreover, MDRMA does not design any mechanism for preventing route failure. Hence, it may increase the route failure probability. In addition, MDRMA ignores delay in the route selection process. It should also be noted that this routing method is implemented in a 2D space. Therefore, it is not compatible with the FANET environment.
Deshpande et al. [29] presented the stochastic multipath UAV routing (SMURF) for FANETs. SMURF is a centralized algorithm implemented by the control center, which sends the route information to UAVs through a softwaredefined networking (SDN) platform. SMURF is a multipath scheme, which increases fault tolerance and reliability because it always provides at least one stable route. In this method, the primary route is obtained based on the highest link existence probability. Then, a number of backup routes are determined to increase the route reliability if the primary route fails. Backup routes are selected using two parameters: the failure probability of the links in the first route and their reliability. This method has a high communication overhead. SMURF has a major disadvantage, meaning that it is a centralized algorithm, which is not suitable for FANET due to its characteristics such as high mobility, frequent topological changes, etc. SMURF is suitable for dense networks, while FANET is a sparse network. SMURF ignores the unique features of FANET because it does not consider parameters such as the energy of UAVs, movement direction, link quality, node stability, delay, and the number of hops during the route construction process between UAVs. Moreover, SMURF has no process to prevent route failure.
Li et al. [30] proposed a link stability estimation-based preemptive routing (LEPR) protocol for FANETs. LEPR is inspired by AODV. It introduces a new link stability scale based on location information of drones obtained from GPS. This scale has three parameters: link quality, safety degree, and mobility prediction factor. The link stability scale can determine the past, current, and future states of link stability. LEPR modifies the route discovery mechanism in AODV and calculates routes using the link stability scale. Moreover, a semi-proactive route maintenance process is applied when a link is disconnecting. This process reduces the number of failed routes and delay in the data transmission process through finding and switching to a reliable route. In LEPR, the main idea is to calculate several stable routes using the proposed link stability scale. LEPR is a suitable scheme, which takes into account features of FANET in the route discovery process. Furthermore, this scheme is implemented in a 3D space and is compatible with FANET. However, LEPR ignores important parameters such as delay, energy of UAVs, node stability, and the number of hops in the route discovery process.
Aadil et al. [31] offered a routing scheme called the energy-aware link-based clustering (EALC) model in FANETs. EALC seeks to minimize communication and computational overhead. In this scheme, a simple clustering mechanism is designed to reduce computational overhead and communication overhead and increase network lifetime. In this routing scheme, the optimal transmission range of drones is selected according to the network requirement, i.e. the minimum communication range of a node for efficient communication. This reduces the packet loss rate (PLR) and improves energy consumption. In EALC, nodes are first grouped using the K-means sorted fitness algorithm so that the communication between the nodes is done using cluster head nodes (CHs). In a cluster, cluster member nodes (CMs) transmit their data to CH, which is responsible for transferring data to the destination node. CHs are selected based on two parameters: their energy level and their distance from neighboring nodes. When the fitness of a CH is less than the threshold (i.e. it is 20% less than the fitness of CMs), then the clustering process is recalled. However, EALC does not consider the movement of UAVs and the quality of communication links in the routing process. Therefore, unstable paths may be established. As a result, route failure probability is very high. Moreover, the routes may have a high delay in this scheme. In addition, EALC does not design a mechanism to prevent route failure. Furthermore, this scheme is implemented in a 2D space and is not compatible with the FANET environment.
Gankhuyag et al. [32] proposed the robust and reliable predictive routing (RARP) in FANETs. It combines omnidirectional and directional transmission schemes and utilizes dynamic angle adjustment. RARP enhances AODV to be suitable for FANETs. In this scheme, when the source node wants to find a route to the destination node, it broadcasts an RREQ message to the neighboring nodes using the omnidirectional transmission scheme. After an intermediate node receives RREQ, it rebroadcasts this message until it reaches the destination node. When the destination node receives RREQ, it waits for a certain time interval. If the destination node receives several RREQs, it selects the best route based on a utility function. This function includes three parameters: flying risk, number of hops, and expected connection time. Then, the destination node unicasts the RREP message to the source node. It should be noted that in this scheme, RREP is sent back using a directional antenna with the angle θ in the direction of the estimated position of the receiver. RARP can determine the minimum expected connection time between two nodes in a route. Therefore, it can estimate the route lifetime. Thus, it calculates an alternative route before the minimum expected connection time expires. RARP is also implemented in a 3D space. Therefore, it is compatible with the FANET environment. However, it has a major drawback, meaning that it does not consider the quality of communication links, the energy of UAVs, and their movement direction, which may negatively affect the route stability.
Liu et al. [33] suggested a Q-learning based multiobjective optimization routing protocol (QMR) for FANETs. QMR uses a Q-learning based exploration and extraction mechanism to discover the optimal route and reduce delay and energy consumption. This scheme utilizes the current information to estimate future information about the relationships between neighboring UAVs to select the next-hop node reliably and stably. In the routing process, nodes use Hello messages to share information about their location, energy, and mobility model (speed and direction of flying nodes) as well as delay. QMR employs these parameters and the link quality information in the route discovery process to create stable routes. It should be noted that, Q-learning parameters, including learning rate and discount factor are adjustable in QMR, so that each link has a different learning rate and each node includes its own specific discount factor. They are determined based on the network condition. As a result, QMR has appropriately adapted with the dynamic FANET environment. If these parameters are considered constant, the accuracy of the routing process decreases and the route failure probability increases. In addition, QMR has designed a route failure prediction mechanism in the routing process. However, this scheme is implemented in a 2D space that is not compatible with the FANET environment. Also, QMR has not provided a proper mobility control mechanism for controlling swarm connectivity. Table 1 presents the most important advantages and disadvantages of different routing schemes.

III. BASIC CONCEPTS
In the proposed scheme, we have used fuzzy logic in the route discovery process. Therefore, we briefly describe fuzzy logic in this section.

A. FUZZY LOGIC (FL)
According to research and studies, it can be deduced that real and complex processes cannot be accurately measured, modeled, and controlled because there are uncertainties such as incompleteness, randomness, and data loss. Fuzzy logic (FL) is a mathematical technique that approximately describes human thinking. In 1965, the FL theory was first presented by Zadeh in a paper entitled "Fuzzy Sets". In classical sets, membership is defined accurately and unambiguously that is, whether an element either belongs to a set or not. Fuzzy sets provide partial membership. In other words, an element may belong to a set to some extent. Therefore, the results are not absolutely limited to True or False, but they are partially True or False [34].
Assume that X (universal set) is a set of elements, which are generally represented by x, then fuzzy set A in X is defined based on Equation 1.  In Equation 1, ''/'' does not refer to a division, but it is used to separate the membership degree of an element from the element itself. A fuzzy set is expressed using its membership function. The most common membership functions used to represent fuzzy sets are triangular, trapezoidal, and Gaussian functions.
Today, fuzzy inference mechanisms have many applications. The most common fuzzy systems are Mamdani fuzzy inference and Sugeno fuzzy inference (TSK). As shown in Figure 1, a fuzzy system includes four main modules: fuzzification, defuzzification, fuzzy rule base, and fuzzy inference engine. The fuzzification module maps the system inputs to the corresponding fuzzy sets and assigns one membership degree to each fuzzy set. The fuzzy inference engine implements these fuzzy values through fuzzy rules stored as IF-THEN rules. Its outputs are in the form of fuzzy variables. They must be converted to crisp values using a defuzzification module such as the averaging or centroid schemes [34].

IV. SYSTEM MODEL
In this section, we introduce the network model used in the proposed routing scheme. In our proposed routing scheme, we consider a homogeneous FANET. The network includes a number of UAVs distributed in a three-dimensional space. The IEEE 802.11a standard is considered as the wireless interface in the MAC layer of each UAV because it can efficiently support highly dynamic topologies and provide wide coverage of wireless communications. In the network, UAVs are moving and the distance between them changes over time. Each UAV has a unique identifier (ID UAV i ). Furthermore, it is assumed that UAVs are equipped with the global positioning system (GPS). As a result, UAV i is aware of its position (x i , y i , z i ) and its speed v x,i , v y,i , v z,i at every moment. We assume that the speed of UAVs is limited to [0, V MAX ]; where, V MAX > 0 is a constant value. In addition, our proposed routing scheme supports two communication types in the network: • UAV-to-UAV Communication (U2U): In this communication type, UAVs communicate with each other to perform common missions, such as routing or tracking a target. The U2U communication may be single-hop or multi-hop. Moreover, this communication type may be short-range or long-range to improve FANET performance in terms of data rate and communication range.
• UAV-to-GS Communication (U2G): In this communication type, the UAV communicates with the ground station (GS) to process the received information. In the proposed routing scheme, all UAVs are not directly connected to GS. Only UAVs, which are close to GS, can be directly connected to it. It should also be noted that we have used the air-to-air (A2A) channel model in the proposed routing scheme [35]. It can be defined based on the free-space propagation model because the packet loss is high in less fading. As a result, path loss in A2A channel is expressed according to Equation 2 [35]: where, β indicates the path loss exponent, so that β = 2 in the free-space propagation model. Furthermore, α is the path loss at the reference point. In the free-space propagation model, α is obtained using Equation 3: where, w indicates the carrier frequency and l represents the light speed so that l = 3 × 10 8 m / s . Also, d ij is the distance between UAV i and UAV j . It is calculated using Equation 4: where, (x i , y i , z i ) and x j , y j , z j are spatial coordinates of UAV i and UAV j , respectively. The network model is shown in Figure 2.

V. TYPES OF MESSAGES IN THE PROPOSED SCHEME
In the proposed routing scheme, we modify the format of two control messages i.e. route request (RREQ) and route reply (RREP) in AODV. In the following, we introduce the format of these messages and their different fields in detail. Furthermore, the data packet structure is explained in this section.

A. ROUTE REQUEST (RREQ) MESSAGE
It is used in the route discovery process. Table 2 illustrates the RREQ format. In the following, we introduce the most important fields of this message: • Message Type: If the Message Type field is equal to one. This means that this control message is an RREQ message.  • Source IP Address: This field represents the source UAV's address, which sends the RREQ message.
• Destination IP Address: This field represents the destination UAV's address where a route must be discovered.
• Source Sequence Number: This field is used to ensure that the reverse route information to the source node is fresh.
• Destination Sequence Number: This field is used to ensure that the route discovered to the destination node is new before the source UAV selects a route.

B. ROUTE REPLY (RREP) MESSAGE
After the RREQ message reaches the destination node; this UAV generates an RREP message and sends back it to the source node. The format of this message is stated in Table 3.
The RREP fields are similar to the RREQ message, which we explain each of them. Note that the Message type field must be equal to 2 in an RREP message.

C. DATA PACKETS
These packets include the data, which the source UAV wants to send to the destination UAV through a route. Table 4 presents the data packet format. In the following, we describe the fields of the data packet: • Destination IP Address: This field represents the destination UAV address where the data packet must be sent.
• Source IP Address: This field represents the source UAV address, which sends the data packet.
• Message ID: It is a unique ID. Message ID and Source IP Address are applied to control the data packet and avoid the duplicated data.

VI. PROPOSED ROUTING SCHEME
In this paper, we propose a fuzzy logic-based routing scheme for FANETs. Our method improves AODV. Note that AODV is one of the most efficient routing protocols introduced for ad hoc networks. In the proposed routing scheme, we seek to take into account various parameters, such as link quality, node stability, and energy of node, in the routing process so that stable routes are created and packet delivery rate (PDR) are improved. Furthermore, we try to enhance the network lifetime through balancing the energy consumption of the nodes. Our proposed routing scheme has two phases: 1) the route discovery process 2) the route maintenance process. Phase 1, Route Discovery Process: This process starts its operations when the source node wants to send data packets to the destination node and there is no route to it in its routing table. In such cases, the source node broadcasts a route request (RREQ) message to its neighboring nodes. After receiving this message, neighboring nodes calculate their scores based on various parameters such as movement direction, residual energy, link quality, and node stability. Next, if they obtain the required score, then they can rebroadcast the RREQ message. We believe that this solution can improve the performance of our routing scheme and prevent the broadcast storm problem. Moreover, we designed a fuzzy system in the route selection step to choose routes with more fitness, less delay, and fewer hops for data transfer.
Phase 2, Route Maintenance Process: This phase includes two steps: preventing the route failure and reconstructing the failed routes. In the first step, the purpose is to detect and correct routes on the failure threshold. This helps to avoid interruption in the data transmission process in the network. In the second step, the purpose is to quickly recognize and replace failed routes to reduce delay in the data transmission process.
In the following, each of these phases is explained in detail. Also, Table 5 lists the symbols used in the proposed method.

A. ROUTE DISCOVERY PHASE
When the source node (UAV S ) is to communicate with the destination node (UAV D ) to send data packets, UAV S first searches its routing table to find a valid route to UAV D . If UAV S does not find such route in its routing table, then it should start the route discovery process. Therefore, it generates an RREQ message and broadcasts this message to its neighboring nodes. After a neighboring node receives RREQ, it must calculate its score before rebroadcasting the message. This score is calculated based on various parameters such as movement direction, residual energy, link quality, and node stability. We believe that this approach enhances the performance of our scheme and prevent the broadcast storm problem. In the following, we explain how to calculate the score of nodes in detail. Then, we provide an example to describe the route discovery process.

1) SCORE CALCULATION PROCESS FOR EACH NODE
In the route discovery process, it is necessary for each node to calculate its score, S i relative to the previous-hop node (UAV prev ). In this section, we describe how to calculate this parameter. S i is obtained using four parameters: movement direction, residual energy, link quality, and node stability. It should be noted that all these parameters are normalized in [0, 1] to have the same effect on S i . In the following, each of these parameters is described in detail.
• Movement Direction (λ i ): The purpose of selecting this parameter is to select the next-hop node (UAV next ) from the UAVs, which received the RREQ message, so that the selected node moves in the same direction as the previous-hop node (UAV prev ). In this case, UAV next and UAV prev can communicate with each other for more time.
As a result, they create more stable routes. Therefore, this node earns a higher score than other UAVs for rebroadcasting the RREQ message. We present an example in Figure 3 to calculate the movement direction of UAV i relative to UAV prev . In this figure, the speed vector and movement direction of both nodes are represented. As shown in this figure, these two nodes move in different directions.
To calculate the movement direction of UAV i relative to UAV prev , we first obtain the angle between the speed VOLUME 9, 2021  vector of UAV i ( V i ) and the speed vector of UAV prev ( V prev ). This angle is called θ, which is also shown in Figure 4. Based on mathematical rules, we know that the dot product (inner product) of two vectors is geometrically equal to: where, And, On the other hand, the dot product of two vectors is algebraically calculated using Equation 8: Based on Equations 5, 8, the angle θ is obtained using Equation 9: Now, based on the angle θ between V i and V prev , we can calculate the movement direction of UAV i relative to UAV prev , that it is represented as λ i . As a result, λ i is calculated using Equation 10: According to Equation 10, whatever λ i is close to one, meaning that UAV i and UAV prev are moving in the same direction.

• Residual Energy (E UAV i ):
Energy is an important parameter in the route discovery process. If low-energy nodes participate in the route construction, then unstable routes are established so that their failure probability is very high. On the other hand, this can lead to unbalanced energy consumption in the network. As a result, network lifetime is reduces. It should be noted that each node (i.e. UAV i , where, i = 1, . . . , N and N indicates the total number of nodes in the network) is aware of its energy (E UAV i ) at any time. If E UAV i is less than E Min , then UAV i does not gain the desirable score to participate in the route discovery process. We consider E Min equal to 20% of the initial energy of nodes. The parameter E UAV i is normalized according to Equation 11: where, E Min ≥ 0 is the minimum energy and E Max > 0 is the initial energy of UAVs in the network.
• Link Quality (Q Link i−prev ): The purpose of this parameter is to select nodes, which have a higher link quality than other nodes, in the route discovery process. If the quality of the link between two nodes in a route is weak, the route failure probability will be very high.
On the other hand, this can also increase the data packet loss rate (PLR). In the proposed routing scheme, the quality of communication links is determined based on the received signal strength indication (RSSI). RSSI can provide a precise and rapid estimation of the link quality [36]. In research, it has been proven that the higher values of RSSI will lead to a better PDR in the receiver and the transmitter [37]. In addition, research proves that RSSI is stable (i.e. standard deviation is less than 1dBm) for a short period of time (about 2 seconds) [38]. Therefore, RSSI information can be used to estimate the link quality. Often radio transceivers are equipped with a RSSI register, which provides the signal strength of the received packet. Therefore, nodes can obtain RSSI information when receiving the RREQ message from their neighbor nodes. To estimate link quality (Q Link i−prev ) between the two nodes, namely UAV i and UAV prev , we use the averaging technique on RSSI values to prevent the effect of temporary peaks. Q Link i−prev is normalized based on Equation 12: where, Q Min ≥ 0 indicates the minimum quality of communication link between two nodes and Q Max > 0 is the highest quality of communication link between two nodes in the network. According to [36], the RSSI value varies between 0 and R Max , and the higher values of RSSI lead to a better PDR in the receiver and the transmitter. Based on [36], if RSSI = 87 dBm, then the PDR is approximately 99%, and when RSSI = 0, then PDR is zero. Therefore, we consider these values as Q Max and Q Min , respectively.
• Node Stability (Stability UAV i ): The purpose of selecting this parameter is to select nodes, which are at a suitable distance from UAV prev , for participating in the route discovery process. This distance is called the trust distance (D trust  and UAV prev is less than d Min , they are very close to each other. As a result, it is not reasonable to select UAV i as the next-hop node. Because the number of hops will be increased and it is practically useless. On the other hand, if the distance between UAV i and UAV prev is greater than d Max , the distance between them is very high. Therefore, it is very likely that the two nodes will be out of the communication range of each other in the near future. This process is illustrated in Figure 5. As shown in this figure, the UAV i is located in D trust . Whereas, UAV j and UAV k are outside this range. As a result, UAV i is the best node that can be selected as the next-hop node (UAV next ) to establish stable routes. The node stability (Stability UAV i ) is calculated based on Equation 13: where, D ij is Euclidean distance between UAV i and UAV prev at the moment when the RREQ message is received by UAV i , i.e. t RREQ .
VOLUME 9, 2021 where, (x i , y i , z i ) and x prev , y prev , z prev are the spatial coordinates of UAV i and UAV prev at the time t RREQ , respectively. Note that UAV i obtains the spatial coordinates of UAV prev from the RREQ message. After calculating the mentioned parameters, the score of each node (S i ) is calculated using Equation 15: where, W 1 , W 2 , W 3 , and W 4 are Weight coefficients, so that W 1 + W 2 + W 3 + W 4 = 1. In this paper, these weighted coefficients are considered similar i.e. W 1 = W 2 = W 3 = W 4 = 1 4 .

2) THE ROUTE DISCOVERY PROCESS USING AN EXAMPLE
In this section, we describe the route discovery process through an example to simplify its understanding (see Figure 6). This process starts when UAV S wants to communicate with UAV D to send its data packets. In this case, UAV S searches its routing table to find a valid route to UAV D . If it does not find such a route, then UAV S must discover a valid route. Algorithm 1 presents pseudo-code related to the route discovery process. This process includes the following steps: the RREQ message to its neighboring nodes. As shown in Figure 7, UAV 1 , UAV 2 , UAV 3 , and UAV 4 receive this message. In addition, UAV S adds an entry to its routing table, which is illustrated in Figure 7. It should be noted that in this routing table, the Next-Hop field is determined after completing the route discovery process and receiving the RREP message. Also, Algorithm 2 expresses the pseudo-code related to the first step. When the neighboring nodes of UAV S (i.e. UAV 1 , UAV 2 , UAV 3 , and UAV 4 ) receive the RREQ message, they first check its RREQ Message ID field to make sure that this message is not duplicated. Then, each neighboring node calculates its own score (S i ) relative to UAV S . In section VI-A1, we explained how to calculate S i . In this example, assume that the scores corresponding to UAV 1 , UAV 2 , UAV 3 , and UAV 4 are equal to S 1 = 0.61, S 2 = 0.75, S 3 = 0.36, and  S 4 = 0.98, respectively. Then, they broadcast a message, including S i , to their single-hop neighboring nodes. After receiving this message, each node compares its score with the average score of neighboring nodes. If the score of each node (for example, UAV i ) is less than half the average score of the neighboring nodes, then this node does not get the required score to rebroadcast the RREQ message. This means when Equation 16 is met.
where, n neighbor is the number of neighboring nodes. As a result, UAV i removes the RREQ message and cannot rebroadcast it. In the example provided in Figure 8, UAV 3 satisfies such condition (Equation 16). Whereas, other nodes (i.e. UAV 1 , UAV 2 , and UAV 4 ) achieve an acceptable score to rebroadcast the RREQ message. Therefore, they add an entry to their routing table to record the RREQ information. Because UAV 1 , UAV 2 , and UAV 4 have received the RREQ message only from UAV S , they register its ID as the previous-hop node in their routing table, which is displayed in Figure 8. It should be noted that in the routing table, the Next-Hop field is determined when the route discovery is terminated and the RREP message is received. Then, UAV 1 , UAV 2 , and UAV 4 update some fields of the RREQ message, and rebroadcast it to their neighbors. For example, as shown in Figure 8, UAV 1 adds one unit to the Hop Count field in the RREQ message. Also, the F Route field is updated according to Equation 17: where, F Route indicates the route's fitness and S UAV Current is the score of the node that has received the RREQ message at the current time. For example, UAV 1 updates F Route according to Equation 18: (18) Moreover, the Delay Route field is updated in each hop using Equation 19.
where, T prev,next is the time required to transfer the RREQ message from UAV prev to UAV current . According to [33], the one-hop delay from UAV prev to UAV current is calculated using the medium access delay (D mac prev,current ) and the queuing delay (D que prev,current ). D mac prev,current is the time required for the medium access protocol to deliver the packet successfully or remove it due to duplicate. D que prev,current is the required time for the message to reach the head of the transmission queue. Note that it ignores the propagation delay because it is very small when data are exchanged at the light speed in wireless media. Therefore, T prev,next is expressed as follows: T prev,next = D mac prev,current + D que prev,current (20) Therefore, UAV 1 updates Delay Route based on Equation 21.
where, T S,1 indicates the time required to transfer the RREQ message from UAV S to UAV 1 . Next, UAV 1 rebroadcasts the RREQ message to its neighboring nodes. In addition, UAV 2 and UAV 4 perform a similar process. This process is illustrated in Figure 8. Furthermore, Algorithm 3 presents the pseudo-code related to the second step.

c: STEP 3 (SELECTING THE PREVIOUS-HOP NODE)
This step is almost similar to the second step. However, it has a different part. If a node receives an RREQ message from several nodes (for example, two nodes or more), it calculates its score relative to each of them. Then, it registers the node, which has the highest score relative to it, as the previous-hop node in its routing table. Note that in this process, nodes wait for a certain time period to receive all RREQ messages from their neighboring nodes to determine the Previous-Hop field. As shown in Figure 9, UAV 5 receives two RREQ messages from UAV 1 and UAV 2 . In this case, UAV 5 calculates its score relative to these two nodes, so that its score relative to UAV 1 is equal to S 5,1 = 0.63; and its score relative to UAV 2 is equal to S 5,2 = 0.92. UAV 5 selects UAV 2 as the previous-hop node and records it in its routing table because S 5,2 > S 5,1 . Also, in this step, UAV 6 receives the RREQ message from UAV 2 and inserts UAV 2 as the previous-hop node in its routing table. Furthermore, UAV 7 receives the RREQ message from UAV 4 and inserts UAV 4 as the previous-hop node in its routing table.
In Figure 9, this process is displayed. Algorithm 4 expresses the pseudo-code related to Step 3.

d: STEP 4 (ROUTE SELECTION)
In this step, UAV D receives the RREQ message from UAV 5 , UAV 6 , and UAV 7 . Next, it calculates its score relative to these nodes. As shown in Figure 10, the score of UAV D relative to UAV 5 , UAV 6 , and UAV 7 is equal to S D,5 = 0.91, S D,6 = 0.35, and S D,7 = 0.98, respectively. Then, UAV D updates Hop Count , F Route , and Delay Route in the RREQ messages received from these nodes, as shown in Figure 10. If UAV D 's ID is similar to the Destination IP Address field in the RREQ message, it terminates the rebroadcasting process of this message because the RREQ message has reached its destination. Now, UAV D must select one of the established routes. In the example given in Figure 10, three routes have been discovered to UAV D . In the following, each of these routes and their attributes are introduced. It should be noted that UAV D extracts these attributes from received RREQ messages.   T 7,D . Now, UAV D selects the best route using the proposed fuzzy system, which is also represented in Figure 11. In this example, UAV D selects the route 1 (i.e. Route#1 : UAV S → UAV 2 → UAV 5 → UAV D ) as the best route for data transfer. Algorithm 5 illustrates the pseudo-code related to Step 4. To design this fuzzy system, Mamdani fuzzy inference mechanism has been used. The proposed fuzzy system has three inputs (i.e. F Route , Hop Count , and Delay Route ), one output (Best Route ), and a rule base. In the following, each of these parts is described in detail.

e: FUZZY INPUTS
In the proposed fuzzy system, there are three input parameters, including F Route , Hop Count , and Delay Route . They are explained as follows: • F Route : UAV D obtains fitness information of routes from the RREQ messages. As stated in this section, F Route is determined based on the minimum score of the nodes in a route. It is calculated using Equation 17 and its value is in [0, 1]. Whatever F Route is close to one, meaning that this route includes high-quality links, the nodes have more energy in this route and have located at a suitable VOLUME 9, 2021 route, there is less delay in the data transmission process. This can improve the performance of the proposed routing scheme. This fuzzy input is normalized based on Equation 22 to be in [0, 1]: where, N represents the total number of nodes in the network. The fuzzy membership diagram corresponding to Hop Count−norm is displayed in Figure 13. This fuzzy input includes three modes: low, medium, and high.
• Delay Route : Delay is a very important issue in the routing process for FANET, because the speed of drones is very high. It causes frequent disconnection of communication links and instability of routes. If there is a long delay in a route, then routes may quickly fail during sending data to the destination. This can increase the packet loss rate (PLR) in the network. UAV D can obtain information about Delay Route from RREQ messages. This parameter is normalized using Equation 23: where, Max Delay is the maximum delay in the routes established between UAV S and UAV D . The fuzzy membership diagram corresponding to Delay Route is   represented in Figure 14. This input includes three modes: low, medium, and high.

f: FUZZY OUTPUT (Best Route )
In the proposed fuzzy system, the output is the chance of choosing a route from the discovered routes (in the example, Route #1, Route #2, and Route #3) as the best route for data transfer. Best Route is a route with the most fitness, the least number of hops, and the minimum delay. The fuzzy membership diagram corresponding to Best Route is illustrated in Figure 15. This fuzzy output has seven modes: Very very low, Very low, Low, Medium, High, Very high, and Very very high.

g: RULE BASE
Our proposed fuzzy system follows 27 rules. These rules are listed in Table 6. For example, rule 1 is stated as follows: Rule 1: IF F Route is Low AND Hop Count is Low AND Delay Route is Low THEN Best Route is High.

h: STEP 5 (SENDING THE RREP MESSAGE)
After selecting the best route (i.e. Route#1 : UAV S → UAV 2 → UAV 5 → UAV D ), UAV D sets its routing table and inserts the ID of UAV 5 into the Previous-Hop field. Next, it generates the RREP message and sends back it to UAV 5 according to Route #1. When UAV 5 receives the RREP message, it checks the ID of this message to find the corresponding entry in its routing table. Then, UAV 5 completes the Next-Hop field in this table and inserts the ID of UAV D into it. It also checks the Previous-Hop field in its routing table and extracts the ID of UAV 2 from it. Then, UAV 5 sends back the RREP message to UAV 2 . This process continues until the RREP message reaches UAV S . Finally, UAV S uses the specified route for transmitting data to UAV D . This process is depicted in Figure 16. Algorithm 6 presents the pseudo-code related to Step 5. Moreover, the flowchart of the route discovery process is shown in Figure 17.

B. ROUTE MAINTENANCE PHASE
In this phase, we describe the route maintenance process. Obviously, the routes established in the route discovery phase may be failed due to the unique features of FANET, such as the high-speed UAVs and the dynamic network topology. The purpose of this phase is to quickly detect a route that is failing and replace it with a new one. In the proposed scheme, the route maintenance process includes two steps: • Preventing route failure • Reconstructing failed routes In the following, each of these steps is explained in detail.

1) STEP 1, PREVENTING ROUTE FAILURE
In Step 1, the purpose is to detect and modify routes, which are at the failure threshold, to avoid disrupting the data transmission process in the network. If one of the following three modes occurs, the established route must be corrected to prevent it from being failing: • Mode 1 (Reducing Energy of a Node): If the energy of UAV i in a route is less than the threshold value (i.e. E UAV i < E Threshold ), then this node is at the failure threshold. As a result, the route must be modified because UAV i cannot participate in the data transmission process.
• Mode 2 (Increasing Data Traffic in a Node): If the data traffic of UAV i in a route exceeds the threshold value (i.e. Tr UAV i > Tr Threshold ), then the buffer capacity of this node is at the overflow threshold. Therefore, delay will be increased in the data transmission process and the route will be blocked. As a result, the route must be modified because UAV i cannot transmit data packets

• Mode 3 (Decreasing Link Quality Between Two Nodes):
If the quality of the link between UAV i and UAV j in one route is less than the threshold value (i.e. Q Link i−j < Q Threshold ), then the link between these two nodes is at a failure threshold. As a result, the path must be modified. When one of the three modes occurs, UAV i checks its routing table to identify routes, which includes this node. Next, it sends the Warning message, which includes the ID of UAV i , to its previous-hop nodes in these routes. For example, see Figure 18. In this figure, assume that UAV 5 is at the failure threshold. This node is in Route #1, which was established in Section VI-A2. As a result, it sends a Warning message to UAV 2 to correct the route.
Then, UAV 2 sends the Route Recovery message to its neighboring nodes (i.e. UAV S , UAV 1 , UAV 3 , UAV 5 , and UAV 6 ). After they receive this message, the neighboring nodes send their spatial coordinates to UAV 2 . Among these nodes, UAV 2 selects a node that is closest to UAV 5 . This node is called an alternative node (in this example, UAV 6 ), which is also shown in Figure 19.   Then, it is necessary to check whether UAV 6 can build a valid route to the destination node or not. If a valid route is created (For example, Route #2), then this new route replaces Route #1. It should be noted that the data transmission process continues through Route #1 until Route #2 is created. This helps to ensure that the data transmission process is not disrupted. After the route is corrected, Route #2 will be used for data transfer. See Figure 20. Algorithm 7 presents UAV i : Unicast the RREP messages to the previous hop node based on the selected route; 7: end while 8: UAV S : Set the next hop field in its routing table; 9: UAV S : Transfer its data packets to UAV D through this route; End pseudo-code related to Step 1 (i.e. preventing route failure). Also, Figure 21 shows the flowchart of this process.

2) STEP 2, RECONSTRUCTING THE FAILED ROUTES
The purpose of the second step is to quickly recognize and replace the failed routes to decrease interruptions in the data transmission process. Therefore, UAVs should periodically check the routes in their routing table to recognize failed routes. For this purpose, UAV S periodically sends the Route validation message to UAV D through the route in its routing table. For example, see Figure 22. If this message reaches UAV D successfully, it indicates that this path is still valid. As a result, UAV D sends the ACK message to UAV S . This process is shown in Figure 23.
Otherwise, if this message does not reach UAV D correctly, it means that the route has been blocked. Next, the RERR message is transmitted to UAV S as shown in Figure 24. In such cases, UAV S must restart the route discovery process to create a new route to UAV D . The pseudo-code related to the reconstruction process of failed routes is presented in Algorithm 8. Flowchart of this process is represented in Figure 25.

VII. SIMULATION AND EVALUATION OF RESULTS
In this section, our proposed routing scheme is implemented using NS-Allinone-2.35 simulator to evaluate its performance. Then, we compare the results obtained from this simulation with three routing methods, namely ECaD [26], AODV [27], and LEPR [30]. The RWP mobility model has been used to simulate the movement of drones in FANET. In RWP, the most important advantage is its simple implementation. For this reason, most routing methods use this model to simulate the movement of drones in FANET [4]. In the simulation process of the proposed routing scheme, UAV neighbor : Send its spatial coordinates to UAV j ; 6: UAV j : Select the neighbor node closest (that has not yet been selected) to UAV i as UAV alternative ; 7: if UAV alternative cannot create a valid route then  Table 7. We evaluate the performance of the proposed scheme in terms of end-to-end delay (EED), packet delivery rate (PDR), routing overhead, route stability and energy consumption.

A. END TO END DELAY (EED)
The End to end delay (EED) is equal to the average time required from generating the data packet by the source node to reaching the destination node. Figure 26 compares end-to-end     ECaD [26], LEPR [30], and AODV [27], respectively. This is because we take into account route delay in the route discovery process to select routes with the least delay for data transmission. Whereas, this issue has been ignored in both AODV [27], and LEPR [30] schemes. As a result, they are very extremely delayed in the data transmission process.  Based on these results, it can be concluded that these two methods face a serious challenge in large networks, i.e. high delay during the data transmission process. This is a very important problem in FANET, because it negatively affects the stability of the routes. As shown in Figure 26, ECaD [26] has an acceptable delay because it has taken into account the route delay parameter in the routing process. However, in this method, the route failure probability is very high because ECaD [26] ignores the link quality parameter in the route discovery process and may select the low-quality links in a route. This can increase the delay in the data transmission process due to the modification or reconstruction of the failed routes.

B. PACKET DELIVERY RATE (PDR)
Packet delivery rate (PDR) means the ratio of total received data packets at the destination node to total data packets generated. Figure 27 illustrates the packet delivery rate (PDR) in different routing schemes with respect to the node density in the network. It should be noted that in this case, the speed of UAVs is a constant value, i.e. 30 m/s. As shown in Figure 27, our scheme has the highest PDR compared to other routing methods. On average, it improves the packet delivery rate by 14.04%, 60.92% and 54.63% compared to ECaD [26], LEPR [30] and AODV [27], respectively. According to Figure 27, when the number of nodes increases in the network, the packet delivery rate is almost constant in the proposed method. This means that our scheme is scalable. Moreover, Figure 28 compares the packet delivery rate (PDR) in different routing schemes with respect to the speed of UAVs in the network. It should be noted that in this case, the number of UAVs is fixed i.e. 50 nodes in the network. As shown in Figure 28, when the speed of UAVs is increased in the network, the performance of various routing schemes  are weakened and PDR is reduced. When the speed of UAVs is increased in the network, the routes created between UAVs become more unstable. As a result, the route failure probability increases and the packet loss rate increases. In Figure 28, the proposed method has the best PDR compared to other routing schemes. Compared to AODV [27], our proposed scheme improves PDR almost twice. Furthermore, on average, it increases PDR by 10.4% and 46.55% compared to ECaD [26] and LEPR [30], respectively. Because our proposed scheme designs a route modification mechanism that corrects a route quickly if the route is at the failure threshold. This mechanism reduces the packet loss rate because it can decrease the number of failed routes. On the other hand, in the proposed method, we consider the energy of the nodes in the route discovery process to create stable routes and reduce the route failure. However, this issue has been ignored in LEPR [30] and AODV [27]. Also, ECaD [26] does not consider the quality of communication links. Hence, this issue can increase the probability of route failure and decrease PDR.

C. ROUTING OVERHEAD
Routing overhead represents the ratio of all messages generated in the data transmission process to messages received at the destination node. Figure 29 compares the routing overhead in different schemes with respect to the number of UAVs in the network. It should be noted that in this case, the speed of UAVs is a constant value i.e. 30 m/s. As shown in Figure 29, the routing overhead of the proposed scheme is higher than other routing methods. It increases the routing overhead by 12.68% and 69.15% compared to ECaD [26] and AODV [27], respectively. However, its overhead is 1.64% lower than LEPR [30]. Because our scheme requires to broadcast the  route recovery message during the route modification process. Moreover, nodes broadcast their scores to the single-hop neighboring nodes in the route discovery process. This can increase communication overhead. Also, based on Figure 29, it can be found that routing overhead in low density of nodes in the network is high for most routing protocols. Also, it is reduced when the density of nodes is increased in network.
The reason for this is that in low density of nodes, it is less likely to find appropriate paths. In this case, AODV has a better performance than others, because its route discovery mechanism is simple. This mechanism is only based on broadcasting the RREQ message between neighboring nodes to find the appropriate path. Whereas, in ECAD, only high-energy nodes can broadcast the RREQ message. This limitation reduces the ability to find the route between the two nodes, especially in low density of nodes in the network. As a result, this can increase its routing overhead. On the other hand, in our method, nodes should calculate their score and share it with their neighboring nodes. Then, only the nodes with the high score can broadcast the RREQ message.  This limitation in our method increases routing overhead, especially in low density of network nodes.

D. ROUTE STABILITY
Route stability is evaluated based on the number of broken routes in the network. Obviously, if a routing method reduces the number of failed paths in the network, it can establish more stable routes. Figure 30 compares the number of broken paths in different routing schemes with respect to the density of nodes in the network. It should be noted that in this case, the speed of UAVs is a constant value i.e. 30 m/s. Note that the density of nodes in the network and the number of broken paths are inversely related to each other, meaning that as the density of nodes in the network increases, the number of failed routes decreases. In Figure 30, this issue is evident in the various routing schemes. However, we know that the density of nodes is low in FANET. As a result, different routing schemes must be successful in low-density networks. As shown in Figure 30, the proposed scheme can create more stable routes compared to other routing methods. On average, it can reduce the number of broken paths by 17.82%, 44.68% and 58.49% compared to ECaD [26], LEPR [30] and AODV [27], respectively. Moreover, Figure 31 shows the number of broken paths in different methods with respect to speed of UAVs in the network. It should be noted that in this case, the number of UAVs is fixed i.e. 50 nodes in the network. Note that the route stability and speed of nodes in the network have a reverse relationship with each other. Therefore, if the speed of the nodes is high in the network, then the number of broken paths increases. This is also shown in Figure 31. In FANET, the speed of the nodes is high, so a routing scheme must be successful when the speed of the UAVs is high in the network. As shown in Figure 31, the proposed method has the least route failure compared to other schemes. On average, our method reduces the number of broken paths by 32.76%, 58.79% and 77.56% compared with ECaD [26], LEPR [30] and AODV [27], respectively. This is because we have used a fuzzy system in the proposed routing scheme to select the best route for data transmission. In this fuzzy system, three parameters i.e. route fitness, number of hops, and route delay, are considered as inputs to select a route with the least delay, the best fitness and the minimum number of hops. Route fitness is determined based on the quality of the links between UAVs, the energy of nodes, the distance between UAVs, and the movement direction of UAVs in a route. Therefore, this parameter can improve the performance of our proposed method and increase the route stability because routes with high energy and appropriate quality are selected. Figure 32 compares different routing schemes in terms of energy consumption. It should be noted that in this case, the number of UAVs is equal to 100. As shown in this figure, the proposed method has the lowest energy consumption in comparison with other methods. On average, it decreases energy consumption by 10.42%, 11.89%, and 17.31% compared to ECaD [26], LEPR [30], and AODV [27], respectively. LEPR [30] and AODV [27] do not consider the residual energy of UAVs in their routing process. This increases energy consumption and imbalanced energy consumption in these schemes. Ultimately, this issue reduces the network lifetime. Our proposed method and ECaD [26] consider the residual energy of nodes in the routing process to establish high-energy routes. They don't allow low-energy nodes to participate in the route discovery process. This increases energy efficiency and improves the network lifetime. In addition, our proposed method seeks to improve the route discovery process by considering various parameters such as movement direction, residual energy of nodes, link quality, node stability, hop count, and delay to build stable routes. As a result, our method can reduce the number of broken routes. This can improve energy consumption.

VIII. CONCLUSION
In this paper, we presented an energy-aware and predictive fuzzy logic-based routing scheme in flying ad hoc networks. Our proposed routing scheme included two phases: the route discovery phase and the route maintenance phase. In this scheme, each node must first calculate a score based on four parameters: movement direction, residual energy, link quality, and node stability. If nodes obtain the required score, they can participate in the route discovery process. In the route selection process, we designed a fuzzy system to select a route with more fitness, less delay, and fewer hops for data transfer. In the second phase, we examined the two processes, namely preventing route failure and reconstructing failed routes. Finally, the proposed routing scheme was evaluated in terms of end-to-end delay, packet delivery rate, routing overhead, and route stability, and energy consumption. Then, the simulation results were compared with three routing methods, namely ECaD [26], LEPR [30], and AODV [27]. These results show that the proposed scheme has a successful performance in terms of delay in the data transmission process. We also evaluated PDR in different routing methods with respect to both node density and speed of UAVs in the network. In both cases, our scheme had the highest PDR compared to other routing methods. Therefore, it is more compatible with FANET because it can form stable paths. According to the simulation results, we deduced that our proposed scheme has a successful performance in networks with different sizes. This indicates that our scheme is scalable. We compared routing overhead in different schemes with respect to the number of UAVs in the network. This experiment show that routing overhead in the proposed method is higher than other routing schemes. Therefore, we must try to reduce this weakness and provide a more efficient scheme in future. In addition, we tested our routing scheme for path stability with respect to both network density and speed of UAVs in the network. These results show that the proposed routing method outperforms others, especially in low-density networks. Therefore, it is more compatible with FANET. Moreover, the proposed method can reduce the route failure in the high speed of UAVs. In the future research direction, we try to focus on multi-path routing scheme in FANET to improve fault tolerance in these networks. In addition, we seek to use artificial intelligence (AI) and machine learning (ML) techniques to present more efficient routing algorithms in FANET.