# PPO-Based Joint Optimization for UAV-Assisted Edge Computing Networks
## 3 System Model and Problem Formulation  
In this section, we design a UAV-assisted multi-node edge computing network as shown in Figure 1. The considered system has \(K\) UEs, \(M\) ECSs, and a UAV, where each UE has a certain computational demand, each ECS has a certain processing capability, and the UAV has only a communication function without computational capability. In this network, the UE cannot establish a good direct wireless link with the edge calculator due to the obstruction of terrain and buildings. In order to satisfy the computational needs of the UE, a UAV is deployed as a relay node in the network. The computation task of the UE is first sent to the UAV and, after a reasonable selection, is forwarded to one of the ECSs. In particular, the matching of UEs and ECSs is crucial for the service experience of UEs. Through reasonable design, the transmission delay and waiting delay of the computation tasks can be ensured in an acceptable range. At the same time, UAVs are highly maneuverable, and by adjusting the hovering position of UAVs, the latency of the computation task can also be effectively reduced. Compared to the existing work [13; 14; 15], this scenario focuses on possible problems with the wireless link and compensates for the degradation of the channel quality by means of UAVs. The proposed scheme can be adapted to application scenarios such as large cities with heavy building occlusion and mountains with geographic occlusion. In this work, we adopt the probabilistic line-of-sight channel model. The wireless transmission channel between the UE and the UAV can be categorized by line-of-sight (LoS) and non-line-of-sight (NLoS). The probability of having a LoS wireless channel between UE and UAV is  
\[P_{k}^{\text{LoS}}=\frac{1}{1+a\exp\Bigl{(}-b\Bigl{(}\frac{180}{\pi}\text{tan }^{-1}\Bigl{(}\frac{z}{d_{k}}\Bigr{)}-a\Bigr{)}\Bigr{)}}, \tag{1}\]  
where \(a\) and \(b\) are constants determined by the environment, and \(z\) is the hovering height of the UAV. Denote the horizontal coordinates of the UAV by \((x_{u},y_{u})\), and that of UE \(k\) by \((x_{k},y_{k})\). The distance from UE \(k\) to the UAV in the horizontal plane is expressed as  
\[d_{k}=\sqrt{\left(x_{u}-x_{k}\right)^{2}+\left(y_{u}-y_{k}\right)^{2}}. \tag{2}\]  
Then, the probability of having an NLoS wireless channel between the UE and the UAV is \(P_{k}^{\text{NLoS}}=1-P_{k}^{\text{LoS}}\). Let \(f_{c}\) denote the carrier frequency, and use \(c\) to denote the electromagnetic velocity in free space. Let \(\rho_{\text{LoS}}\) and \(\rho_{\text{NLoS}}\) denote the average additional path loss for LoS and NLoS channels, respectively. Then, the path loss of LoS channel and NLoS channel can be expressed respectively as  
Figure 1: System model. \[\zeta_{\text{Los}} =20\log\left(\frac{4\pi f_{c}\sqrt{z^{2}+d_{k}^{2}}}{c}\right)+\rho_{ \text{Los}}, \tag{3}\] \[\zeta_{\text{NLos}} =20\log\left(\frac{4\pi f_{c}\sqrt{z^{2}+d_{k}^{2}}}{c}\right)+ \rho_{\text{NLos}}. \tag{4}\]  
Then, the probabilistic average path loss from UE \(k\) to UAV is  
\[\zeta(k) =\zeta_{\text{Los}}\times P_{\text{Los}}+\zeta_{\text{NLos}}\times P _{\text{NLos}} \tag{5}\] \[=\frac{A}{1+a\exp\left(-b\left(\frac{180}{\pi}\tan^{-1}\left( \frac{\tilde{x}_{k}}{d_{k}}\right)-a\right)\right)}+20\log\left(\sqrt{z^{2}+d_{ k}^{2}}\right)+\tilde{A}, \tag{6}\]  
where \(A=\rho_{\text{Los}}-\rho_{\text{NLos}}\), \(\tilde{A}=20\log\left(\frac{4\pi f_{c}}{c}\right)+\rho_{\text{Los}}\).