SU-MIMO System (Detailed Documentation)¶
This page provides the complete documentation of the SU-MIMO DigCom system itself, which consists of a transmitter component, a channel component and a receiver component.
- class SuMimoSVD(Nt, Nr, c_type, Pt=1.0, B=0.5, RAS={}, SNR=inf, H=None)[source]¶
- Nt¶
Number of transmit antennas.
- Type:
int
- Nr¶
Number of receive antennas.
- Type:
int
- c_type¶
Constellation type. (Choose between ‘PAM’, ‘PSK’, or ‘QAM’.)
- Type:
str
- Pt¶
Total transmit power (in W). Default is 1.0.
- Type:
float, optional
- B¶
Bandwidth of the communication system (in Hz). Default is 0.5.
- Type:
float, optional
- RAS¶
Resource allocation settings. See the documentation of resource_allocation() method in the Transmitter class for more details about these strategy settings.
- Type:
dict, optional
- SNR¶
Signal-to-noise ratio (in dB). Default is infinity (no noise).
- Type:
float, optional
- H¶
Channel matrix. If None, a random complex Gaussian (CS, zero-mean, unit-variance) channel matrix is generated. Default is None.
- __init__()[source]¶
Initialize the SU-MIMO SVD digital communication system with the given parameters.
- set_CSI(SNR=None, H=None)[source]¶
Set the channel state information (CSI) of the SU-MIMO SVD digital communication system. Also, the resource allocation at the transmitter and receiver is updated accordingly, so no invalid configurations remain.
If no new values are provided, the current values are kept.
- reset_CSI(SNR=None, H=None)[source]¶
Reset the channel state information (CSI) of the SU-MIMO SVD digital communication system. Also, the resource allocation at the transmitter and receiver is updated accordingly, so no invalid configurations remain.
If no new value is provided, the default initialization values are used. For the SNR value, the default is infinity (no noise). For the channel matrix, the default is a random i.i.d. complex circularly-symmetric Gaussian (zero mean, unit variance) MIMO channel.
- set_RAS(RAS)[source]¶
Set the resource allocation strategy of the SU-MIMO SVD digital communication system. Also, the resource allocation at the transmitter and receiver is updated accordingly, so no invalid configurations remain.
If no new value for a certain setting is provided, the current value for that setting is kept.
- Parameters:
RAS (dict) – Resource Allocation Strategy. See the documentation of resource_allocation() method in the Transmitter class for more details on these strategy settings.
- simulate(bitstream)[source]¶
Simulate the SU-MIMO SVD digital communication system for a given input bitstream. Return the reconstructed bitstream at the receiver.
If no capacity is available on the channel, the transmission fails and None is returned.
- Parameters:
bitstream (1D numpy array (dtype: int, length: N_bits)) – Input - The bit stream.
- Returns:
bitstream_hat – Output - The reconstructed bit stream.
- Return type:
1D numpy array (dtype: int, length: N_bits)
- BERs_simulation(SNRs, num_errors=500, num_channels=100)[source]¶
Simulate the SU-MIMO SVD digital communication system over a range of SNR values until a specified number of bit errors are reached. Also, average over a specified number of channel realizations.
Return the simulated BERs for each SNR value, along with the average information bit rate and activation rate.
- Parameters:
SNRs (1D numpy array (dtype: float, length: N_SNRs)) – Input - The range of signal-to-noise ratio (SNR) values in dB to simulate over.
num_errors (int) – The minimum number of bit errors that must be reached for each SNR value before stopping the simulation.
num_channels (int) – The minimum number of different channel realizations to average over for each SNR value.
- Returns:
BERs (1D numpy array (dtype: float, length: N_SNRs)) – Output - The simulated Bit Error Rates (BERs) corresponding to each SNR value.
IBRs (1D numpy array (dtype: int, length: N_SNRs)) – Output - The simulated information bit rates (IBRs) (bits per symbol vector) corresponding to each SNR value.
ARs (1D numpy array (dtype: float, length: N_SNRs)) – Output - The simulated activation rates (ARs) of the channel corresponding to each SNR value. (Indicates the fraction of channel realizations for which enough capacity was available to transmit data.)
- BERs_eigenchs_simulation(SNRs, num_errors=500, num_channels=100)[source]¶
Simulate the SU-MIMO SVD digital communication system over a range of SNR values until a specified number of bit errors are reached. Also, average over a specified number of channel realizations.
Return the simulated BERs of each eigenchannel (!) for every SNR value.
- Parameters:
SNRs (1D numpy array (dtype: float, length: N_SNRs)) – Input - The range of signal-to-noise ratio (SNR) values in dB to simulate over.
num_errors (int) – The minimum number of bit errors that must be reached in at least one eigenchannel for each SNR value before stopping the simulation.
num_channels (int) – The minimum number of different channel realizations in at least one eigenchannel for each SNR value to average over.
- Returns:
BERs (2D numpy array (dtype: float, shape: (min(Nt, Nr), N_SNRs))) – Output - The simulated Bit Error Rates (BERs) of each eigenchannel, corresponding to each SNR value.
IBRs (2D numpy array (dtype: float, shape: (min(Nt, Nr), N_SNRs))) – Output - The simulated information bit rates (IBRs) (bits per symbol) of each eigenchannel, corresponding to each SNR value.
ARs (1D numpy array (dtype: float, length: N_SNRs)) – Output - The simulated activation rates (ARs) of every eigenchannel corresponding to each SNR value. (Indicates the fraction of channel realizations for which enough capacity was available to transmit data throught that eigenchannel.)
- BERs_analytical(SNRs, num_channels=100, settings={'eigenchannels': False, 'mode': 'approximation'})[source]¶
Calculate an analytical approximation or upper bound of the Bit Error Rate (BER) over a range of SNR values, for every eigenchannel. Average the result over a specified number of channel realizations.
Return the analytical BERs for each SNR value, along with the information bit rates and activation rates. Depending on the settings, either the BERs of every eigenchannel are returned separately, or the weighted average BER over all eigenchannels is returned.
- Parameters:
SNRs (1D numpy array (dtype: float, length: N_SNRs)) – The range of signal-to-noise ratio (SNR) values in dB to calculate the analytical BER over.
num_channels (int) – The number of different channel realizations to average over.
settings (dict) –
- The calculation settings.
- mode: (str)
’upper bound’ or ‘approximation’. For more information on the calculation method, see the documentation under the section ‘Bit Error Rate Calculation’.
- eigenchannels: (bool)
If True, return the BERs for every eigenchannel separately (outputs are 2D arrays). If False, return the weighted average BER over all eigenchannels (outputs are 1D arrays).
- Returns:
BERs (1D/2D numpy array (dtype: float, shape: (min(Nt, Nr), N_SNRs))) – Output - The analytical Bit Error Rates (BERs) corresponding to each SNR value, whether or not for every eigenchannel.
IBRs (1D/2D numpy array (dtype: float, shape: (min(Nt, Nr), N_SNRs))) – Output - The information bit rates (IBRs) (bits per symbol vector) corresponding to each SNR value, whether or not for every eigenchannel.
ARs (1D/2D numpy array (dtype: float, shape: (min(Nt, Nr), N_SNRs))) – Output - The activation rates (ARs) of the channel corresponding to each SNR value, whether or not for every eigenchannel. (Indicates the fraction of channel realizations for which enough capacity was available to transmit data.)
- plot_scatter_diagram(K=100)[source]¶
Plot a scatter diagram of the received symbol vectors.
Every distinct transmitted symbol is represented by a different color. Every used eigenchannel (antenna) has its own subplot. The amount of symbol vectors to consider is specified by K.
- Parameters:
K (int) – The amount of symbol vectors to consider for the scatter diagram.
- Returns:
plot – The created scatter diagram plot.
- Return type:
matplotlib figure
- print_simulation_example(bitstream, K=1)[source]¶
Print a step-by-step example of the transmitter, channel and receiver operations (see simulate() methods) for a given input bitstream. Only the first K data symbols vectors are considered for illustration.
- Parameters:
bitstream (1D numpy array (dtype: int, length: N_bits)) – Input - The bit stream.
K (int, optional) – The maximum number of symbol vectors to consider for illustration.
Notes
For demonstration purposes only.