Simulation Runner (Detailed Documentation)

This page provides the complete documentation of the simulation runner class.

class SimulationRunner(sim_config: SimConfig, system_config: SystemConfig)[source]

Orchestrates the execution of the MU-MIMO downlink system simulation.

__init__(sim_config: SimConfig, system_config: SystemConfig)[source]

Initialize a simulation runner.

Parameters:
  • sim_config (SimConfig) – The configuration of the simulation. This includes the SNR values, the minimum number of channel realizations, the minimum number of bit errors, and the number of symbols to be transmitted at once.

  • system_config (SystemConfig) – The configuration of the MU-MIMO system. This includes the number of user terminals (UTs), the number of transmit antennas at the base station (BS), the number of receive antennas per UT. Also, it includes the configurations of the BS, UTs and channel.

run() SimResult[source]

Run the MU-MIMO downlink system simulation.

The simulation consists of an outer loop iterating over the SNR values and an inner loop iterating over the channel realizations for each SNR value until the stopping criterion is met. The stopping criterion is based on the minimum number of channel realizations and the minimum number of bit errors for each SNR value. The performance metrics are calculated for each channel realization and later averaged over the channel realizations for each SNR value. Finally, the simulation results are saved to a .npz file.

Results

simulation_resultSimResult

The simulation results.

_calculate_bit_error_count_update(inner_loop_result: SingleSnrSimResult) int[source]

Calculate the update of the bit error count stopping criterion based on the specified scope.

Parameters:

inner_loop_result (SingleSnrSimResult) – The performance metrics for the current channel realization and SNR value. (we refer to the SingleSnrSimResult dataclass for more details)

Returns:

becu – The update of the bit error count stopping criterion.

Return type:

int

_calculate_inner_loop_result(snr: float, stream_Rs: ndarray[tuple[Any, ...], dtype[floating]], tx_bits_list: list[list[ndarray[tuple[Any, ...], dtype[integer]]]], rx_bits_list: list[list[ndarray[tuple[Any, ...], dtype[integer]]]]) SingleSnrSimResult[source]

Calculate the performance metrics for a simulation corresponding to a single channel realization and SNR value.

Parameters:
  • snr (float) – The SNR value for this simulation.

  • stream_Rs (RealArray, shape (K, Nr)) – The achievable rates of each UT and each stream for this channel realization (and SNR value and system configuration).

  • tx_bits_list (list[list[BitArray]], shape (K, Ns_k, ibr_k_s * M)) – The list of bitstreams for each UT k and each data stream s that were transmitted by the BS.

  • rx_bits_list (list[list[BitArray]], shape (K, Ns_k, ibr_k_s * M)) – The list of bitstreams for each UT k and each data stream s that were reconstructed by the UTs.

Returns:

inner_loop_result – The performance metrics. (we refer to the SingleSnrSimResult dataclass for more details)

Return type:

SingleSnrSimResult

_calculate_outer_loop_result(inner_loop_results: list[SingleSnrSimResult]) SingleSnrSimResult[source]

Calculate the performance metrics for a simulation corresponding to a single SNR value, averaged over different channel realizations.

Parameters:

inner_loop_results (list[SingleSnrSimResult]) – The list of performance metrics for each channel realization.

Returns:

outer_loop_result – The performance metrics. (we refer to the SingleSnrSimResult dataclass for more details)

Return type:

SingleSnrSimResult