# Computation Offloading and Resource Allocation Based on P-DQN in LEO Satellite Edge Networks
## 5 Simulations and Results Analysis
### Performance Analysis  
To validate the effectiveness of the proposed P-DQN method, the following four baseline methods are listed as follows:  
1. Random offloading (RO): Randomly offloading tasks locally, to LEO satellites and to the cloud server [52]. 2. Average resource allocation (ARA): Computing resources on both LEO satellites and the cloud server are evenly shared among offloaded tasks [40]. 3. DQN offloading (DQNO): The DQN is only used for the task offloading [52]. 4. Deep deterministic policy gradient (DDPG) resource allocation (DDPGRA): The DDPG is used to allocate both computing and power resources for already offloaded tasks. Figure 3 compares the average reward per episode of the proposed method at different learning rates, set to be 0.001, 0.0001, and 0.00001, respectively. Figure 3 clearly shows that the learning rate variation significantly impacts the converged average return and convergence performance. With the learning rate of 0.001, the proposed method begins to converge at episode 10 or so, but next falls into the local optimum with the lower return value. With 0.00001, it does not converge until episode 80 or so. Further, with 0.0001, the proposed method not only demonstrates the improved average return per episode, but \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline Length per time slot & 0.1 s \\ \hline Slot number per episode & 100 \\ \hline Task size & \([8\times 10^{4},1.2\times 10^{5}]\) bits \\ \hline Number of LEO satellites & 3 \\ \hline LEO satellite orbit altitude & 900 Km \\ \hline Maximum transmit power per LEO satellite & 100 w \\ \hline Maximum transmission power per ground & 20 w \\ terminal & 30 GHz \\ \hline Link bandwidth & 25 MHz \\ \hline Number of terminals in region 1 & 14 \\ \hline Number of terminals in region 2 & 12 \\ \hline Number of terminals in region 3 & 8 \\ \hline Noise power spectral density & \(-174\) dBm/Hz \\ \hline Computing resources per LEO satellite & \(3\times 10^{10}\) cycle/s \\ \hline Computing resources of cloud server & \(1\times 10^{11}\) cycle/s \\ \hline Maximum tolerance latency & 260 ms \\ \hline Discounting factor & 0.9 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. also shows a relatively fast convergence rate. It is inferred that a high learning rate can lead to quick convergence but increases the risk of being trapped in the local optimum. Conversely, the lower learning rate results in a smaller step size, thus slowing down the convergence rate to the optimum. Figure 4 compares the average return per episode of the proposed method for different batch sizes (32, 64, and 128). The batch size of 32 results in slower convergence and lower average return. Conversely, the batch size of 128 results in a faster convergence rate, but is easily trapped into the local optimum. For 64, both convergence and return values are acceptable. There, in the sequel, we pick the learning rate of 0.0001 and a sample batch size of 64 for method comparison. Figure 5 compares the rate of satisfied tasks under different computing resources budgets in the cloud server. Both RO-ARA and RO-DDPGRA methods use random offloading, thus resulting in a lower access rate when available computing resources are less. Although the rate is improved as computing resources become more, the improvement is limited. This is because that the RO method would not offload more tasks to the cloud server, even with substantial resources. In contrast, both the proposed method and DQNO-ARA tend to prioritize the task of offloading to servers with ample resources. Yet, since the proposed method uses the parameterized continuous resource optimization and DQNO-ARA is just the equal one, the former one obtains the higher rate. Further, as computing resources are gradually increased, the values of both methods continue to grow, yet with  
Figure 4: Average return under different batchsize settings. Figure 3: Average reward under different learning rates. the narrowed gap.