This simulation calculates the total communication energy and the energy efficiency during training of FL models with quantization, by calculating the achievable bit rate for a set of users in a wireless communication system. Below is an explanation of the key parameters, the steps in the simulation, and the resulting insights.
- Number of Users (
num_users = 20): - Area Size (
A = 10000 m^2):- Defines a 100 x 100 m^2 area in which the users are randomly located.
- Transmission Power (
Pt = 100e-3 W): - Bandwidth (
B = 2e6Hz):- The available bandwidth for the communication is 2 MHz.
- Noise Spectral Density (
N0 = 1e-9W/Hz): - Model Size (
32 * 1e6 bits):- Assumes a model with parameters represented using 32 bits.
- Server Position:
- Fixed at the center of the area (500, 500), ensuring a centralized setup for communication.
To calculate the total energy required to achieve a target accuracy of 65% for both quantized and full-precision models, we first determine the number of training rounds needed. This is done by summing the rounds where the model's test accuracy is below the target accuracy, for both the quantized version and the full precision.
The energy required per round is given as:
The total energy for the quantized model using 8 bits quantization is calculated as:
For the full-precision model:
Finally, the energy savings from using the quantized model is: