  In this paper, we develop a distributed mechanism for spectrum sharing among
a network of unmanned aerial vehicles (UAV) and licensed terrestrial networks.
This method can provide a practical solution for situations where the UAV
network may need external spectrum when dealing with congested spectrum or need
to change its operating frequency due to security threats. Here we study a
scenario where the UAV network performs a remote sensing mission. In this
model, the UAVs are categorized into two clusters of relaying and sensing UAVs.
The relay UAVs provide a relaying service for a licensed network to obtain
spectrum access for the rest of UAVs that perform the sensing task. We develop
a distributed mechanism in which the UAVs locally decide whether they need to
participate in relaying or sensing considering the fact that communications
among UAVs may not be feasible or reliable. The UAVs learn the optimal task
allocation using a distributed reinforcement learning algorithm. Convergence of
the algorithm is discussed and simulation results are presented for different
scenarios to verify the convergence.
