## 8 Simulations  
### Simulation Settings  
The FL architecture consists of one cloud server, six edge servers, and thirty clients. The system latency primarily comprises three components: first, the computation delay incurred by local training on the client devices and the transmission delay associated with uploading local models; second, the latency at the edge servers, including the time required for edge aggregation, as well as the transmission delay for distributing the aggregated edge models to clients and uploading them to the cloud server; and finally, the latency at the cloud server for performing global aggregation and distributing the global model back to the edge servers. The specific calculation method follows the approach in [22], and the wireless network parameters used in our experiments are listed in Table 1.  
The experiments are conducted on the MNIST [23], CIFAR10 [24], and FashionMNIST [25] datasets, with the target accuracy set to 90% for the MNIST and 80% for the other two datasets. Each client is allocated different computing capability, specifically CPU frequencies \(f_{i}\), randomly assigned from the range \([5,10,15,20]\times 10^{8}\). Due to heterogeneity of clients, both synchronous and asynchronous aggregation strategies need to be adjusted. The number of synchronous aggregations for each edge and client is fixed at 2, and the number of asynchronous aggregations at 8. The number of local training iterations for clients paired under each edge is no longer fixed but is determined by the client with the highest computing capability, calculated based on the fixed number of aggregations. To avoid introducing additional delays, the synchronous aggregation time is controlled to be less than the time taken by a client with computing capability \(f=1\times 10^{9}\) to perform 10 local training iterations as a baseline. The time for asynchronous aggregation should not exceed the communication time between the edge and the cloud. The reward and penalty factors for the aggregation weights, \(\chi_{i}\) and \(\xi_{i}\), are set to 1.01 and 0.99, respectively. The hyperparameter \(v\) is set to 0.7 in Equation (2). The corresponding sensitivity analysis is provided in Appendix A. The simulation tests the performance of different resource allocation schemes. The considered metrics are divided into energy consumption targets and accuracy targets: the energy consumption target is the system delay and total client energy consumption when the global model reaches the target accuracy, while the accuracy target is the highest accuracy the global model can achieve after 100 global rounds. The comparison is primarily made with the following methods:  
(1) Method 1: Full aggregation. All clients participate in the aggregation, corresponding to the experimental results from the previous section. (2) Method 2: Random selection for aggregation. All clients randomly participate in the aggregation according to a fixed proportion frac. (3) Method 3: Selection of only high-computing capability clients. Clients are selected for aggregation based on their computing capability, according to a fixed proportion frac. (4) Method 4: Selection of only clients with high local loss [26]. Clients with higher local loss are preferentially selected for aggregation according to the fixed proportion frac. (5) Method 5: Selection of only high-contribution clients [27]. (6) Method 6: Selection of clients based on a comprehensive evaluation of location, historical information, data characteristics, and current status [22]. The proportion frac is uniformly set to 0.75. \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline Computation cycles per bit \(c_{i}\) & 30 cycles/bit \\ Capacitance coefficient \(a_{i}/2\) & \(2\times 10^{-26}\) \\ Bandwidth \(B\) & \(1\times 10^{6}\) Hz \\ Client transmit power \(p_{i}\) & 0.5 W \\ Channel gain \(h_{i}\) & \(1\times 10^{-8}\) \\ Power spectral density of noise \(N_{0}\) & \(1\times 10^{-10}\) W \\ \hline \hline \end{tabular}
\end{table}