  We develop a comprehensive framework to characterize and optimize the
performance of a unmanned aerial vehicle (UAV)-assisted D2D network, where D2D
transmissions underlay cellular transmissions. Different from conventional
non-line-of-sight (NLoS) terrestrial transmissions, aerial transmissions are
highly likely to experience line-of-sight (LoS). As such, characterizing the
performance of mixed aerial-terrestrial networks with accurate fading models is
critical to precise network performance characterization and resource
optimization. We first characterize closed-form expressions for a variety of
performance metrics such as frame decoding error probability (referred to as
reliability), outage probability, and ergodic capacity of users. The
terrestrial and aerial transmissions may experience either LoS Rician fading or
NLoS Nakagami-m fading with a certain probability. Based on the derived
expressions, we formulate a hierarchical bi-objective
mixed-integer-nonlinear-programming (MINLP) problem to minimize the total
transmit power of all users and maximize the aggregate throughput of D2D users
subject to quality-of-service (QoS) measures (i.e., reliability and ergodic
capacity) of cellular users. We model the proposed problem as a bi-partite
one-to-many matching game. To solve this problem, we first obtain the optimal
closed-form power allocations for each D2D and cellular user on any possible
subchannel, and then incorporate them to devise efficient subchannel and power
allocation algorithms. Complexity analysis of the proposed algorithms is
presented. Numerical results verify the accuracy of our derived expressions and
reveal the significance of aerial relays compared to ground relays in
increasing the throughput of D2D pairs especially for distant D2D pairs.
