Receiver (Detailed Documentation)¶
This page provides the complete documentation of the receiver component of the SU-MIMO digital communication system, in which the CSI is available at the receiver (and the transmitter).
- class Receiver(Nr, c_type, Pt=1.0, B=0.5, RAS={})[source]¶
- Nr¶
Number of receiving antennas.
- Type:
int
- c_type¶
Constellation type. (Choose between ‘PAM’, ‘PSK’, or ‘QAM’.)
- Type:
str
- Pt¶
Total available transmit power. Default is 1.0.
- Type:
float
- B¶
Bandwidth of the communication system. Default is 0.5.
- Type:
float
- RAS¶
The resource allocation strategy. We refer to the function description of resource_allocation() for more details on the meaning of these strategy settings.
- Type:
dict
- _Pi¶
The power allocation for each receive antenna for the current CSI.
- Type:
1D numpy array (dtype: float, length: Nr)
- _Ci¶
The capacity of each eigenchannel for the current CSI.
- Type:
1D numpy array (dtype: float, length: Nr)
- _Mi¶
The constellation size for each receive antenna for the current CSI.
- Type:
1D numpy array (dtype: int, length: Nr)
- __init__():
Initialize the receiver.
- __str__():
Return a string representation of the receiver object.
- __call__():
Allow the receiver object to be called as a function. When called, it executes the simulate() method.
- set_RAS(RAS)[source]¶
Update the resource allocation strategy (RAS) for the receiver.
- Parameters:
RAS (dict) – The resource allocation strategy. We refer to the function description of resource_allocation() for more details on the meaning of these settings.
- resource_allocation(CSIR, CCI=None)[source]¶
Determine and store the power allocation and bit allocation (constellation size) for each receive antenna, based on the given resource allocation strategy (RAS).
If a control channel is available, the resource allocation is acquired from the the control channel information (CCI). Otherwise, the resource allocation is calculated completely analogously as in the transmitter.
- There are three possible options for the power allocation:
‘optimal’: Execute the waterfilling algorithm to determine the optimal power allocation across the receive antennas. CSIR is required for this mode. (Default)
‘eigenbeamforming’: Allocate all power to the best eigenchannel. The waterfilling algorithm is omitted and CSIR is not required for this mode.
‘equal’: Equally divide the available transmit power across all receive antennas. The waterfilling algorithm is omitted and CSIR is not required for this mode.
- There are two possible options for the bit allocation:
‘adaptive’: Determine the constellation size based on the eigenchannel capacities. CSIR is required for this mode. An extra key ‘data rate’ must be provided in the dictionary to specify the fraction of the channel capacity that is utilized. (Default)
‘fixed’: Use a constant constellation size for all receive antennas. CSIR is not required for this mode. An extra key ‘constellation sizes’ must be provided in the dictionary to specify the constellation size on each receive antenna (in case of equal constellation sizes across all receive antennas, the value might be an integer instead of an array).
- Parameters:
CSIR (dict) – The channel state information at the receiver (SNR, H, U, S, Vh).
CCI (dict, optional) – The control channel information (Pi, Mi). Only required if a control channel is available.
- Returns:
Pi (1D numpy array (dtype: float, length: Nr)) – The power allocation for each receive antenna.
Mi (1D numpy array (dtype: int, length: Nr)) – The constellation size for each receive antenna.
- combiner(y, U)[source]¶
Combine the input signal (distorted data symbol vectors) using the left singular vectors of the channel matrix H.
- Parameters:
- Returns:
y_tilda – Output - combined symbol vectors.
- Return type:
2D numpy array (dtype: complex, shape: (Nr, N_symbols))
- power_deallocator(y_tilda, S)[source]¶
Deallocate the power from the scaled decision variables using the singular values of the channel matrix H and the allocated power on each antenna.
- Parameters:
y_tilda (2D numpy array (dtype: complex, shape: (Nr, N_symbols))) – Input - combined symbol vectors.
S (1D numpy array (dtype: float, length=rank_H)) – The singular values of the channel matrix H.
- Returns:
u – Output - decision variable vectors.
- Return type:
2D numpy array (dtype: complex, shape: (Nr, N_symbols))
- detector(u)[source]¶
Convert the decision variable vectors (distorted (equalized & combined) data symbol vectors) into the most probable (minimum distance (MD) detection) transmitted data symbol vectors according to the specified modulation constellation for each transmit antenna.
- demapper(a_hat)[source]¶
Convert the detected data symbol vectors into the corresponding bit vectors according to the specified modulation constellation. It performs the inverse operation of the mapper in the transmitter.
- Parameters:
a_hat (2D numpy array (dtype: complex, shape: (Nr, N_symbols))) – Input - detected data symbol vectors.
- Returns:
b_hat – Output - reconstructed bit vectors.
- Return type:
list of 1D numpy arrays (dtype: int, length: N_symbols * log2(Mi[rx_antenna]))
- bit_deallocator(b_hat)[source]¶
Combine the reconstructed bit vectors to create the output bitstream. It performs the inverse operation of the bit_allocator in the transmitter.
- Parameters:
bits_hat (list of 1D numpy arrays (dtype: int, length: N_symbols * log2(Mi[rx_antenna]))) – Input - reconstructed bit vectors.
- Returns:
bitstream_hat – Output - reconstructed bitstream.
- Return type:
1D numpy array (dtype: int, length: Nr * num_symbols * log2(Mi[rx_antenna]))
- simulate(y, CSI, CCI=None)[source]¶
Simulate the receiver operations:
Get the channel state information.
[resource_allocation] Determine and store power allocation and constellation size for each receive antenna, based on the given control channel information or resource allocation strategy.
[combiner] Combine the received symbol vectors using the left singular vectors of the channel matrix H.
[power_deallocator] Deallocate the power from the scaled decision variables.
[detector] Convert the decision variable vectors into the most probable data symbol vectors.
[demapper] Convert the reconstructed data symbol vectors into the corresponding bit vectors according to the specified modulation constellation.
[bit deallocator] Combine the reconstructed bit vectors to create the output bitstream.
Return the output bitstream.
- Parameters:
y (2D numpy array (dtype: complex, shape: (Nr, N_symbols))) – Input - received signal.
CSI (dict) – The channel state information. - SNR: The signal-to-noise ratio in dB. (float) - H : The channel matrix. (2D numpy array, dtype: complex, shape: (Nr, Nt)). - U : The left singular vectors of H. (2D numpy array, dtype: complex, shape: (Nr, Nr)). - S : The singular values of H. (1D numpy array, dtype: float, length: Rank(H)). - Vh : The right singular vectors of H. (2D numpy array, dtype: complex, shape: (Nt, Nt)).
CCI (dict, optional) – The control channel information. - Pi : The power allocation for each receive antenna. (1D numpy array, dtype: float) - Mi : The constellation size for each receive antenna. (1D numpy array, dtype: int)
- Returns:
bitstream_hat – Output - reconstructed bitstream.
- Return type:
1D numpy array (dtype: int, length: Nr * N_symbols * log2(Mi[rx_antenna]))
- print_simulation_example(y, CSI, CCI, K=1)[source]¶
Print a step-by-step example of the receiver operations (see simulate() method) for given input signal y, and channel state information (CSI). Only the first K data symbols vectors are considered.
- Parameters:
y (2D numpy array (dtype: complex, shape: (Nr, N_symbols))) – Input - received signal.
CSI (dict) – The channel state information (SNR, H, U, S, Vh).
CCI (dict) – The control channel information (Pi, Ci, Mi).
K (int, optional) – Number of data symbol vectors to consider in the illustration. Default is 1.
Notes
For demonstration purposes only.