  This paper investigates from the physical layer security (PLS) perspective
the fundamental issues of mode selection and spectrum partition in cellular
networks with inband device-to-device (D2D) communication. We consider a mode
selection scheme allowing each D2D pair to probabilistically switch between the
underlay and overlay modes, and also a spectrum partition scheme where the
system spectrum is orthogonally partitioned between cellular and overlay D2D
communications. We first develop a general theoretical framework to model both
the secrecy outage/secrecy capacity performance of cellular users and
outage/capacity performance of D2D pairs, and to conduct performance
optimization to identify the optimal mode selection and spectrum partition for
secrecy capacity maximization and secrecy outage probability minimization. A
case study is then provided to demonstrate the application of our theoretical
framework for performance modeling and optimization, and also to illustrate the
impacts of mode selection and spectrum partition on the PLS performances of
inband D2D communications.
