A Survey on the Convergence of Edge Computing and AI for UAVs: Opportunities and Challenges

The latest 5G mobile networks have enabled many exciting Internet of Things (IoT) applications that employ unmanned aerial vehicles (UAVs/drones). The success of most UAV-based IoT applications is heavily dependent on artificial intelligence (AI) technologies, for instance, computer vision and path planning. These AI methods must process data and provide decisions while ensuring low latency and low energy consumption. However, the existing cloud-based AI paradigm finds it difficult to meet these strict UAV requirements. Edge AI, which runs AI on-device or on edge servers close to users, can be suitable for improving UAV-based IoT services. This article provides a comprehensive analysis of the impact of edge AI on key UAV technical aspects (i.e., autonomous navigation, formation control, power management, security and privacy, computer vision, and communication) and applications (i.e., delivery systems, civil infrastructure inspection, precision agriculture, search and rescue (SAR) operations, acting as aerial wireless base stations (BSs), and drone light shows). As guidance for researchers and practitioners, this article also explores UAV-based edge AI implementation challenges, lessons learned, and future research directions.


I. INTRODUCTION
A N UNMANNED aerial vehicle (UAV), commonly known as a drone, is defined as an aircraft without a pilot, controlled from the ground or by a computer onboard [1]. UAVs have gained a lot of interest for rapid deployment in both civil Internet of Things (IoT) and military applications [2]. Examples of military applications include border surveillance, reconnaissance and strike [3]. This article, however, focuses more on civil IoT applications that include delivery systems, civil infrastructure inspection, precision agriculture, search and rescue (SAR) operations, acting as aerial wireless base stations (BSs) and drone light shows. Such applications and UAVs, in general, can be made more effective through the use of artificial intelligence (AI), edge computing, and edge AI.
AI makes machines smarter and in recent decades robots have employed AI to perform many intellectual tasks [4]. Few industries have not been revolutionized in some form by AI and aviation industries are no exception [5]. AI can leverage the large amounts of data produced by UAV systems to allow for more effective, precise and robust UAVs [5]. This capacity that AI has to deal with big data and its fast and high-accuracy processing [4] are particularly relevant in addressing various UAV technical challenges and applications.
Edge computing and UAV systems overlap such that UAVs (equipped with edge servers) can provide edge computing services for ground user equipment or the UAVs can act as users themselves and offload tasks to edge servers [6]. Under the traditional cloud computing model, the latter scenario involves sending the tasks between UAVs and a remote centralized server. Edge computing, in contrast, brings these computation services closer to the end users (UAVs) at the edge of the network such that data does not need to travel large distances to remote centralized servers [7]. These computation services can be onboard or at nearby edge servers. Fig. 1 compares cloud computing versus edge computing.
While not only providing decentralization, edge computing has many benefits that are described throughout this article (e.g., benefits in latency and energy consumption). Such benefits can be hugely beneficial and sometimes vital.  improved latency of edge computing (relative to traditional cloud computing) to avoid objects.
Edge AI encapsulates the fusion of AI and edge computing [8]. While "edge AI" is often referred to as "edge intelligence," the term edge AI will exclusively be used throughout this article. This article defines edge AI as Zhang et al. [9] does: "the capability to enable edges to execute AI algorithms." As discussed throughout this article, edge AI for UAVs inherits the general benefits of edge computing for UAVs (i.e., lower latency, higher reliability, improved security and privacy, reduced cost, and reduced energy consumption) while also allowing for additional benefits such as those offered by federated learning.

A. Paper Motivation
In 2021 the commercial UAV market had an estimated value of U.S. $20.8 billion and by the end of 2026 is expected to reach a U.S. $501.4 billion valuation [10]. Despite this increasing interest in UAVs, considerable limitations still exist. Many of these limitations of UAVs (e.g., high power/energy consumption and real-time requirements) overlap with the benefits of edge computing and edge AI (e.g., low energy consumption and low latency). Table I summarizes recent surveys on edge computing, AI, edge AI, and UAVs that are particularly relevant and compares their coverage with important areas of this survey article. For each area, a paper is marked as: not considering it or only very briefly discussing it in passing (red L), only partially considering it by leaving out vital aspects of it or discussing it only in relation to other areas (yellow M) or considering it in reasonable or high detail (green H). For example, paper [11] in the first row considers the areas "UAV," "UAV Technical Challenges," and "UAV Applications" in high detail (dedicated sections or substantial subsections focused on the areas), considers the area "AI/ML" partially (mentioned in various parts of this article but in no detail and without focusing on it), and does not or only very briefly covers the areas "Edge Computing," "Edge AI," and "Edge AI Implementation Challenges" (mentioned edge computing in passing and no reference to edge AI or its implementation challenges).
While the integration of all survey papers discussed would ensure at least one topic had "high coverage," the topics are not linked and discussed in relation to each other as they are in this article. Additionally, the only "high coverage" for the area Edge AI Implementation Challenges is paper [12], which does not relate to UAVs and, therefore, discusses edge AI implementation challenges in general. Thus, we can say the key gap in these papers is that there is no survey paper to comprehensively analyze edge AI's impact on UAVs.
The final two papers (papers [13] and [6]) discussed in Table I have the most overlap with this article. Both papers lack a comprehensive edge AI analysis, particularly with regard to the key UAV technical challenges and applications. They both also lack an in-depth discussion on UAV edge AI implementation challenges and future research challenges.

B. Our Contribution
To the best of our knowledge, this is the first survey article to focus on the role of edge AI for numerous UAV technical challenges and applications. The main contributions can be summarized as follows.
1) Analyze in detail the role of AI and edge AI for improving the technical challenges of UAV systems. 2) Explore the role of edge AI for key UAV applications.
3) Analyze the possible implementation challenges for the use of edge AI in UAVs and describe possible solutions to mitigate these implementation challenges. 4) Summarize the lessons learned, key research questions, and future directions in using edge AI for UAVs.

C. Organization
As shown in Fig. 2, the remainder of this article is organized as follows. Section II presents the background information of four broad areas important to this article: 1) UAVs; 2) edge computing; 3) AI; and 4) edge AI. Section III introduces six key technical challenges of UAV systems and discusses the role of AI and edge AI for each of these technical challenges. Section IV introduces six key UAV applications and discusses how edge AI helps each application. Section V discusses four implementation challenges for the use of edge AI in UAVs and presents possible solutions for each, as well as remaining research questions where appropriate. Finally, Section VI presents lessons learned and future directions for the use of edge AI for UAVs and Section VII concludes this article.

II. BACKGROUND
This section will discuss background information that may be required for subsequent sections. The four broad areas background information is provided for are: 1) UAVs; 2) edge computing; 3) AI; and 4) edge AI.
A. Unmanned Aerial Vehicles 1) Type of UAVs: UAVs can be classified by many different criteria (e.g., size, range of operation, and level of autonomy) but a common broad classification is: fixed-wing, fixed-wing hybrid, single rotor, and multirotor as shown in Fig. 3 [17], [18].
2) Swarm UAVs: In the last decade and a half, important interactions between technological developments in computing, control, and communications have been realized that has led to the implementation of new interacting systems such as networked unmanned multivehicle systems [19]. Such systems allow for the idea of swarms or fleets of UAVs where multiple UAVs can work together to achieve a specific goal. There are many advantages of such multi-UAV systems compared to systems containing just one vehicle. Advantages include the following.
1) Time Efficiency-Mission operational times can be significantly reduced by employing UAV teams. 2) Cost-Multiple small UAVs can be cheaper than using a heavy (over 25 kg) UAV that needs to go through costly long administrative procedures. 3) Simultaneous Actions-Multiple UAVs can complete tasks in different locations at the same time. 4) Complementary-Each UAV member can have a specific combination of sensors. 5) Fault Tolerance-It is possible for a mission to go on if one or more UAVs go down [20].

B. Edge Computing
Edge computing is an extension of cloud computing where computing services (such as storage and processing) are brought closer to end users at the network edge [7].
1) Structure of Edge Computing System: Generally, as shown in Fig. 1, an edge computing structure can be separated into three levels: 1) end device; 2) edge server; and 3) core cloud (cloud server). End devices are highly responsive, however resource requirements mostly have to be forwarded to servers as a result of a limited capacity. Edge servers support most of the network traffic flow and many resource requirements (e.g., computation offloading, data caching and real-time data processing) at the cost of a small increase in latency (relative to end devices). Cloud servers offer more powerful computing and higher data storage capabilities, although they require a provision to be made for a sometimes substantial transmission delay.
The goal of such an architecture is to perform the delaysensitive and computationally intensive part of an application in the edge network, while some applications in the edge server may communicate with the core cloud for the purpose of data synchronization [21].
Applications with stringed delay requirements (i.e., delaysensitive applications) are particularly improved/made possible by edge computing. For example, if one considers real-time packet delivery between self-driving cars that needs an end-toend delay of less than 10 ms [22], cloud computing is found to be intolerable due to the minimum end-to-end delay for cloud access being greater than 80 ms [23], [24]. Edge computing can meet this requirement.

C. Artificial Intelligence
Since it was first coined in 1956, many different definitions and interpretations of AI have been offered [25]. A simple description of AI is that it "describes the work processes of machines that would require intelligence if performed by humans [26]." An explosive growth of data, advances in ML, and the ease of access to powerful computing resources has driven AI to achieve remarkable breakthroughs [27]. AI has a variety of applications from image or street number recognition to natural language translation to self-driving cars to playing strategy games, such as Chess or Go [28]. The most famous application of the later is Google Deepminds' project "Alpha-Go." In 2017, it beat the world number one Go player at the game of Go [29].

D. Edge AI
Edge AI has garnered industry attention with companies, such as Intel, IBM, Google, and Microsoft who have put forward pilot projects to demonstrate edge computing's advantages in paving the last mile of AI. Such efforts have helped in the progress of many AI applications, such as live video analytics, smart home, precision agriculture and Industrial IoT.
Despite both commercial and academic interest, definitions of edge AI can be broad and diverse. For example, some definitions restrict edge AI to the paradigm of running AI algorithms locally on end devices [8]. As described in Section I, this article defines edge AI as "the capability to enable edges to execute AI algorithms." Given the broad and diverse nature of edge AI definitions, it can be useful to categorize edge AI into levels [9]. Peltonen et al. [12]  According to Anwar [30], simple NNs with real-time training can be implemented on edge nodes (see Fig. 4 level 7). The problem with this is that performance can be heavily compromised and if you try to fix this by making the NN significantly "deeper," this results in the need for significantly more computing, causes increased energy/power consumption and requires more latency. This is particularly relevant to the application of UAVs as all three of these requirements are problematic for UAVs (UAVs have limited compute, energy/power is a constrained resource and due to real-time requirements it is vital for latency to be low).
Solutions to such resource constraints at the edge include: training smaller networks, model compression techniques (e.g., pruning, quantization, low-rank factorization, and knowledge distillation), data/model parallelism, hardware approaches, hardware and software co-design, federated learning, and blockchain [30]- [33]. Federated learning and blockchain are two promising techniques discussed throughout this article and as such will be discussed in further detail.
Federated learning is an emerging decentralized ML technique. As opposed to gathering data in one place and training a model based on this combined data, each participating device (e.g., UAV) trains the same model using just local data. Next, these (local) model updates are sent in an encrypted way to a server in order to generate an updated shared global model. Finally, the updated shared global model is sent back to the devices (e.g., UAVs) and the process is repeated until an optimal (or at least near optimal) model is reached [34]. According to Wu et al. [35], in the case of UAVs, the server where local model updates are sent can either be a ground BS or another UAV in the sky. Fig. 5

demonstrates this.
Blockchain is another decentralized technique that can be employed by UAVs. It is basically a secure distributed ledger that can record all transactions into a chain of blocks. With the exception of the first block (genesis block), every block is linked to the previous block by storing the hash value of the parent block. In order to add a new block to the blockchain it is required to complete a competition governed by a consensus algorithm [36]. Additionally, work such as  Nguyen et al. [37] showed that blockchain and federated learning can be effectively integrated together (e.g., for improved security and privacy).
While most edge AI relative to traditional cloud AI benefits are the same as the general edge computing relative to traditional cloud computing benefits (e.g., lower latency and higher reliability), there are additional edge AI benefits. Most notably, they are as follows.

1) Further Improvement to Energy Consumption (Beyond Edge Computing Energy Consumption Advantages):
The hardware design and "smartness" of edge AI chips can significantly reduce energy consumption. The data in edge AI chips is not required to be swapped between memory and processor (unlike traditional Von Neumanan or stored-program chips) as edge AI chips usually rely on near-memory or in-memory data flow where logic and memory data are closer together. Additionally, companies that develop edge AI chips usually run ML algorithms as 8 or 16-bit computations which can sometimes further reduce energy consumption by orders of magnitude. Qualcomm claims their edge AI-optimized chips can result in energy savings as much as 25× relative to conventional chips [38].

2) Further Improvement to Privacy (Beyond Edge Computing Privacy Advantages) by Enabling Federated
Learning: Federated learning can preserve privacy by decentralizing data from the central server to end devices (e.g., UAVs). Instead of sending sensitive data to a server, data can remain on-device and only local model updates need to be sent off-device [39].

3) Further Reduce Communication Overhead in Certain Scenarios by Enabling Aggregation Frequency Control:
In the case of training a deep learning model in an edge computing environment, where distributed models are trained locally first and then updates are aggregated centrally (e.g., federated learning), the control of updates aggregation frequency has a significant influence on the communication overhead. In such scenarios, the aggregation process can be carefully controlled and optimized through "aggregation frequency control" [8], [40]. Table II compares cloud AI versus edge AI. III. TECHNICAL CHALLENGES OF UAV SYSTEMS This section discusses the key technical challenges of UAV systems and the role of AI and edge AI for each challenge.
The key technical challenges of UAV systems are categorized into six major categories: 1) autonomous navigation; 2) formation control; 3) power management; 4) security and privacy; 5) computer vision; and 6) communication. For each of these technical challenges, we introduce it then discuss the role of AI and edge AI. Table III summarizes the key technical challenges and the benefit of edge AI to them.
A. Autonomous Navigation 1) Introduction: Autonomous navigation can relate to the navigation of a vehicle that a human remotely operates but has some simple onboard algorithms that take over and prevent it from crashing, all the way to the navigation of fully autonomous vehicles that can get from A to B without any human interaction (e.g., drones for package delivery). Based on the application, a vehicle autonomously navigates by employing localization and mapping, path planning, and/or collision avoidance. For example, in the case of UAV remote operation with only some simple onboard algorithms, only collision avoidance is employed. Whereas, in the fully autonomous case, localization and mapping, path planning, and collision avoidance are needed [63]. For this reason, this article introduces autonomous navigation from the perspective of: "localization and mapping," "path planning," and "collision-avoidance systems." a) Localization and mapping: In the context of robots, mapping is the process of constructing a map (2-D or 3-D) of a particular area and localization is the process of determining what a robots' position and orientation are with respect to a frame of reference. Accurate localization for any robot can be a challenging task and for aerial robots such as UAVs it is particularly difficult due to the 3-D nature of the environment. To make this task of accurate localization easier UAVs often heavily rely on global positioning system (GPS), such that the GPS position measurements are fused with the UAV onboard inertial measurement unit (IMU) measurements to produce an accurate estimation of the UAVs' pose (position and orientation). This works well due to the fact that the GPS data compensates for the IMU accumulated error (due to drift in its measurements) [64].
There are many occasions, however, where GPS services are not available/reliable such as indoors (factories, warehouses, etc.), in emergency/post disaster situations [65], near tall trees/buildings or when near water bodies. Such environments are aptly named GPS denied environments and navigating UAVs with accurate localization through such environments with just IMU measurements is very challenging due to the aforementioned IMU accumulated error.
The most common way to solve this issue is vision-based solutions that are able to accurately localize a UAV without needing GPS by combining IMU and vision sensor measurements. When the two measurements (IMU and vision sensor measurements) are fused an improved pose estimation is obtained. The most well known of these vision-based solutions are visual SLAM (simulated localization and mapping) and visual odometery (VO). SLAM algorithms aim to estimate the pose of a robot while, at the same time, constructing a representation of the explored zone (visual SLAM algorithms rely on visual sensors) [66]. VO incrementally predicts the pose of the UAV by analyzing the change that motion causes on a series of images [64].
b) Path planning: UAV path planning is a problem of determining a path for a UAV from a starting point to a goal point [67]. There are many different types of path planning techniques, however they all try to find an optimal (or near optimal) path based on performance indicators, such as shortest time, shortest route, or minimum cost of work [68].
As one might suspect, the integration of path planning and collision avoidance is critical. They are used together so much that it is common for collision avoidance to be referred to as "local path planning" while path planning is referred to as "global path planning." The idea is that global path planning generates optimal routes while considering the whole environment and local path planning locally deals with changes in the environment as they are detected, performing the collision-avoidance maneuvers accordingly. Once the collision-avoidance maneuver is executed the global path is tried to be returned to [69].
UAV path planning (global path planning) techniques can be categorized a number of different ways. One example is the work of Aggarwal and kumar [67] where path planning techniques are classified into representative techniques, cooperative techniques, and noncooperative techniques. c) Collision-avoidance systems: As UAVs fly around the air, often at speed, they pose a high collision risk, whether that be them crashing into other objects or other objects crashing into them. A collision-avoidance system is crucial for UAVs to avoid such collisions and ensure a safe flight.
Yasin et al. [69] split a collision-avoidance system into two main categories: 1) perception and 2) action, where perception is required first. In the perception phase, sensors perceive the environment and detect obstacles and in the action phase, this information is used by a collision-avoidance approach to avoid a collision. Perception is subdivided into active sensors (sensors that transmit/emit and then receive their own source) and passive sensors (sensors that read just the energy discharged by an other source). This is then subdivided into sonar, LIDAR, and radar for active sensors and camera and IR for passive sensors.
Regarding the action phase, the collision-avoidance approaches are categorized into "four major approaches": 1) geometric; 2) optimized; 3) force-field; and 4) sense and avoid [69]. "Geometric" collision-avoidance approaches use the UAV and obstacle velocity and location information to make sure minimum distances will not be breached, trajectory simulation is normally involved. "Optimized" collisionavoidance approaches use already known parameters of obstacles to find an optimal (or near optimal) route. "Force-field" collision-avoidance approaches manipulate attractive/repulsive forces and "Sense and Avoid" approaches make avoidance decisions at runtime depending on obstacle detection [69].
2) Role of AI: AIs biggest contribution to autonomous navigation is computer vision algorithms, which are vital to the three challenges: 1) localization and mapping; 2) path planning; and 3) collision-avoidance systems. The recent strides in computer vision algorithms (particularly deep learning algorithms) as well as camera technology (particularly RGB cameras) has enabled UAVs to effectively detect objects using high-resolution, lightweight, and cheap onboard cameras. In localization and mapping, particularly without GPS data, there is a heavy reliance on the use of computer vision algorithms in vision methods, such as SLAM and VO (discussed in Section III-A1a). Additionally, in path planning and collisionavoidance systems, computer vision algorithms are vital to quickly detecting oncoming objects to avoid a collision.
3) Role of Edge AI: When edge AI as opposed to AI under the traditional cloud model is employed there are many benefits for autonomous navigation. While all the general advantages of edge computing (lower latency, higher reliability, security and privacy improvements, reduced cost, and reduced energy consumption) and all general additional edge AI benefits (further energy consumption/privacy/communication improvements) apply here, the lower latency and higher reliability that edge AI offers compared to traditional cloud AI is of particular interest and importance to the problem of autonomous navigation. This section thus briefly discusses the advantages as well as disadvantages of edge AI. a) Lower latency: AI that is employed using traditional cloud computing can involve a significantly long transmission latency associated with sending and receiving data between the UAV and a central cloud server [43]. Edge AI enables the majority of processing at the end device or a nearby edge server with a significantly shorter transmission delay associated with it compared to a remote cloud [21]. Even if there is a case as described in Section II-B where some applications require the edge server to communicate with the core cloud for the purpose of data synchronization, the transmission delay is not significant. This is because preprocessing at the edge results in a reduced overall traffic load (i.e., less data sent from each device/UAV).
Collision-avoidance systems, a prime example of a realtime delay-sensitive challenge, are particularly reliant on low latency and as a result edge AI can be a necessity. The process of detecting and avoiding an oncoming object is (unless the UAV and oncoming object are moving very slow) required to be completed in fractions of a second. If this process takes too long, the result is a crash with significant financial or worse (e.g., fatal) implications. For path planning and localization and mapping, traditional AI's latency is likely to be sufficient in most static environments, especially those that are sparsely populated or at a high altitude. With this said, edge AI's improved latency is still a significant benefit given the restrictions high latency can have on flight speed. b) Improved reliability: Running AI under the traditional cloud computing model relies on the central cloud server to be reliable. If the central cloud server is unreachable/goes down, there could be disastrous consequences (e.g., a crash). Such a situation is much less likely with edge AI as processing happens nearer the users (edge server/on-device), meaning there is a significantly reduced chance of network outage. If an edge server does go down, another server should be able to provide a service and even if not, end devices can handle a lot of requests on their own with locally stored portions of data still accessible [41].
When AI under a traditional cloud computing model is employed, a crash is a likely consequence of the central cloud server becoming unreachable/going down because the UAV video feed would then not be analyzable and oncoming objects on collision course with the UAV would go undetected. Employing traditional cloud AI, path planning and localization and mapping can cope slightly longer without access to the central cloud server but stalling in the air without mission progress or a crash is still inevitable if this loss of connection is for any substantial amount of time.
c) Disadvantages: Two significant disadvantages of edge AI that affect autonomous navigation are: significantly fewer network devices in some places and fewer skilled people to implement, fix, or manage the network devices in such places. In other words, in less populated areas and/or areas with little financial or technical resources it is more likely for there to be less edge servers on the network and, in many of these areas, it is likely there will be less skilled people who can implement, fix and manage the edge networks [70]. This affects autonomous navigation as there might be a reliance on edge servers and it means the positive effect of edge AI is diminished, particularly with regard to latency and reliability.
Additionally, another disadvantage in autonomous navigation is the need for UAV task offloading between different edge servers. When a UAV leaves the service range of a particular edge server, this server may need to migrate the tasks offloaded by the UAV to other edge servers [71]. Due to the high speeds UAVs travel, this can be expected to limit UAV mission performance.

B. Formation Control 1) Introduction:
It is often preferable to perform UAV missions with more than one UAV cooperating together rather than a single UAV trying to accomplish the mission on its own (see end of Section II-A). Encouraged by applications where it is advantageous to use more than one UAV (e.g., large payloads transportation or searching for objects/people in large areas) [72], extensive formation-related studies have been done in recent decades with formation control being the most actively investigated subject [73].
Inspired by self organization seen in nature such as flocking birds, formation control is the coordinated control of the "formation" of multiple robots. Formation is defined as a network of agents interconnected via their controller specification, in which each agent has to maintain relationship with respect to neighboring agents [74]. A broad classification of formation control is the two categories: 1) leader-follower and 2) leaderless [72].
2) Role of AI: a) Reinforcement learning: Reinforcement learning (RL) is an area of ML, and thereby an area of AI. It can be described as learning what we do in order to maximize a numerical reward signal where the learner is not given actions to take but rather has to try them and deduce which actions result in the most reward [75]. RL is particularly helpful for the joint movement and communication of UAVs [35]. Thus, many papers, especially recently, have investigated the use of RL in UAV formation control. For example, Knopp et al. [76] proposed a method of using the GQ(λ) RL algorithm for a leader-follower formation control scenario.
b) Deep reinforcement learning: One problem RL faces is that it can be overwhelming for an RL algorithm to learn from every state and determine an optimal reward path (i.e., policy). RL can be combined with deep learning to produce another subfield of ML called deep RL (DRL). DRL can employ neural networks to deal with higher dimensional state/action spaces. For example, Conde et al. [77] used DRL to drive multiple UAVs to reach formations such that a deep neural network is used to estimate how good a particular state is. c) Multiagent systems and reinforcement learning: Multiagent systems (MASs) are a means to solve complex problems where the problem is subdivided into smaller tasks. Each individual task is allocated to autonomous entities called "agents" and each agent chooses a proper action to solve the task based on multiple inputs. Inputs include the history of its actions, interactions with neighboring agents, and its goal [78]. RL can be applied to such MASs to great effect. For example, Liu et al. [79] proposed an RL-based distributed model-free solution for a MAS leader-follower formation control problem.
3) Role of Edge AI: As is the case with autonomous navigation, when edge AI as opposed to AI under the traditional cloud computing model is employed, there are many benefits to formation control such that most of the general advantages of edge computing (lower latency, higher reliability, etc.) and general additional edge AI advantages (e.g., further energy consumption improvement) apply. Similarly, this section will focus on the advantage that is of particular interest and importance, which for the problem of formation control is reduced cost.
a) Reduced cost: When referring to a UAV formation, we are dealing with UAV swarms which generate a large amount of streaming data that is constantly being transferred from the UAV for processing. Edge AI both reduces the amount of data that needs to be sent to servers by preprocessing onboard and reduces the distance the data has to be sent by sending to edge servers as opposed to more remote centralized cloud servers. The reduced data size particularly helps with regard to operational cost as there is a cloud side computation cost that can be significant when dealing with large volumes of data [45]. With this said, the costs of launching and maintaining edge devices spread over large areas can be significant and should be considered [70].

1) Introduction:
A well-known issue with UAVs is their limited battery life and by extension their flight time. Along with making the UAV more energy efficient, the battery life can be extended by using innovative ways to obtain more energy called energy harvesting techniques. Common energy harvesting techniques are solar energy, wireless charging, and battery swapping.
a) Solar energy: The cost-effective and environmentally favorable nature of solar energy make it a favorable source of power. Solar cells are particularly useful to UAVs where it is required for UAVs to fly at high altitudes for longer periods of time. Solar energy-based UAVs usually employ a fixed battery as a secondary source where the battery source is not usually heavily relied on during the day but can become important at night or in bad weather conditions [80]. With this said, surface area, weight restrictions, and reliance on light intensity are major limiting factors for commercial solar energy-based UAV applications. b) Wireless charging: Wireless Charging is yet to become a standard feature of UAVs. With this said, in recent years, much research effort has been carried out to make UAV wireless charging feasible. Techniques explored include capacitive coupling-based techniques (e.g., [81]), magnetic resonance-based techniques (e.g., [82] and [83]), and even recharging from power lines with wireless power transmission (e.g., [84]) [80].
Additionally, wireless charging through tethered drone charging stations where the drones being charged employ blockchain-aided FL is explored through works such as Alsamhi et al. [85]. Fig. 6 demonstrates such a scenario.
c) Battery swapping: Rather than make the recharging process very quick or to charge on the fly/move, one battery charging solution is to not charge at all and instead efficiently swap a drained battery for a fully charged one. Often, the concept of hot swapping is explored where during the swapping process the UAV is connected to an external power source (e.g., [84], [86]). The swapping time for such systems is roughly 60 s, which is very quick when compared to the average battery charging time that often lasts 45 to 60 min [11]. Fig. 7 demonstrates a typical hot swapping process.
2) Role of AI: AI can contribute to the problem of power management through algorithms for planning and optimizing. For example, algorithms that find the optimum route for UAVs to travel that minimizes power consumption or algorithms for selecting the optimum charging/battery swapping stations taking current battery power and deviation from current course into account. Zhang et al. [87], for example, found the quickest path to a charging station using DRL.
Additionally, convolutional neural networks (CNNs) find applications in identifying charging stations and landing spots on them, recurrent neural networks find applications in accurately predicting the end of a UAVs power and AI, in general, also contributes by making the UAV, in general, more efficient such that more can be achieved using less power [11].
3) Role of Edge AI: Like in Sections III-A3 and III-B3, the general advantages of edge computing and general additional edge AI advantages apply. The edge AI advantage of reduced energy consumption is particularly relevant here and, thus, will be discussed. a) Reduced energy consumption: As discussed in Section III-B3, edge AI both reduces the amount of data that needs to be sent to servers by preprocessing onboard and reduces the distance the data has to be sent by sending to edge servers as opposed to more remote centralized cloud servers. Besides reducing costs, this also reduces energy consumption as there is significant energy consumption associated with data transfer to remote cloud. By reducing the data size and distance transferred it is reducing the overall energy consumption, which is particularly vital in the case of UAVs since batteries are a strained resource. Additionally, when edge AI is employed, this sending of data to servers and the energy consumption associated with it can be further decreased through distributed federated learning within a UAV swarm. For example, Zeng et al. [88] proposed a distributed federated learning-based framework for UAV swarms which have a "leading UAV" and several "following UAVs." All the following UAVs locally train a model from their collected data, then each of the following UAVs send this locally trained model to the leading UAV. This UAV aggregates all the models, creates a global model, and then sends it to the following UAVs.
D. Security and Privacy 1) Introduction: Security and privacy are very important issues for all digital systems, particularly for UAVs [89]. UAVs have a unique variety of agile access techniques compared to other privacy-infiltrating devices (making them attractive to criminals) whilst being vulnerable to attacks that target wireless links, cyber elements, physical elements, and interfaces between cyber and physical elements [90]. a) Security: While many papers that discuss the area of security with regard to UAVs discuss the same issues, the approaches taken differ.
Shakhatreh et al. [11] classified attack vectors of UAV systems as attacks on Communication links, UAVs themselves, ground control stations (GCSs), and Humans. They also define three general cybersecurity challenges for UAV systems: 1) confidentiality challenges (refers to the protection of information from unauthorized access); 2) availability challenges (refers to making sure that the UAV on-system services and data work as expected and can be accessed by authenticated users); and 3) integrity challenges (refers to ensuring the authenticity of information). Ullah et al. [80], with short explanations, classifies both the attackers (insider/outsider, malicious/rationale, active/passive, and local/extended) and the attacks (e.g., Masquerade, Denial of Service, and GPS spoofing). This section, however, analyses UAV attacks from a sensors and communication links perspective.
The information obtained by sensors change UAV behavior and have a significant influence on security. One common sensor to attack is the GPS sensor as it is often relied on for accurate location information. The most common way to attack a UAV's GPS is by "jamming" or "spoofing." Jamming is where the unauthorized party broadcasts a disturbing signal to stop various signals being received. Spoofing can be when the unauthorized party records satellite signals and transmits to the UAV (repeater-type spoofing) or when signals are generated based on real signals using certain programs (generating type spoofing) [91]. A solution to GPS jamming is to adopt alternative navigation methods such as using a vision and inertial navigation system that employs SLAM or VO (see the localization and mapping section, Section III-A1a). Solutions to GPS spoofing include the authentication of GPS signals such as checking GPS observables that denote the travelling time of the signals or detecting sudden changes in signal power/observables which may indicate the start of a spoofing attack [90]. Other common sensors that are susceptible to attack are binocular visual sensors that can be Spoofed (e.g., by using lasers directed on the ground plane to induce features) or MEMS gyroscope that can be attacked with ultrasonic waves (e.g., to unbalance the UAV).
Regarding communication links, exchange between the UAV and GCS depends on communication links and unsafe links can be attacked. For example, one method of communication between the UAV and the ground terminal is WiFi, which can be attacked by a Deauth attack where the connection between a UAV and terminal is broken and the password to control the UAV is cracked. Solutions include asking the user whether to return home automatically after the connection to the UAV is lost for 10 s, and using radio signals as opposed to WiFi signals. b) Privacy: It is both easy for UAVs to violate privacy and difficult to capture UAVs that intrude [90]. There are two main solutions to preventing UAVs from invading personal privacy. One is registering home addresses in no-fly zone databases, however, this still does not ensure intruding UAVs will not still fly into restricted areas [91]. The second solution is to use techniques/systems to detect, track, and drop drones within a space.
Additionally, malicious software can use UAVs to collect personal information. For example, Snoopy malicious software can be installed on a UAV for harvesting personal information and tracking/profiling individuals that use smart phones [90]. UAVs need to be continually developed to deal with such evolving malicious software.
2) Role of AI: AI has applications in both aiding the prevention of a UAV being attacked and in systems, briefly discussed above, for preventing UAVs themselves from invading peoples privacy (by flying over/near no-fly zones). Regarding the later, by 2026, the "Global Anti-Drone Market" is expected to reach U.S. $2597 Million [10]. An example is the Nippon Electric Company surveillance system that uses acoustic, thermal, infrared and/or radio communication sensors/detectors to sense intruding UAVs and which offers the tracking system owner the option to drop/acquire the UAV [90]. The algorithms for detecting UAVs particularly employ AI, for example, Zhang et al. [92] presented a UAV detection algorithm based on a artificial neural network (ANN).
Regarding the former (preventing the UAVs themselves from being attacked), Challita et al. [93] claimed that it is important to detect potential attacks by finding undesirable/abnormal UAV motion. Challita et al. [93] depicted RNNs as a good example of this, where the RNNs predict the motion of the UAVs such that a UAV's abnormal motion can be detected. Additionally, AI protection can defend UAVs from zero-day attacks through leveraging models trained on malicious files [94].
3) Role of Edge AI: As with the previous "Role of Edge AI" sections for the other technical challenges, the general advantages of edge computing and general additional edge AI advantages apply. Obviously, edge AI's security and privacy advantages are partially relevant and, thus, are discussed. a) Improved security: Typically, using AI under the traditional cloud computing model requires all of your data to travel to the central server. This is considered "highly vulnerable" as one attack (e.g., DDoS attack) can cause significant disruption. Using edge AI implies the distribution of your data processing across multiple devices/servers [41]. Even though it has to be conceded that this distribution of data processing increases the potential attack surface, the risk is more distributed such that the impact of a successful attack (such as a DDoS attack) is diminished. Also, since edge AI enables processing at the edge, less data are sent and, therefore, less can be intercepted [42].
In terms of the actual closing down of the attacks, the distributed and scattered nature of edge computing means that an edge AI system's vulnerable parts are easier to close off compared to a traditional cloud AI system, where the closing down of the whole network is often required [95].
The integration of blockchain into a UAV system can have numerous security advantages. For example, blockchain can reduce a UAV network's vulnerability to signal jamming by ensuring every UAV has a copy of the blockchain. In this scenario individual UAVs determine their own path by using details of other UAV flight routes contained in their blockchain copy. Another example is how blockchain can detect malicious UAVs which alter information in the network. A malicious UAV can be initially part of the UAV network and later get hijacked or can enter the network at a later point. Blockchain can aid in preventing such attacks through blockchain consensus algorithms where any UAV can report suspicious activity. If the number of entries contradicting a UAV is greater than a certain threshold that UAV is said to be malicious [96].
b) Improved privacy: Edge AI enables real-time computation. If the taking/recording of images that violate privacy are unavoidable, the data do not have to be sent and stored to/at a remote centralized cloud server and can instead be processed locally onboard the UAV or at an edge server. The significance of this is that such data are less likely to be hacked and do not have to be stored at a remote centralized cloud server.
Both federated learning and blockchain can improve the security of UAV communications. Federated learning can avoid the need for any raw data at all to be sent from devices/UAVs (just local model updates will need to be sent) [34]. Blockchain can encrypt data and store it within the blockchain such that the data cannot be accessed by anyone without the correct decryption key. Additionally, blockchain can protect the four main data types in a UAV network (UAV identifier, flight route control, sensor data, and flying schedule) by writing and updating them within a blockchain block [96]. c) Disadvantages: As discussed in the security section (Section III-D3a), it should be noted that the distribution of data/data processing on several edge nodes has the disadvantage of increased potential attack surface. Even when a blockchain-based system is employed, every UAV has a copy of the distributed ledger meaning some sensitive information is spread to all UAVs in the system. Also, it should be noted that in a blockchain-based UAV swarm if over half the UAVs in the swarm are hacked, the swarm can be controlled (this attack is called a 51% attack) [97].
E. Computer Vision 1) Introduction: Computer vision's purpose is to allow a computer to understand an environment from visual information [98] (whether this is from a single image or a series of images). In recent years, there has been increasing interest in the area of automatic understanding of the visual data collected from UAVs [99] and in most UAV applications (ranging from aerial photography to SAR operations) computer vision has a vital role [100].
From a computer vision stand point, the core task of such applications is scene parsing. Different levels of scene parsing are required for different applications, from locating objects, to determining exact object boundaries, to recognizing objects [101]. UAV computer vision applications include object detection, object recognition, object tracking, collision avoidance, self-navigation, and 3-D reconstruction. Such image processing can be done remotely at a server (edge or central cloud) or onboard the UAV (embedded). a) Remote computer vision processing: UAVs often do not have the processing power onboard to process images taken by UAV cameras and, as a result, the processing needs to take place at a different location. From a latency perspective, this is ideally at an edge server although computer vision can be processed at more distant centralized servers as well.
b) Real-time embedded computer vision processing: If the aim is to make UAVs truly autonomous and reliable, real-time embedded computer vision processing is preferable to remote computer vision processing as remote processing requires high bandwidth, minimal latency and extremely reliable wireless links which cannot always be guaranteed [102].
The most prominent limitation of UAV real-time embedded computer vision processing is the onboard computational power. Van Beeck et al. [102] stated that state-of-the-art UAV computer vision algorithms have computational requirements that regularly conflict with hardware resource limitations.
2) Role of AI: The use of AI is not compulsory in computer vision techniques such as how Petricca et al. [103] can perform rust detection based on the number of pixels containing certain red components. Despite this and despite the fact that AIbased techniques can require large datasets for optimal results, computer vision applications heavily employ AI. The area of AI that most intersects with computer vision is deep learning. a) Deep learning: According to Lecun et al. [104], deep learning makes it possible for computational models comprised of multiple processing layers to learn representations of data with multiple abstraction levels. The aim of the early layers is to learn detection of low-level features such as edges and the aim of the later layers is to combine features into a more complete representation [105]. An example of a deep learning application in UAV computer vision is Ye et al. [106] presented a novel approach that employs a deep learning classifier for detecting and tracking other UAVs. Another example is Padhy et al. [107] proposed a method that uses a CNN model to facilitate UAVs to autonomously navigate through GPS-denied indoor corridor environments.
3) Role of Edge AI: The role of edge AI in computer vision concerns computer vision processing both at edge servers and onboard the UAV. When the AI processing can be completed at edge servers or on-device as opposed to under the traditional cloud model, all the general advantages of edge computing and general additional edge AI advantages apply. The advantage of low latency is particularly relevant for computer vision applications and, thus, will be a focus. As in the role of AI section (Section III-E2), this section will also particularly highlight deep learning, however with a focus on embedded deep learning as this has not already been discussed. a) Lower latency: As discussed in Section III-A3, UAVs employing traditional cloud AI can expect a significantly long transmission latency associated with sending and receiving data between the UAV and a central cloud server [43]. Edge AI enables the majority of processing at the end device or a nearby edge server with a significantly shorter transmission delay compared to a remote cloud [21]. Even if there is a case as described in Section II-B where some application requires the edge server to communicate with the core cloud for the purpose of data synchronization, the transmission delay is not significant because the overall traffic load is less due to preprocessing at the edge.
Most computer vision applications from object detection to object recognition to object tracking to collision avoidance to self-navigation require low latency because if certain latency standards are not met objects will be lost/crashed into. b) Deep learning: According to Van Beeck et al. [102], in the "UAVision2020" workshop which focused on realtime image processing onboard UAVs, all accepted workshop papers (covering a wide range of different applications) used deep learning. Castellano et al. [108] and Zhao et al. [109] were presented as good examples of this use of deep learning where both described the use of CNNs for crowd counting or understanding. Other examples given include Stadler et al. [110] and Zhang et al. [111] that used deep learning for object tracking and Peralta et al. [112] that used deep learning for 3-D reconstruction [102]. More recent examples include Onishi and Ise [113] which used a CNN approach to construct a tree identification and mapping system using UAV RGB images and Kung et al. [114] which proposed a CNN model for image-based automated detection of building defects (e.g., cracks).
F. Communication 1) Introduction: As a result of recent progress in UAV technology, UAVs (from small commercial drones to small aircrafts to balloons) have been able to be deployed for a diverse range of wireless communication purposes [115]. While acknowledging the multiple roles UAVs can have in wireless networks, Mozaffari et al. [115] singled out the following UAV communication related applications: as aerial BSs, as user equipment in cellular networks, as mobile relays in flying ad-hoc networks, in wireless backhauling and in smart cities. Such applications require various communication links, which can broadly be classified into two categories: 1) airto-ground (A2G) communications and 2) air-to-air (A2A) communications [116]. To classify in more detail, an extra aspect of air-to-space (i.e., UAV-satellite) should also be considered [117]. Additionally, the air layer can be subdivided into a HAP (high-altitude platform) layer and LAP (low-altitude platform) layer such that HAP-layer UAVs can fly at altitudes above 17 km and LAP-layer UAVs fly at altitudes between tens of meters and a few kilometers. HAP-layer UAVs provide wider coverage and have longer endurance than LAP-layer UAVs but are less flexible [115], [117]. Fig. 8 depicts an example of the layer configuration of a UAV Space-Air-Ground network.
This section will further discuss this technical challenge for "A2G Communication" and "A2A Communication" which are the two main communication links. Finally, the section "UAV-to-server task offloading" is presented to highlight  can be expected in most scenarios, there is possibility of blockage between UAV and ground terminals due to obstacles (such as terrain, buildings or the frame of the UAV itself) [118]. Since wireless signal propagation is affected by the medium between a transmitter and receiver, this is problematic for UAV A2G communication [115]. Fig. 9 shows a typical UAV A2G propagation scenario.
The creation of channel models to represent such A2G links is challenging as many factors need to be considered, such as a UAV's movement/vibration, changes in the UAVs altitude, type of UAV, type of propagation environment, antenna movements and shadowing caused by the UAVs own frame, to name a few [115]. While just free-space path-loss methods might suffice if A2G links were only composed of LoS components, to account for Non-LoS (NLoS) components more complex approaches are required [119]. Two popular approaches are the probabilistic path-loss model and the stochastic Rician fading model [115], [118]. Many works that adopt the probabilistic path-loss model consider LoS paths and NLos paths separately with different occurrence probabilities. These occurrence probabilities are determined by the angle of elevation between the UAV and ground device, building heights/densities and the environment itself [115]. The stochastic Rician fading model is composed of a deterministic LoS component and a random scattered (with statistical distributions) component. The Rician factors of channels between a UAV and ground can vary widely and depend on the frequency used and the ground terminal's surrounding environment [118].
b) A2A communication: According to Hentati and Fourati [120], multi-UAV communication systems need to be based on both UAV-to-infrastructure and UAV-to-UAV communications as architectures based solely on infrastructure communication restrict multi-UAV system capabilities. This UAV-to-UAV communication in multi-UAV systems is the most prominent area of application for A2A communication in UAV systems. Regarding how such multi-UAV systems are configured, Fig. 10 shows the common topologies (a star, multistar, mesh, and hierarchical mesh topologies).
Regarding the UAV-UAV channel characteristics, the UAV-UAV channels are mostly dominated by the LoS component and even though there can exist limited multipath fading (because of ground reflections), it has minimal impact relative to what is experienced by UAV-ground or ground-ground channels [118]. With this said, A2A channels are characterized to exhibit a large Doppler shift as a result of high UAV speeds, short coherence time and intercarrier interference (ICI) [116].
c) UAV-to-server task offloading: Despite current advances, UAVs still face challenges in performing tasks that are computationally intensive because of a UAV's limited processing power and battery lifetime [121]. While UAV applications sometimes employ the traditional cloud computing model for more processing power, traditional cloud computing requires the transmission of huge amounts of data (over large distances) into and out of the core network, which can result in long service latency and traffic congestion [122]. By reducing the distance to the servers doing the heavy processing, edge computing can improve latency and reduce the probability of traffic congestion. Finally, as a result of the fact the edge servers can be on the ground or on the UAV themselves, the task offloading links can be A2G or A2A.
2) Role of AI: AI is being applied to various UAV communication applications in order to improve UAV robustness, resilience, and efficiency and its use in UAV communication systems in the upcoming decade is expected to be expanded upon. In particular, due to their significant advantages in numerous applications, researchers can be expected to employ ML, deep learning and ANNs in order to optimize UAV communication networks [123].
Challita et al. [93] used ANNs to enable UAVs to adaptively use wireless system resources and Challita et al. [124] used deep learning to reduce the interference level and transmission delay of cellular-connected UAVs. Additionally, Chen et al. [125] developed a UAV-based framework for providing service to users where the methods they propose use ML to separate user behavior into multiple patterns. The patterns are learned and significant performance gains can be observed [126].
Finally, AI for edge service (not AI on edge service) has some interesting benefits for UAV communication. For example, there is a new research area called edge learning that combines ML and wireless communication. It particularly looks at overcoming limited computing power and data at each edge device. Zhu et al. [127] presented a new set of design principles for edge learning wireless communication called learning-driven communication.
3) Role of Edge AI: As with the previous "Role of Edge AI" sections for the other technical challenges, the general advantages of edge computing and general additional edge AI advantages apply. The edge AI advantage that is particularly relevant to the area of communication is federated learning. a) Federated learning: As discussed in Section II-D, "federated learning" is an emerging decentralized ML technique. As opposed to gathering data in one place and training a model based on this combined data, each participating device (e.g., UAV) trains the same model using just local data. Next, these (local) model updates are sent to a server (e.g., edge server) in order to generate an updated shared global model. Finally, the updated shared global model is sent back to the devices (e.g., UAVs) and the process is repeated until an optimal (or at least near optimal) model is reached [34].
The ability of federated learning to avoid the sending of raw data off-device (just local model updates need to be sent), results in not only privacy advantages but also reduces latency and network overhead [62]. This is key in the context of UAV communication where large latency and large network overheads can result in UAV crashes.
Finally, it should be noted that there is still much work to be done in the area of UAV federated learning. There are certain shortcomings of federated learning such as multidevice systems being vulnerable to membership inference attacks when the adversary is a participant [128].

IV. UAV APPLICATIONS
UAVs have several diverse applications to which edge AI is important. While highlighting how edge AI helps, this section will discuss some of the key UAV-based IoT applications: delivery systems, civil infrastructure inspection, precision agriculture, SAR operations, acting as aerial wireless BSs, and drone light shows.  of key UAV-based IoT applications where payload communication refers to mission-related data being transmitted and/or received from UAVs (e.g., aerial images, highspeed video, and data packets for relaying to/from ground entities) [129].
A. Delivery Systems 1) Introduction: Particularly due to UAVs, the delivery systems of online goods are becoming increasingly practical, effective and efficient [144] with Google's Project Wing and Amazon Prime Air demonstrating this trend well. It is not just commercial package deliveries where delivery applications have been explored, the delivery of medical supplies is a common use of UAVs. Examples include deliveries of defibrillators to treat people that have cardiac arrests not close to hospitals and deliveries of vaccines and blood [132]. Additionally, UAV deliveries have a lower cost per unit to operate while emitting less CO 2 than truck deliveries. They are also considerably better at dealing with poor road infrastructure.
2) How Edge AI Helps: UAV delivery systems require all the technical challenges discussed in Section III (autonomous navigation, formation control, power management, security and privacy, computer vision, and communication) to be addressed such that all the Role of Edge AI sections in Section III apply here.
Autonomous navigation (Section III-A) is the technical challenge that most applies as it is vital for large-scale delivery missions that UAVs are able to autonomously fly without knowing the objects they may encounter [11]. All three discussed challenges of autonomous navigation: 1) localization and mapping (Section III-A1a); 2) path planning (Section III-A1b); and 3) collision-avoidance systems (Section III-A1c) require the use of AI. Edge AI as opposed to AI under the traditional cloud computing model is especially key, particularly due to the lower latency and improved reliability it offers.
Regarding low latency, in contrast to AI under the traditional cloud computing model that can involve a significantly long transmission delay when sending and receiving data between the UAV and central cloud server, edge AI allows for the majority of processing to take place at the end device or a nearby edge server, resulting in significantly shorter transmission latency. Additionally, even if communication with the central cloud is required, the preprocessing at the edge that edge AI enables reduces the overall traffic load and thereby transmission delay. In delivery systems, where UAVs may have to travel large distances between destinations, avoiding objects/obstacles is a key requirement. The low latency edge AI offers can be a necessity, especially when avoiding nonstatic on-coming objects moving toward the UAV where the latency offered by AI under the traditional cloud computing model may not suffice, resulting in a crash. A crash incurs short and long-term financial implications (such as cost associated with fixing/replacing the UAV, reimbursing customers for loss of package and loss of future work due to reputation damage) or worse (e.g., injury to member/members of the public). Finally, with regard to latency, delivery systems may be required to deliver to areas where GPS access cannot be guaranteed. In such scenarios, vision methods need to be employed to replace the need for GPS and fast processing becomes particularly relevant. Recently, some drones have even made deliveries without any GPS reliance.
Regarding improved reliability, AI under the traditional cloud computing model can be reliant on the central cloud server to be reliable such that if it is unreachable/goes down there is potential for disastrous consequences. Edge servers employed when using edge AI, in contrast, are located near/at the users such that there is a significantly reduced chance of network outage. Additionally, even if an edge server goes down, another server should be able to provide a service and even if this is not possible the UAV can handle a lot of requests on its own using locally stored portions of data that are still accessible [41]. In delivery systems, if purely AI under the traditional cloud computing model is employed and the central cloud server goes down/becomes unreachable, a crash is a likely consequence, resulting in financial or worse implications. Hence, the importance of the higher reliability offered by edge computing and edge AI.
Other edge AI benefits that are relevant to delivery systems are as follows.
1) Reduced Energy Consumption: In delivery systems, a UAV's limited battery is often a limitation so being able to reduce energy consumption (get more out of limited power) is important. Edge AI both reduces the amount of data that needs to be sent to servers by preprocessing ondevice and reduces the distance the data has to be sent by sending to edge servers as opposed to more remote cloud servers. This reduced sent data size and distance not only reduces cost but reduces the significant energy consumption associated with the data transfer to the central cloud [45]. Additionally, as discussed in Section II-D, edge AI chips can further reduce energy consumption through their hardware design and "smartness" [38]. 2) Improved Security: Package theft from truck/van delivery is a key issue for delivery companies. In 2016, a survey by August Home indicated that there was roughly 11 million victims of package theft in the United States [145]. Given such numbers, it is reasonable to assume that as UAV deliveries become more common, they will become more of an object of attack for people wanting to steel packages. UAVs being attacked for the packages is not the only reason to expect attacks on UAVs as the UAVs themselves could become popular objects to hack/steal/control. Due to the number and ease of access to hackers of delivery UAVs (compared to applications, such as civil infrastructure inspection, precision agriculture, and SAR), drone delivery systems need a high level of security. Edge AI can aid in the security of a UAV system by distributing data processing across multiple devices/servers such that a single attack (e.g., DDoS attack) is less likely to cause significant disruption (which is often the case when using AI under the traditional computing model where all data travels to the central server) [41]. It should be noted that this distribution of data processing has the tradeoff of an increase in potential attack surface. There are other advantages of edge computing and edge AI, however, such as less data being sent and, therefore, intercepted due to preprocessing at the edge [42] and edge AI's ability to close off vulnerable parts when being attacked compared to how AI under a traditional cloud computing model often needs the closing down of the whole network [95]. 3) Improved Privacy: Perhaps, the largest concern of people regarding drone delivery is the potential for invasion of privacy. While drone delivery companies will try to minimize the flying over of people's houses and gardens, it is inevitable that drone cameras will fly in view of private areas (such as people's back gardens). Under a traditional cloud computing model, images of people/areas that violate privacy are sent and stored to/at a remote centralized cloud server. With edge computing and edge AI, in contrast, techniques such as federated learning can avoid any raw data leaving devices.
B. Civil Infrastructure Inspection 1) Introduction: Civil infrastructure, such as buildings, bridges, and pipelines need to be maintained. Before this can happen, and to know where and when this is necessary, inspection of the infrastructures need to be conducted. This can be cumbersome, costly, and time consuming. UAVs are very helpful for this, so much so that construction and infrastructure inspection applications take up about 45% of the total UAV market according to Shakhatreh et al. [11]. As this statistic indicates, there are multiple applications of UAVs with regard to civil infrastructure inspection. Arguably the two largest areas of inspection in this context are damage detection and structural component recognition. Damage detection refers to the detection of visual defects, such as steel corrosion, concrete cracks/delimitation, asphalt cracks, or fatigue cracks, and structural component recognition refers to the process of detecting and classifying different structure characteristics [133].
2) How Edge AI Helps: As with UAV delivery systems, UAV civil infrastructure inspection requires all the technical challenges discussed in Section III to be addressed such that all the Role of Edge AI sections in Section III apply here.
The field of computer vision is especially vital and, therefore, the technical challenge computer vision is particularly relevant. Whether or not the computer vision processing is performed at the edge or not is not as important as with other applications, such as delivery systems or SAR, where the cost of the reduced speed/reliability can be more disastrous (e.g., crash). Additionally, algorithms can be more limited when restricted to embedded processing (due to limited computational onboard power) and may require that architectures are specifically designed [102]. With this said, the quicker and more reliable civil infrastructure inspection that edge AI/computing allows for is preferable. Deep learning-based damage detection and deep learning-based structural component recognition are examples that heavily employ computer vision. Such tasks can be achieved at a remote central server, at edge servers or onboard UAVs.
The other technical challenges of particular relevance are power management and formation control. Regarding power management, performing AI processing at the edge reduces energy consumption. This is due to edge AI enabling preprocessing at the edge which results in less data needing to be sent to the remote cloud and, therefore, causing significantly less energy consumption associated with data transfer. Civil infrastructure inspection can be time consuming and this reduced energy consumption can allow for longer inspections before the need to recharge. Regarding formation control, Shakhatreh et al. [11] suggested a possible future direction for research on construction and infrastructure inspection (similar to civil infrastructure inspection) as looking into more advanced data collection, processing, and sharing algorithms for multi-UAV cooperation. Edge AI can help in the development of such algorithms by making them: 1) Faster: the shorter distance to edge servers versus to a central server and the lower amount of data sent from the UAVs (due the preprocessing at the edge) marks an improvement in latency of edge AI compared to AI under a traditional cloud computing model; 2) Lower Cost: edge AI can reduce the cost by reducing the amount of data that needs to sent (by preprocessing at the edge) as there is a cloud side computation cost that can be significant when dealing with large volumes of data [45].
C. Precision Agriculture 1) Introduction: Precision agriculture describes a set of technologies within agricultural systems that combines sensors, information systems, informed management, and enhanced machinery to optimize production by taking variability and uncertainties into account [146] (i.e., a concept in farm management where the variability and uncertainties associated with crops are observed, measured, and responded to such that returns are optimized). A UAV's ability to acquire imagery in a fast, easy, and low-cost manner makes them very useful in precision agriculture. Additionally, as a result of a UAV's ability to fly close to the crops without significantly disturbing them, the imagery has "ultrahigh spacial resolution" in the order of a few centimeters [147]. According to Tsouros et al. [147], the most common UAV precision agriculture applications in the literature are: "weed mapping and management," "vegetation growth monitoring and yield estimation," "vegetation health monitoring and disease detection," "irrigation management," and "crop spraying." 2) How Edge AI Helps: As with the previous UAV applications, UAV precision agriculture requires all the technical challenges discussed in Section III to be addressed such that all the Role of Edge AI sections in Section III apply here. Similar to civil infrastructure inspection, the technical challenges of computer vision, power management, and formation control are particularly relevant.
In precision agriculture, like civil infrastructure inspection, the technical challenge computer vision is particularly relevant. Also like civil infrastructure inspection, whether or not the computer vision processing is performed at the edge or not is not as important as in applications, such as delivery systems or SAR. With this said, edge processing can imply faster completion of the precision agriculture task (e.g., faster weed mapping) and lower energy consumption as well as multi-UAV advantages (discussed in next paragraphs). As with civil infrastructure inspection, deep learning methods are important and can be processed at a remote central server, at edge servers or onboard UAVs (embedded) and if embedded processing is chosen it may require architectures to be specifically designed for processing on the UAV due to a UAV's limited computational onboard power [102].
Similar to previous UAV applications, Edge AI can help in the development of such MASs by reducing E2E latency, operations cost and power utilization.

D. Search and Rescue Operations
1) Introduction: SAR operations are a subset of public safety operations that revolve around the finding of missing people. Usually such operations are carried out by public entities (e.g., fire department), however private SAR teams also exist [148].
There are many use cases of UAVs in SAR operations. UAVs can survey a certain area by flying over it and taking high resolution images and videos. This information can then be used by rescue teams to plan the SAR operation. UAVs can also do more than just survey the area, they can identify and pin point the location of lost persons using, for example, object detection algorithms with RGB camera images. For extreme cases, such as in the event of a snow avalanche, specialized technology such as thermal infrared imaging and geographic information system (GIS) data can be used [149]. Additionally, UAVs can deliver medicine, food, and water to isolated people as well as act as a substitute for communication infrastructures that have been rendered useless.
While it has to be conceded that planes, helicopters, and even some ground-based vehicles can be used for the same use cases, UAVs are able to do so at a lower cost and lower risk to human life. Also, particularly for shorter distances, the speed at which UAVs can identify a person in trouble (from time of launch) can be the difference between a life being saved or not. Finally, it should be noted that UAVs can conduct SAR operation on their own (single UAV system) or as part of a group (Multi-UAV system) [11].
2) How Edge AI Helps: As with the previous UAV applications, UAV SAR operations require all the technical challenges discussed in Section III to be addressed. The technical challenges of computer vision and power management are particularly relevant to UAV SAR operations.
Computer vision is vital for SAR operations in both the navigation required to get to the target location and the actual finding of the target (e.g., a person). While admittedly, the image processing in SAR operations can be done at either a GCS (post target identification) or onboard the UAV [11], the lower latency of embedded computer vision processing (onboard the UAV) is important when someone's life may be at risk. As embedded processing is a form of edge processing, the embedded computer vision processing algorithms (such as embedded deep learning algorithms for target identification and classification) are applications of edge AI.
Regarding power management, in some SAR operations, UAVs can be required to operate for large amounts of time and the length of a UAVs exploration can be constrained by its limited battery life [150]. Edge AI both reduces the amount of data that needs to be sent from UAVs to servers by preprocessing at the edge and reduces the distance the data has to be sent by sending to edge servers as opposed to more remote cloud servers. This significantly reduces the energy consumption associated with data transfer [45]. Additionally, as discussed in Section II-D, edge AI chips can further reduce energy consumption through their hardware design and smartness [38]. All this energy saved can increase a UAVs time-of-flight, allowing for longer searches.

E. Acting as Aerial Wireless BSs 1) Introduction:
The miniaturization of BS electronics along with the consistent improvement in performance and reduction in cost of UAVs have made it feasible to deploy aerial wireless BSs using UAVs. Compared to existing ground-based solutions, UAV BSs have the ability to provide improved: coverage, spectral efficiency, load balancing, and user experience [89]. There are many use cases of UAVs acting as aerial wireless BSs, Shakhatreh et al. [11] summarized the typical ones as: "UAVs for ubiquitous coverage," "UAVs as network gateways," "UAVs as relay nodes," "UAVs for data collection," and "UAVs for worldwide coverage." 2) How Edge AI Helps: As with the previous UAV applications, UAV aerial wireless BSs require all the technical challenges discussed in Section III to be addressed such that all the Role of Edge AI sections in Section III apply here. Power management and communication, however, are the technical challenges that most apply to UAVs acting as aerial BSs.
According to Kishk et al. [141], one of the main challenges facing the deployment of aerial BSs is the limited energy and thereby flight time of UAVs. This is problematic as it means that UAVs have to frequently visit the ground station for recharging which can cause that UAV's coverage area to be temporarily unavailable [141]. Edge AI both reduces the amount of data that needs to be sent from UAVs to servers by preprocessing at the edge and reduces the distance the data has to be sent by sending to edge servers as opposed to more remote cloud servers. This significantly reduces the energy consumption associated with data transfer [45]. This energy saved, along with the energy saved by the hardware design and smartness of edge AI chips (see Section II-D) [38], can increase a UAVs time of flight and reduce the amount of time a UAV has to recharge and, therefore, reduces the potential times various coverage areas may be temporarily unavailable.
Given the need for UAVs acting as wireless BSs to provide connectivity, communication is key. A major way edge AI helps UAVs acting as aerial wireless BSs in the context of communication is by improving the latency associated with sending and receiving data. By allowing preprocessing onboard the UAV itself, the overall traffic load and data transmission latencies are reduced. This can be important with potentially high amounts of data being sent and received from UAVs when they are acting as aerial wireless BSs.
F. Drone Light Shows 1) Introduction: A "drone light show," sometimes referred to as a "drone display," is a group of multiple synchronized drones (UAVs) that are programmed to fly in a coordinated direction to create a public display in the air. The UAVs used are normally quadcopters equipped with LEDs that look particularly impressive at night [151]. The amount of drones used in such displays can range from small fleets of 50 to the recent Guinness world record of 3051 used in a light show in Guangdong, China, September 2020 [152].
An obvious competitor of drone light shows are firework displays. While there has been success in using drone light shows to complement firework displays, it is reasonable to expect drone light shows to replace many occasions where firework displays would otherwise be chosen. Drone light shows have a far greater range of effects and more capacity to perform complicated choreography, resulting in a better story telling experience. Additionally, fireworks have a greater environmental impact due to their noise, wastefulness, pollution, and possibility of starting wildfires.
A few reasons why drone light shows are not as common as one might expect include high cost (e.g., due to man hours, equipment, insurance, etc.), need for approval and safety [153]  and reliability concerns (if there is a failure in the show it is likely to be obvious to big crowds). Such limitations are being worked on by researchers and industry [154].
2) How Edge AI Helps: As with previous UAV applications, drone light shows require all the technical challenges discussed in Section III to be addressed such that the Role of Edge AI sections in Section III have relevance. With this said, as UAVs in drone light shows generally communicate directly with a GCS [153], edge AI helps in a more limited capacity relative to the other applications discussed. Perhaps, how edge AI can help drone light shows the most is by making them more reliable and safe through edge AI algorithms embedded on the UAV being able to deal with unexpected situations more quickly than AI processed under the traditional cloud computing model. For example, being able to avoid objects on collision course with the UAVs more quickly than if this detection and avoidance was not computed onboard.

V. EDGE AI IMPLEMENTATION CHALLENGES FOR UAVS
While edge AI has multiple important applications to UAVs, implementing edge AI on UAVs is not straightforward. This section will discuss several key challenges for implementing edge AI on UAVs: developing distributed training algorithms, security and privacy, resource allocation, and realtime requirements. Table VI summarizes these implementation challenges.
A. Developing Distributed Training Algorithms 1) Introduction to Challenge: "Distributed Training Algorithms" describe algorithms where the training takes place across multiple processors. It is sometimes the case that models are trained at a centralized cloud then downloaded for inference at the edge. However, in most cases where privacy is important and where there is a need for applications to be "mission-critical," distributed training algorithms are required.
As a result of UAV on-device constraints (e.g., privacy, limited battery capacity and limited storage capacity) distributed algorithm designs need to be privacy sensitive, energy efficient, low capacity, and not overly complex. Additionally, in order to make distributed algorithms more reliable and robust when not much data are available, UAVs may have to exchange model parameters, inferred outputs, or raw data with a central server or amongst each other [12].
2) Possible Solutions: a) Given the limited power and memory of UAVs, data and model parallelization techniques can be useful. For example, data can be split into multiple batches and then processed on edge servers or large models can be divided amongst multiple UAVs and then sequentially trained or trained in parallel. Model training techniques, such as federated learning, knowledge distillation, and transfer learning methods can be used. b) Wireless network uplink-downlink channel capacity asymmetry can be taken advantage of by jointly adopting federated learning and knowledge distillation to improve distributed training algorithm communication efficiency. c) Differential privacy, mean-field control theory, and ratedistortion theory tools can be used to reduce distributed algorithm latency [12].

3) Remaining Research Questions:
a) How can accelerators change the way distributed algorithms and ML design are approached? b) How to balance the energy needed to perform computation for different scenarios on the edge? c) How to carry out distributed training, inference and control that is communications-efficient and scalable?
B. Security and Privacy 1) Introduction to Challenge: As discussed in Section III-D, UAVs offer a unique variety of agile access techniques compared to other privacy-infiltrating devices (that makes them attractive for criminals) whilst also being vulnerable to attacks that target wireless links, cyber elements, physical elements, and interfaces between cyber and physical elements [90]. Additionally, UAVs generate lots of data at the network edge and directly sharing original data sets between many edge nodes has a high risk associated with it [8]. According to Peltonen et al. [12], key challenges of security and privacy with regard to 6G edge AI are as follows.
1) Guaranteeing the implementation of security and privacy strategies according to user and system requirements. 2) Guaranteeing the recognition of abnormal behavior according to user requirements and operator criteria. 2) Possible Solutions: a) A possible solution to guaranteeing the implementation of security and privacy strategies according to user needs and system requirements, with respect to UAV edge AI, is to design standard deployment interfaces or languages for varying UAV systems [11]. b) A possible solution to guaranteeing the recognition of abnormal behavior according to user requirements and operator criteria, with respect to UAV edge AI, is further exploring the use of edge AI to learn normal network traffic patterns such that malware, attack signatures, and other malicious activity can be detected. c) Lightweight and distributed security mechanism designs can be designed to establish user authentication and access control, model/data integrity, and mutual platform verification [8]. d) The use of federated learning, blockchain, or the integration of both (e.g., [37]) can further improve security/privacy.

3) Remaining Research Questions:
a) How to integrate more homomorphic encryption (e.g., Liu et al. [161] integrated homomorphic encryption with federated learning for privacy protection). Homomorphic encryption allows direct computation on ciphertexts where after decryption the result is the same as the result obtained from computation on the unencrypted data. By employing homomorphic encryption, training/inferencing can be directly executed on encrypted data [15]. b) How to prevent ML model tempering attacks? c) How to ensure large-scale data provenance? d) How to satisfy the privacy concerns of users and regulatory bodies [12]?
C. Resource Allocation 1) Introduction to Challenge: Resource allocation can be split into local resource allocation and global resource allocation. Local resource allocation regards taking the availability, connectivity and efficiency of dedicated devices into account so that their service, data storage and latency can be improved. Global resource allocation regards accounting for the amount of participating nodes and the resource distribution between those nodes so that efficiency, power saving, and energy consumption rate can be improved. In the case of UAV systems, these nodes are the cloud server, are part of the edge network or are the UAVs themselves [14].
2) Possible Solutions: a) Improve optimization techniques for addressing the cost and performance tradeoff associated with the amount of edge servers being deployed [162]. b) Where UAVs act as BSs themselves, improve optimization techniques (to maximize network throughput) for the 3-D placement of UAVs [163].

3) Remaining Research Questions:
a) How to improve interference management techniques between UAV BSs and terrestrial BSs [163]. b) Due to the fact UAVs can be service providers yet also act as aerial users, future networks should be aerialground integrated such that computation resources are distributed across both aerial and ground nodes. It is important to investigate how best to match the timevarying and spatial-varying communication and computation demands with distributed supplies in these networks [35].

D. Real-Time Requirements
1) Introduction to Challenge: UAVs often need feedback to be "real time" such as when performing collision avoidance on objects approaching the UAV or when tracking fast-moving cars. While the low latency and high network bandwidth of current solutions to UAV challenges/applications can sometimes suffice, for some challenges/applications, the amount of time needed to gather model data, train models, and determine actions is too much.
2) Possible Solutions: a) Reduce retraining latency using transfer learning frameworks and/or knowledge distillation frameworks. b) Increase the speed of inference through reducing AI models with model pruning and knowledge distillation. c) RL and the co-design of ML, communication, and control can aid data and network dynamics.

3) Remaining Research Questions:
a) How to model train along with the network in a quick and adaptive manner? b) How to reduce inference processing complexity? c) How to efficiently distribute and reutilize models throughout their lifecycle [12]? d) How to adjust the members of a UAV swarm/cluster in real time to most effectively serve the environment/user needs [6]?
VI. EDGE AI FOR UAVS LESSONS LEARNED AND FUTURE DIRECTIONS This section will discuss the lessons learned in the application of edge AI with UAVs and the future directions of this area.
A. Technical Challenges 1) Lessons Learned: UAV technical challenges (from autonomous navigation to formation control to power management to security and privacy to computer vision to communication) can greatly benefit from the use of edge AI. Many of the edge AI benefits of note are common with edge computing (relative to traditional cloud computing) benefits (such as lower latency, improved reliability, and reduced energy consumption). Additional benefits of edge AI beyond edge computing benefits (such as the privacy advantages of federated learning) are also considerable.
Edge AI demonstrates a significantly shorter transmission delay and lower latency relative to AI under the traditional cloud computing model due to processing at/closer to the end device [21]. This reduced latency has benefits to all technical challenges but particularly to the technical challenges of autonomous navigation and computer vision. Edge AI can also make a UAV system more reliable by computing on-device or at edge servers near the users. If an edge server becomes unreachable, edge AI can allow for another edge server to provide the service the unreachable server would otherwise be providing. This increased reliability is particularly relevant for the technical challenge autonomous navigation.
Also, the reduced data size sent to remote cloud due to edge AI's preprocessing helps with regard to operational cost as there is a cloud-side computation cost that can be significant when dealing with large volumes of data [45]. This is particularly relevant to formation control. This same reduced sent data size reduces energy consumption as there is significant energy consumption associated with data transfer to the remote cloud. This is particularly relevant to the technical challenge of power management.
Edge AI also has benefits to the technical challenge of security and privacy, seen through its improved security and privacy relative to AI under the traditional cloud computing model. First, edge AI implies the distribution of data processing across multiple devices/servers such that it is less vulnerable relative to when AI under the traditional cloud computing model is employed where one attack such as a DDoS attack can cause significant disruption [41]. The fact edge processing reduces the amount of data sent also means less data can be intercepted [42]. Additionally, the distributed and scattered nature of edge computing means an edge AI system's vulnerable parts are easier to close off compared to a traditional cloud AI system where the closing down of the whole network is often required [95]. Also, edge AI allows for federated learning and blockchain which can improve security and privacy. For example, blockchain can encrypt data within the blockchain such that it is only accessible to someone with a decryption key [34], [96].
The final technical challenge to discuss is communication, to which federated learning can be particularly relevant. Federated learning allows UAVs to perform ML tasks without relying on the sending of raw data off-device [88]. This results in reduced latency and network overhead [62].
Finally, while edge AI has numerous advantages to UAV technical challenges, disadvantages need to be considered. For example, the following needs to be considered when employing edge AI: fewer network devices in certain places (resulting in a worse service), few skilled people to implement, fix or manage such devices in remote places [70] and the challenge of task offloading between different edge servers [71]. Additionally, while the distribution of data processing has advantages (e.g., the impact of a successful attack being diminished), it also increases the potential attack surface.
2) Future Directions: In the coming years/decades, UAVs will continue to grow in popularity (the drone market size is expected to grow with a 57.5% compound annual growth rate from 2021 to 2028 [164]). Existing uses of edge AI for various UAV technical challenges will continue to be developed and new uses of edge AI for solving various UAV technical challenges will be proposed. Areas of autonomous navigation that need more research include advanced multi-UAV algorithms for data collection/sharing/processing, the autonomous navigation of UAVs through congested/indoor environments without GPS reliance, and algorithms for flight route determination, path planning, and collision avoidance [11]. Areas of formation control that need more research include swarm algorithms with data (e.g., from location/weather sensors and RADAR/LIDAR) fusion capabilities and hybrid formation control approaches that can combine traditional approaches (e.g., leader-follower, artificial potential, behavior based) based on certain mission requirements [11], [165]. Areas of power management that need more research include the efficient use of existing energy resources [123], charging station landing spot identification, the incorporation and development of UAV solar-powered battery components, wireless charging techniques, and long mission (e.g., delivery) battery scheduling [11].
Areas of security and privacy that need more research include the standard deployment of interfaces/languages for a range of UAV systems such that countermeasures can be applied to different UAV systems with little difficulty, simulation tools/emulators for UAV security analysis (currently, the number of software/hardware configurations and the number of attack scenarios is a limitation of such simulation tools/emulators) [11], and UAV encryption techniques to combat communication channel hijacking [123]. Areas of computer vision that need more research include accounting for shadows and other forms of varying patterns of light/shade in images [11], presenting of databases for existing applications, and developing of databases for new applications [166].
Finally, areas of the technical challenge communication that need more research include UAV-mmWave technology challenges (such as blockage, fast beamforming training and tracking, and rapid channel variation) [11], the affect that computation offloading has on flight accuracy [167], general ensuring robust, stable and reliable UAV communication and high altitude UAV channel characteristic enhancement [123].
B. UAV Applications 1) Lessons Learned: UAV-based IoT applications (delivery systems, civil infrastructure inspection, precision agriculture, SAR operations, acting as aerial wireless BSs, drone light shows, and others) can also greatly benefit from the use of edge AI. Like with the UAV technical challenges, many of the edge AI benefits to UAV applications of note are common with edge computing (relative to traditional cloud computing) benefits, such as lower latency, improved reliability, and reduced energy consumption. Additional benefits of edge AI beyond edge computing benefits (e.g., additional improvement to energy consumption) are also considerable.
Computer vision tasks can be achieved at a remote central server, at edge servers or onboard UAVs, however, they can be more limited when restricted to embedded processing (due to limited computational onboard power) and may require that architectures are specifically designed [102]. With this said, embedded processing has speed/reliability advantages. Such advantages can aid in applications, such as civil infrastructure inspection, precision agriculture, delivery systems, and SAR operations.
The low latency edge AI offers due preprocessing at the edge (on-device or at edge server) and the fact data are not required to be sent/received to/from a remote cloud is particularly important in SAR operations, where speed can be vital for the saving of lives. Edge AI's reliability is seen when compared to AI under the traditional cloud computing model. In delivery systems and SAR operations, if purely AI under the traditional cloud computing model is employed and the central cloud server goes down/becomes unreachable, a crash is a likely consequence. Edge servers employed when using edge AI, in contrast, are located near/at the users such that there is a significantly reduced chance of network outage and even if an edge server goes down, another server should be able to provide a service or if this is not possible the UAV can handle a lot of requests on its own using locally stored portions of data [41].
Edge AI also reduces energy consumption due to edge AI enabling preprocessing at the edge which results in less data needing to be sent to the remote cloud and, therefore, causing significantly less energy consumption associated with data transfer. This reduced energy consumption can allow for longer inspections/coverage/searching before the need to recharge for applications such as: civil infrastructure inspection, precision agriculture, acting as aerial wireless BSs, and SAR operations.
Finally, edge AI aids drone light shows in a more limited capacity relative to other applications because UAVs in such shows generally communicate directly with a GCS [153]. With this said, the use of edge AI has potential in making drone light shows more reliable and safe due to superior latency relative to cloud-based AI.
2) Future Directions: With strong interest in edge AI and a growing UAV market, the uses of edge AI for UAV-based IoT applications will continue to grow and develop. Some existing UAV-based IoT applications where edge AI has found use cases (discussed in detail in Section IV) are: delivery systems, civil infrastructure inspection, precision agriculture, SAR operations, acting as aerial wireless BSs, and drone light shows. Areas of the application delivery systems that need more research include how systems respond to failures and the coordination of many UAVs simultaneously flying in the same airspace operated by different operators such that there can be thousands of UAVs flying in the air that may require the use of the same resources (e.g., charging stations) and operating frequencies. Areas of the application civil infrastructure inspection that need more research include efficiently dealing with image processing problems (such as changing image orientations, changing image scales, and too much image overlap), the creation and development of accurate and autonomous real-time UAV power line inspection techniques (such as techniques that use ultrasonic sensors or TIR cameras) and multi-UAV cooperation for infrastructure inspection (for, amongst other reasons, a wider scope of inspection and faster completion times).
Areas of the precision agriculture application that need more research include dealing with reflectance from soil surfaces at early stages of crop growth that affects temperature measurements taken from aerial sensors, dealing with a heavy payload (e.g., multiple sensors, high-resolution cameras and thermal cameras) and the use of next generation UAV sensors (e.g., 3p sensors are able to provide in-field analytics and embedded image processing such that farmers can get realtime insights without cloud or cellular connections). Areas of the SAR operations application that need more research include avoiding UAV mission failure (or significant slowing down of mission) due to weather conditions (e.g., bad weather conditions such as strong winds can cause deviations in UAV predetermined paths), power-efficient distributed algorithms for processing of UAV swarm captured video/sensing data and more accurate localization and mapping algorithms/systems (e.g., multisensor data fusion algorithms for localization and mapping that are more precise and do not have coverage disruption problems).
Areas of the application acting as aerial wireless BSs that need more research include the use of UAVs for indoor wireless coverage problems (80% of mobile Internet access traffic happens indoors and most research focuses on outdoor uses cases), aerial BSs that can learn various ranges of user behavior characteristics, the use of UAVs in disaster scenarios to aid communication coverage (particularly when the public communications network is at maximum capacity or is disrupted) and the effective design of UAV wireless network topologies such that the topologies remain fluid through changing UAV numbers, number of channels and relative UAV placement [11]. Finally, areas of the application drone light shows that need more research include improving drone light show safety, making drone light shows more affordable, improving design tools and control technologies and evolving with various new lighting elements/effects such that drone light shows become more and more impressive [153].
C. Implementation Challenges 1) Lessons Learned: The integration of edge AI with UAVs has numerous implementation challenges, most notably challenges regarding developing distributed training algorithms, security and privacy, resource allocation and real-time requirements. Regarding the implementation challenge of "developing distributed training algorithms," cases that need to be mission-critical and secure require online distributed training algorithms where communication bottlenecks and on-device limitations are important. As a result of UAV on-device constraints (privacy, limited battery capacity, limited storage capacity, etc.), distributed algorithm designs need to be privacy sensitive, energy efficient, low capacity, and not overly complex [12]. Regarding the implementation challenges of "security and privacy," some attacks on UAV systems only happen for certain software/hardware configurations and there can be a significant amount of deployment difficulties when applying well studied countermeasures of other communication systems [11]. Moreover, it can be difficult to detect normal versus abnormal network traffic requirements.
Regarding "resource allocation," it refers to taking the availability, connectivity and efficiency of dedicated devices into account so that their service, data storage, and latency can be improved or it refers to accounting for the amount of participating nodes and the resource distribution between those nodes so that efficiency, power saving, and energy consumption rate can be improved [14]. Finally, regarding "real-time requirements," challenges include reducing retraining latency and increasing the speed of inference.
2) Future Directions: UAV and edge AI implementation challenges have multiple future directions discussed in the "Possible Solutions" and "Remaining Research Questions" subsections of Section V.

VII. CONCLUSION
As a key enabler of IoT services, UAVs have drawn great attention from both academia and industry. In this article, we comprehensively surveyed the role of edge AI for UAVs. We investigated the concepts of UAVs, edge computing, AI, and edge AI and explored several key UAV technical challenges and applications with an emphasis on the role of edge AI. Moreover, UAV edge AI implementation challenges were explored and lessons learned and future directions were discussed. Given the increasing popularity of both UAVs and edge AI, the hope is that this survey article can act as a useful resource for researchers interested in their convergence.