# Joint Client and Resource Optimization for Federated Learning in Wireless IoT Networks
## 5 Simulation Results  
In this section, the performance of the proposed alternative direction-based algorithm is examined by comparison with two existing benchmarks. Benchmark 1 is the vanilla FL scheme [2] over wireless IoT networks, among which the federated average algorithm is adopted. Benchmark 2 is the communication-efficient FL [18], among which the optimization objective is to maximize the number of clients participating in the FL process. We consider a FL-aided cellular IoT network within a 1 km \(\times\) 1 km area, where the BS is located at the center while 20 IoT nodes are randomly distributed. The channel model [22] is adopted; that is, \(103.2+27.3\log_{10}(d)\) is adopted between BS and the IoT nodes. The total bandwidth of the network \(B_{T}=10\) MHz, and the power of background noise \(\sigma^{2}=-109\) dBm. The maximum transmitting power \(P_{M}=15\) dBm. In the simulation, the ML model of interest is a convolutional neural network (CNN) [23], which consists of 2 convolutional layers, 1 fully connected layer, and 1 softmax function-based output layer. Each convolutional layer is \(5\times 5\) and is connected with a \(2\times 2\) max-pooling. The fully connected layer has 500 units. The training data set is MNIST [24], and the original data from MNIST are randomly partitioned into \(M\) pieces and each IoT node is assigned one piece. Thus, the data distribution follows i. i. d. Here, the amount of training data \(S_{i}\) follows uniform distribution between 1500\(\sim\)3500 images. Figure 3 shows the comparisons of network utility as the number of transmission round increases. It is observed that as the number of transmission round grows, the proposed algorithm outperforms benchmark 2. In fact, in the optimization of benchmark 2, the objective function considers all the nodes equally, while in the proposed algorithm, the amount of training data collected by the IoT nodes is considered as the profit weight in the objective function, which leads to more data being brought into the training under the same communication rounds. Meanwhile, the proposed algorithm and benchmark 2 are superior to benchmark 1. The reason is that in these two algorithms, the power and bandwidth are optimized to maintain the learning process, which efficiently reduces the consumption of communication resources. Figure 3: Comparisons of network utility when the number of transmission round increases. Figure 4 depicts the loss of the trained model for the compared algorithms. First, as the number of transmission rounds increases, the loss of the trained model decreases for all three algorithms. The reason is that with the growth of the transmission round, more and more data are brought into training, which is helpful to improve the trained parameters. We found that when the number of transmission rounds is larger than 1000, the proposed algorithm and benchmark 2 converge to almost the same loss level. This is due to the fact that with sufficient communication rounds, the two schemes can bring adequate data into the training. However, recalling the results in Figure 3, it can be deduced that the consumption of communication resources are different for the two algorithms, and the proposed algorithm is superior in power and bandwidth saving. Figure 5 illustrates the comparisons of the accuracy rate when the number of transmission rounds increases. It is observed that as the transmission rounds grow, the accuracy rate of the trained model also increases for all compared algorithms. The proposed algorithm and benchmark 2 are superior to benchmark 1. The reason is that compared to benchmark 1, the two schemes brought more data into training with limited communication resources. When the number of transmission rounds is greater than 1000, the performance of the three algorithms is close, because in that case, sufficient data have been brought into the training process. The proposed algorithm outperforms benchmark 2 because its objective function considers both the amount of training data and the consumption of communication resources.