



\subsection{System Model}
Fig.~\ref{fig:system} illustrates the scenario considered in this work. A cluster of mobile ground users communicates with a BS
in the presence of terrestrial
eavesdroppers. 
The active users in the cluster
are randomly distributed.
The UAV is positioned to support the users
by relaying their
data streams.
Without loss of generality, in this paper we model and analyze the uplink (UL) channel. The same principles can be applied for the DL.

The set of $M$ users in the cluster
and the set of $K$ eavesdroppers are denoted as $V=\{V_i|i=1,2,...,M\}$ and $E=\{{E}_{j}|j=1,2,...K\}$, respectively.
We define the location of
the UAV relay, the eavesdropper, and the $i$th user in the 3D Cartesian coordinate system as
($x_u,y_u,z_u$) , ($x_j,y_j,z_j$), and ($x_i,y_i,z_i$), respectively.
For practicality,
time slots are used to capture the different radio frames and statistical channel conditions, as well as the momentarily static position of the UAV, users, and eavesdroppers in a mobile setting.
Therefore, the UAV coordinates in time slot $n$ will be expressed as ($x_u[n], y_u[n], z_u[n]$).    

\vspace{-3mm}
\subsection{Communications Channel} The received signal at the UAV when ground user $V_i$ transmits signal $s_i$ with power $P_i$ is defined as
\vspace{-1 mm}
\begin{equation}
    {r _{u}} = \sqrt{P_i{g}_{iu}}s_i+n_i,

\end{equation}
where ${g}_{iu}$ is the air-to-ground (A2G) channel power gain between user $V_i$ and the UAV, and $n_i$ denotes the
additive white Gaussian noise (AWGN) of zero mean and $\sigma^2$ variance.
Measurements have shown that the LoS channel model is a good approximation in rural areas above 80 m~\cite{sky}.
The channel gain
has
a path loss exponent of two and can be written as
\vspace{-1 mm}
\begin{equation}
\small
\begin{aligned}
    {g}_{iu}[n] &=\beta_{0}d^{-2}_{iu}[n] \\
    &=\frac{\beta_0}{(x_i[n]-x_u[n])^2+(y_i[n]-y_u[n])^2+(z_i[n]-z_u[n])^2},
    \end{aligned}
\end{equation}
where $\beta_{0}$ is the channel gain at the reference point of $d_0$ = 1 m which is contingent on the transmitter and receiver antenna gains and the carrier frequency. Parameter $d_{iu}[n]$ represents the distance between the $i$th user and the UAV.

The capacity of the
channel between user $V_i$ and the UAV in time slot $n$ is given as 
\vspace{-1 mm}
\begin{equation}
    {C _{iu}[n]} = \log_2 \left( 1+\frac{{P_i}[n]{g}_{iu}[n]}{\sigma^2}\right) = \log_2 \left( 1+\frac{\lambda_0{P_i}[n]}{d^2_{iu}[n]}\right),
   
\end{equation}
where $\lambda_0=\beta_0/\sigma^2$ is the signal-to-noise ratio (SNR) at the reference point. 

\subsection{Wiretap Channel} {Because the UAV is in the air and can often establish an LoS link with the BS, beamforming and PC can be effectively employed to focus the radio frequency (RF) transmission between the BS and UAV.
On the other hand, a UE may have a single transmit antenna and, thus, its UL transmission will not be focused. Assuming ground eavesdroppers, here we therefore consider the user-UAV UL link being the dominant eavesdropping channel.}

The transmitted signal from user $V_i$ is overheard by eavesdropper ${E}_{j}$, which receives
\vspace{-2 mm}
\begin{equation}
    {r _{j}} = \sqrt{P_i{w}_{ij}}s_i+n_j,
\end{equation}
where $n_{j}$ denotes the
AWGN
at the eavesdropper $E_j$. 
Because users and eavesdroppers are on the ground, the path loss exponent
is assumed to be four. The
ground-to-ground (G2G) channel gain between user $V_i$ and eavesdropper
$E_j$ 
in time slot $n$ can then be modeled as
\vspace{-0.5 mm}
\begin{equation}
\small
\begin{aligned}
   
   
    {w}_{ij}[n] &=\beta_{0}d^{-4}_{ij}[n]\\
    =&\frac{\beta_0}{({(x_i[n]-x_j[n])^2+(y_i[n]-y_j[n])^2+(z_i[n]-z_j[n])^2)}^2},
    \end{aligned}
\end{equation}
where
$d_{ij}[n]$ is the distance between the $i$th user and the $j$th eavesdropper in the $n$th time slot.
The corresponding capacity is
\vspace{-2 mm}
\begin{equation}
    {C _{ij}[n]} = \log_2 \left( 1+\frac{{P_i}[n]{w}_{ij}[n]}{\sigma^2}\right) = \log_2 \left(
    1+\frac{\lambda_0{P_i}[n]}{d^{4}_{ij}[n]}\right).
   
   

\end{equation}



\subsection{Secrecy Capacity Metric} The common metric to evaluate the influence of eavesdropping and the performance of mitigation techniques is the secrecy capacity. The secrecy capacity is calculated as the difference between the legitimate and the wiretap channel capacities and corresponds to the rate at which no data will be decoded by the eavesdropper~\cite{YanWanGer2015}.  
The average secrecy capacity per cluster position over $N$ radio time slots with $M$ users and $E$ eavedroppers and one AR
is then obtained as
\vspace{-2 mm}
\begin{equation}
    {C ^{Total}_{sec}} = \frac{1}{N}\sum\limits_{n=1}^N \Bigg[ 
    \sum\limits_{i=1}^M C _{iu}-\max\limits_{j \in E}\sum\limits_{i=1}^M C _{ij}[n] \Bigg]^+,
    \label{equ:totalsec}
\end{equation}
\vspace{4 mm}
where $[x]^+ \triangleq max(x,0)
\section{Problem Formulation}
The objective of this paper is maximizing the average secrecy rate $C ^{Total}_{sec}$
by optimizing the AR position and
transmission power.

In order to have a short distance to the affected users
with
strong LoS connections,
the UAV position constraint is formulated as follows:
 \vspace{-1 mm}
\begin{equation}
    \sqrt{(x_u[n]-x_{center}[n])^2+(y_u[n]-y_{center}[n])^2} \leq R, \forall {n},
\end{equation}
where $x_{center}[n]$ and $y_{center}[n]$ are the center coordinates of the mobile cluster at time slot $n$. 
We introduce
the average transmission
power $\Bar{P}$ and the peak transmission
power
$ P_{max}$, where $ \Bar{P} \leq P_{max}$. The UL transmission power constraint for each user
is
 \vspace{-2 mm}
\begin{equation}
    \frac{1}{N}\sum\limits_{n=1}^N P[n] \leq \Bar{P},
    \label{P_avg_Max}
\end{equation}
\begin{equation}
   0 \leq P[n] \leq P_{max}, \forall {n}.
   \label{11}
\end{equation}

The optimization problem can now be written as
 \vspace{-2 mm}
\begin{equation}
\begin{aligned}
   (P1) : \max\limits_{x_u,y_u,P} \frac{1}{N}\sum\limits_{n=1}^N \Bigg[
   \sum\limits_{i=1}^M  &\log_2  \left(1+\frac{\lambda_0{P_i}[n]}{d^2_{iu}[n]} \right)\\
   - \max\limits_{j \in E} \sum\limits_{i=1}^M&\log_2\
   \left(1+\frac{\lambda_0{P_i}[n]}{d^{4}_{ij}[n]}\right) \Bigg]^+ ,\\
  
   s.t.\hspace{2 pt }(8),(9),(10).
   \end{aligned}
   \label{12}
\end{equation}
\section
Iterative Solution}
\label{Propo_Algo}

The objective function is non-convex with respect the optimization parameters $x_u$, $y_u$, and $P$. In addition, the $[.]^+$ operator creates a non-smooth objective function.

$Lemma$ $1$: Problem $P1$ can be reformulated
as a new optimization problem $P2$ with the same optimal solution.
 \vspace{-2 mm}
\begin{equation}
\begin{aligned}
   (P2) : \max\limits_{x_u,y_u,P} \frac{1}{N}\sum\limits_{n=1}^N \Bigg[
   \sum\limits_{i=1}^M  &\log_2  \left(1+\frac{\lambda_0{P_i}[n]}{d^2_{iu}[n]} \right)\\
   -\max\limits_{j \in E} \sum\limits_{i=1}^M &\log_2
   \left(1+\frac{\lambda_0{P_i}[n]}{d^{4}_{ij}[n]}\right) \Bigg] ,\\
  
   s.t.\hspace{2 pt }(8),(9),(10).
   \end{aligned}
   \label{13}
\end{equation}
$Proof$ $of$ $Lemma$ $1$:
Let $\xi_1^*$ and $\xi_2^*$
be the optimal solutions for problems~(\ref{12}) and~(\ref{13}), respectively, and because $[\upsilon]^+ \geq [\upsilon]$, $\xi_1^* \geq \xi_2^*$. The optimal solution of~(\ref{12}) $\xi_1^*$ $=$ $(x^*_{u}, y^*_{u}, P^*)$, where $x^*_{u}=[x^*_{u}[1], x^*_{u}[2],...,x^*_{u}[N]]^\dagger, y^*_{u}=[y^*_{u}[1], y^*_{u}[2],...,y^*_{u}[N]]^\dagger$, and $ P^*=[P^*[1], P^*[2],...,P^*[N]]^\dagger$.
We define
\begin{equation}
\begin{aligned}
\tau(&x_u[n],y_u[n],P[n])= \\
&\sum\limits_{i=1}^M  \log_2  \left(1+\frac{\lambda_0{P_i}[n]}{d^2_{iu}[n]} \right)
   -\max\limits_{j \in E} \sum\limits_{i=1}^M \log_2
   \left(1+\frac{\lambda_0{P_i}[n]}{d^{4}_{ij}[n]}\right).
   \end{aligned}
   \label{eq:xxx}
\end{equation}
Let $(\hat{x}_{u}, \hat{y}_{u}, \hat{P})$ represent the feasible values that are constructed while solving~(\ref{13}), where $\hat{x}_{u}=x^*_{u}, \hat{y}_{u}=y^*_{u}$ and $\hat{P[n]}$ can be computed as follows:
\begin{equation}
\hat{P[n]}=
    \begin{cases}
       P^*[n] & \tau(x_u[n],y_u[n],P[n]) \geq 0,\\
      0 & \tau(x_u[n],y_u[n],P[n]) < 0,
    \end{cases}       
\end{equation}
In other words, the UL transmission power is set to zero if (13) is negative. This will maximize (12), because the inner term of (12), i.e. (13), is 0 instead of being negative for a certain $n$, where an eavesdropper achieves a higher reception rate than the AR. This is equivalent to using the $[.]^+$ operator in (11). The constructed final solution $\hat{\upsilon} $ based on $(\hat{x}_{u}, \hat{y}_{u}, \hat{P})$ ensures that $\hat{\upsilon} = \xi_1^*$. Then, since $(\hat{x}_{u}, \hat{y}_{u}, \hat{P})$ represents a feasible solution for~(\ref{13}
, consequently $\xi_2^* \geq \hat{\upsilon}$ and, therefore,  $\xi_2^* \geq \xi_1^*$. Since the premise at the beginning of the proof was that $\xi_1^* \geq \xi_2^*$, the equality holds, i.e.
$\xi_1^* = \xi_2^*$, proving Lemma 1.



The transformation from problem $P1$ to problem $P2$ eliminates the non-smoothness, but
$P2$ is still non-convex. We therefore
propose an iterative algorithm for solving $P2$. It is derived from the block coordinate descent strategy. In particular, we split the problem into two subproblems by separating the optimization variables in two blocks. The first subproblem optimizes the
transmission powers with respect to a given UAV position. The second subproblem aims at finding the optimal UAV position for the given transmission powers. The solution of one subproblem is
applied to the other subproblem,
iteratively until convergence.

\subsection{Subproblem P2.I: Transmission Power Optimization}

We apply $\log_2(z)= \ln (z)/\ln(2)$ to define the optimization subproblem $P2.I$ as 
\begin{equation}
\begin{aligned}
   (P2.I) : \max\limits_{P} \frac{1}{N}\sum\limits_{n=1}^N \Bigg[
   \sum\limits_{i=1}^M &\ln \left(1+ \mu_n {P_i}[n]\right)\\
   - \max\limits_{j \in E} \sum\limits_{i=1}^M&\ln \left(1+\eta_n {P_i}[n]\right) \Bigg] ,\\
  
   s.t.\hspace{2 pt }(9),(10),
\label{P2.I}
  \end{aligned}
\end{equation}
where 
\vspace{-4 mm}
\begin{equation}
    \mu_n = \frac{\lambda_0}{(x_i[n]-x_u[n])^2+(y_i[n]-y_u[n])^2+(z_i[n]-z_u[n])^2}
\end{equation}
\vspace{-4 mm}
\begin{equation}
    \eta_n =
    \frac{\lambda_0}{(x_i[n]-x_j[n])^2+(y_i[n]-y_j[n])^2+(z_i[n]-z_j[n])^2}.
   
\end{equation}

Based on the findings of~\cite{P_optmalSolution}, the derivation of the optimal power allocation policy for subproblem~$P2.I$ can be easily determined for the case where $\mu_n \leq \eta_n$.  The objective function of~(\ref{P2.I}) with respect to ${P_i}[n]$ for this case is non-increasing and, therefore, the optimal transmission power is zero. For $\mu_n > \eta_n$, the objective function holds the non negative weighted sums(or integral) that preserves the concavity of the problem with respect to ${P_i}[n]$. Therefore, the optimal solution for it can be obtained by applying the Lagrangian maximization approach to get the solution of~(\ref{P2.I}), the following optimality condition has been found: 
\vspace{-1 mm}
\begin{equation}
  \frac{\partial \tau(x_u[n],y_u[n],P[n])}{\partial {P}[n]} = \frac{\eta_n}{1+\eta_n{P}[n]}-\frac{\mu_n}{1+\mu_n{P}[n]}-\rho=0,
  \label{19}
  \vspace{-1.5 mm}
\end{equation}
where the power allocation policy at the transmitter $\Tilde{P}[n]$ that satisfies the optimality condition can be calculated as follows: 
\vspace{-2 mm}
\begin{equation}
  \Tilde{P}[n] =
    \begin{cases}
      min \left([{P^{\circ}}[n]]^+, P_{max}\right) & \mu_n \ge \eta_n,\\
      0 & \mu_n \leq \eta_n,
    \end{cases}       
\end{equation}
where 
\vspace{-2 mm}
\begin{equation}
   P^{\circ}[n] = \sqrt{\left(\frac{1}{2\eta_n}- \frac{1}{2\mu_n} \right)^2+ \frac{1}{\rho}\left( \frac{1}{\eta_n} - \frac{1}{\mu_n} \right)}-\frac{1}{2\eta_n}-\frac{1}{2\mu_n}.
\end{equation}
The constant $\rho \geq 0$ has been introduced to limit the
peak power according to
~(\ref{P_avg_Max}) and (\ref{11}), and it can be computed efficiently via a one-dimensional bisection search~\cite{rho}.
 
\subsection{Subproblem P2.II: UAV Position Optimization
The second subproblem of problem $P2$ optimizes the UAV position. It can be formulated as
\vspace{-2 mm}
\begin{equation}
\begin{aligned}
   (P2.II) :  \max\limits_{x_u,y_u} \frac{1}{N}\sum\limits_{n=1}^N \Bigg[
   \sum\limits_{i=1}^M  &\log_2  \left(1+\frac{\grave{P_i}}{d^2_{iu}[n]} \right)\\
   -\max\limits_{j \in E}\sum\limits_{i=1}^M &\log_2
   \left(1+\frac{\grave{P_i}}{d^{4}_{ij}[n]}\right) \Bigg] ,\\
  
 
   s.t.\hspace{2 pt }(8),
\label{P2.II}
  \end{aligned}
\end{equation}
where $\grave{P_i} = \lambda_0 {P_i}[n] $.

Here we
optimize only the AR position. Hence, the focus is
on maximizing the capacity between the ground users and the UAV. 
In order to solve this subproblem, which is a non-concave function with respect to $x_u$ and $y_u$, we add a slack variable $\psi=[\psi[1],\cdots,\psi[N]^\dagger$. The optimization problem can then be reformulated as 
\begin{equation}
\begin{aligned}
   (P2.II) :  \max\limits_{x_u,y_u,\psi} \frac{1}{N}\sum\limits_{n=1}^N \Bigg[
   \sum\limits_{i=1}^M &\log_2  \left(1+\frac{\grave{P_i}}{{\psi}[n]} \right) \\
   -\max\limits_{j \in E}\sum\limits_{i=1}^M &\log_2
   \left(1+\frac{\grave{P_i}}{d^{4}_{ij}[n]}\right) \Bigg] ,\\
  \end{aligned}
     \tag{22.a}
\label{P2.II.a}
\end{equation}
\vspace{-0.5 mm}
   s.t.\hspace{2 pt }
\begin{equation}
   \begin{aligned}
    \psi[n]-x^2_i[n]&+2x_i[n]x_u[n]-x^2_u[n]-y^2_i[n]+2y_i[n]y_u[n]\\&-y^2_u[n]
    -z^2_i[n]+2z_i[n]H-H^2 \leq 0, \forall {n},
  \end{aligned}
\tag{22.b}
\label{P2.II.a_st1}
\end{equation}
\begin{equation}
    \psi[n]\geq 0, \forall {n}. \tag{22.c}
\end{equation}



The equality
in (22.b) and (22.c) shall be satisfied for the optimal solution.
If this is not the case, then the slack variable $\psi[n]$ can be increased until an improvement in the objective function is achieved. 
As a result, we can consider that the ideal result of (22) will be the same for~(\ref{P2.II}).  
  \begin{figure*}[ht]
     \centering
     \vspace{-3 mm}
    
     \includegraphics[width=1\textwidth]{Figures/Secrecy_2_4_UEs_UAV_TOPC_Noncoperative4_4.eps}
     \vspace{-15 pt}
     \caption{SEE
     for multiple mobile UEs under attack by multiple eavesdroppers and different mitigation strategies
     }
     \vspace{-1 mm}
     \label{fig:sec_result2}
 \end{figure*}


In the process of finding the optimal solution for~(\ref{P2.II.a}), we must consider the terms $-x^2_u[n]$ and $-y^2_u[n]$ that conceive the non-convexity.
Therefore, we employ an iterative algorithm that uses the successive convex optimization method for developing an approximate solution for~(\ref{P2.II.a}) by maximizing the concave lower bound of the objective function within the convex feasibility region.

First, we introduce $x_{u(fea)} \triangleq  [x_{u(fea)}[1],\cdots,x_{u(fea)}[N]]^\dagger $, $y_{u(fea)} \triangleq  [y_{u(fea)}[1],\cdots,y_{u(fea)}[N]]^\dagger $, and $\psi_{(fea)}$ $\triangleq$  $[\psi_{(fea)}[1],\cdots,\psi_{(fea)}[N]]^\dagger$, where this initial point $(x_{u(fea)}, y_{u(fea)}, \psi_{(fea)})$ is feasible to~(22).
By taking into consideration that $-x^2_u[n]$ and $-y^2_u[n]$ are concave functions, their first-order Taylor expansions at $x_{u(fea)}$, $y_{u(fea)}$, and $\psi_{(fea)}$ are global over-estimators. Therefore, the next step will be calculating the first-order Taylor expansions at
$x_{u(fea)}$, $y_{u(fea)}$, and $\psi_{(fea)}$ for the following terms $\sum\limits_{i=1}^M \log_2   \left(1+\frac{\grave{P_i}}{{\psi}[n]} \right)$, $-x^2_u[n]$, and $-y^2_u[n]$, respectively: 
\begin{equation}
\begin{aligned}
    \sum\limits_{i=1}^M \log_2  \left(1+\frac{\grave{P_i}}{{\psi}[n]} \right) &\geq \sum\limits_{i=1}^M \log_2  \left(1+\frac{\grave{P_i}}{{\psi_{(fea)}}[n]} \right)\\
    &
    -\left(\frac{\grave{P_i}({\psi}[n]-{\psi_{(fea)}})}{ln2({\psi}^2_{(fea)}[n]+\grave{P_i}{\psi_{(fea)}})}\right),
    \end{aligned}
        \tag{23}
\end{equation}
 \vspace{-3 mm}
\begin{equation}
    -x^2_u[n] \leq x^2_{u(fea)}[n]-2x_{u(fea)}[n]x_u[n],
    \tag{24}
\end{equation}
 \vspace{-5 mm}
\begin{equation}
    -y^2_u[n] \leq y^2_{u(fea)}[n]-2y_{u(fea)}[n]y_u[n].
    \tag{25}
\end{equation}
As a result, (\ref{P2.II.a}) and its constraint~(\ref{P2.II.a_st1}) can be reformulated as
\vspace{-3 mm}
\begin{equation}
\begin{aligned}
   (P2.II) :  \max\limits_{x_u,y_u,\psi} \frac{1}{N}\sum\limits_{n=1}^N \Bigg[
   \sum\limits_{i=1}^M &-\frac{\grave{P_i}({\psi}[n])}{ln2({\psi}^2_{(fea)}[n]+\grave{P_i}{\psi_{(fea)}})} \\
   -\max\limits_{j \in E}\sum\limits_{i=1}^M &\log_2
   \left(1+\frac{\grave{P_i}}{d^{4}_{ij}[n]}\right) \Bigg] ,
  \end{aligned}
     \tag{26.a}
\label{P2.II.solution}
\end{equation}
 \vspace{-2 mm}
   s.t.\hspace{2 pt }
   \begin{equation}
   \begin{aligned}
    \psi[n]&-x^2_i[n]+2x_i[n]x_u[n]+x^2_{u(fea)}[n]-2x_{u(fea)}[n]x_u[n]\\&-y^2_i[n]+2y_i[n]y_u[n]+y^2_{u(fea)}[n]-2y_{u(fea)}[n]y_u[n]
    \\&-z^2_i[n]+2z_i[n]H-H^2 \leq 0, \forall {n},
  \end{aligned}
\tag{26.b}
\label{P2.II.final}
 
\end{equation}

 \vspace{-4 mm}
\begin{equation}
    \psi[n]\geq 0, \forall {n}. \tag{26.c}
    \vspace{-1 mm}
\end{equation}
This final version of the UAV position optimization problem
is concave
with a convex feasibility region. 
Therefore, the solution for it can be obtained by using the interior point method~\cite{optimization_book}.  

Since the first constraint of problem (26) covers that of problem (22), the feasible solution to
(22) can be found by solving (26). 
In addition, it is guaranteed that applying the solution of (26) to the objective function of (22) will not result in a lower value when using $(x_{u(fea)}, y_{u(fea)}, \psi_{(fea)})$.
\begin{figure}[!t]
 \let\@latex@error\@gobble
  \begin{minipage}{0.95\linewidth}
\begin{algorithm}[H]
\footnotesize
\SetAlgoLined
   

    Initialize $P^{(0)}$, $x_u^{(0)}$, $y_u^{(0)}$, and the initial slack variable $\psi^{(0)}$ to feasible values and set $j=0$;
   
    
    Calculate $C^{(0)}=f_{P2}(P^{(0)}, x_u^{(0)}, y_u^{(0)})$ according to~(\ref{13});
    
    \While{ $\frac{C^{(j)}-C^{(j-1)}}{C^{(j)}} \leq \chi$}
  {
        With given $P^{(j-1)}$, set the new feasible points $x^{(j)}_{u(fea)}=x^{(j-1)}_u$, $y^{(j)}_{u(fea)}=y^{(j-1)}_u$, and $\psi^{(j)}_{(fea)}=\psi^{(j-1)}$;
        
        Calculate the new trajectory update $(x^{(j)}_u,y^{(j)}_u)$ and the slack variable $\psi^{(j)}$  according to~(26);
        
        Solve equation (19) with the obtained trajectory $(x^{(j)}_u,y^{(j)}_u)$ to calculate the updated transmission powers $P^{(j)}$;
        
        Calculate the new $C^{(j)}=f_{P2}(P^{(j)}, x_u^{(j)}, y_u^{(j)})$ according to~(\ref{13});
   		
  		$j \Leftarrow j+1 $
   		
  }
  \KwResult{Optimal $P$, $x_u$ and $y_u$ }
   
 \caption{\small Proposed algorithm for optimizing the transmission power and UAV position.}
 \label{Algorithm1}
\end{algorithm}
  \end{minipage}
  \end{figure}
  \subsection{Overall Algorithm}
Algorithm~1 presents the details of the proposed optimization method, where the block coordinate descent method is deployed for finding a suboptimal solution to Problem~$P1$ in an iterative manner. Parameter $\chi$ is the threshold indicator of the convergence accuracy


The complexity of Algorithm~1 can be obtained from the pseudocode as $\mathcal{O}(J((2M+E)N)^{3.5})$, where $J$, $M$, $E$, and $N$ are the number of iterations, users, eavesdroppers, and radio time slots, respectively. The inner term $(2M+E)N$ come from (7), the $((2M+E)N)^{3.5}$ is the algorithm complexity per iteration for obtaining the new location and PC parameters, and $J((2M+E)N)^{3.5}$ is the total complexity of the iterative algorithm. 
This complexity is polynomial and feasible for practical use.

The convergence of Algorithm 1 is proven as follows. First we note that in iteration $j \geq 1$, 
the objective function~(\ref{13}) is non-decreasing: 


 \begin{minipage}{1\linewidth}
 \vspace{-2 mm}
   \begin{align}
   \Omega (&x^{(j-1)}_u,y^{(j-1)}_u,P^{(j-1)})\tag*{} \\
   &=\Upsilon(x^{(j-1)}_u,y^{(j-1)}_u,\psi^{(j-1)},P^{(j-1)})\tag{27.a}\\
   &=\Gamma(x^{(j-1)}_u,y^{(j-1)}_u,\psi^{(j-1)},P^{(j-1)})\tag{27.b}\\
   &\leq \Gamma(x^{(j)}_u,y^{(j)}_u,\psi^{(j)},P^{(j-1)})\tag{27.c}\\
   &\leq \Upsilon(x^{(j)}_u,y^{(j)}_u,\psi^{(j)},P^{(j-1)})\tag{27.d}\\
   &=\Omega(x^{(j)}_u,y^{(j)}_u,P^{(j-1)}),\tag{27.e}
  \end{align}
   \end{minipage}
  

where $\Omega,\Upsilon$, and $\Gamma$ correspond to the the objective functions (12), (22), and (26), respectively. \textbf{In steps (4-5)}, (21) and (22) share the exact optimal value and solution of $(x_u,y_u)$; hence, (27.a) and (27.e) hold. The feasible values $(x_{u(fea)}$, $y_{u(fea)}$, $\psi_{(fea)})=(x^{(j-1)}_u,y^{(j-1)}_u,\psi^{(j-1)})$  make the first-order Taylor expansions in {(23), (24), and (25)} tight; therefore, (27.b) holds. The optimal solution to (26) is $(x^{(j)}_u,y^{(j)}_u,\psi^{(j)})$ and enforces
(27.c). Since $\Gamma$ is a lower bound of (22), (27.d) holds. \textbf{Steps (6-7)} calculate the new transmission powers and update the solution: 
\begin{equation}
    \Omega (x^{(j)}_u,y^{(j)}_u,P^{(j-1)}) \leq \Omega (x^{(j)}_u,y^{(j)}_u,P^{(j)}).
    \vspace{-2 mm}
    \tag{28}
\end{equation}
We combine (28) and (27.e) and obtain
\begin{equation}
    \Omega (x^{(j-1)}_u,y^{(j-1)}_u,P^{(j-1)}) \leq \Omega (x^{(j)}_u,y^{(j)}_u,P^{(j)}).
    \vspace{-2 mm}
    \tag{29}
\end{equation}
From the above, we have proven that $\Omega$ is non-decreasing and upper-bounded by a finite value; therefore, Algorithm 1 is guaranteed to converge.

  
        
        
        
          
          
          
        
\vspace{-2 mm}



    
    
    
        
        
        
   		
   		



\section{Introduction}
\label{sec:intro}
\input{./include/intro.tex}



\vspace{-2mm}
\section{System Model} 
\vspace{-1 mm}
\label{sec:system}
\input{./include/system.tex}



\section{Numerical Analysis and Discussion}
\vspace{-1 mm}
\label{sec:results}
\input{./include/results.tex}



\section{Conclusions}
\vspace{-1 mm}
\label{sec:conclusions}
\input{./include/conclusions.tex}





\balance

\bibliographystyle{IEEEtran}
