Transmitter (Detailed Documentation)

This page provides the complete documentation of the transmitter component of the SU-MIMO digital communication system, in which the CSI is available at the transmitter (and the receiver).

class Transmitter(Nt, c_type, Pt=1.0, B=0.5, RAS={})[source]
Nt

Number of transmit antennas.

Type:

int

c_type

Constellation type. (Choose between ‘PAM’, ‘PSK’, or ‘QAM’)

Type:

str

Pt

Total available transmit power in Watt. Default is 1.0 W.

Type:

float, optional

B

Bandwidth of the communication system in Hertz. Default is 0.5 Hz.

Type:

float, optional

RAS

The resource allocation strategy. For more details on the meaning of these strategy settings, refer to the function description of resource_allocation().

Type:

dict

_Pi

The power allocation for each transmit antenna for the current CSIT.

Type:

1D numpy array (dtype: float, length: Nt)

_Ci

The capacity of each eigenchannel for the current CSIT.

Type:

1D numpy array (dtype: float, length: Nt)

_Mi

The constellation size for each transmit antenna for the current CSIT.

Type:

1D numpy array (dtype: int, length: Nt)

__init__()[source]

Initialize the transmitter parameters.

__str__()[source]

Return a string representation of the transmitter object.

__call__()[source]

Allow the transmitter object to be called as a function. When called, it executes the simulate() method.

get_CCI()[source]

This function represents a control channel between the transmitter and receiver. Return the power allocation and bit allocation (constellation sizes) of each transmit antenna, for the current CSIT, if a control channel is available.

Returns:

CCI – The current channel capacity information (CCI). - Pi: The power allocation for each used eigenchannel. - Mi: The constellation size for each used eigenchannel.

Return type:

dict

set_RAS(RAS)[source]

Update the resource allocation strategy (RAS) of the transmitter.

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(CSIT)[source]

Determine and store the power allocation and bit allocation (constellation size) for each transmit antenna, based on the given resource allocation strategy (RAS).

There are three possible options for the power allocation:
  1. ‘optimal’: Execute the waterfilling algorithm to determine the optimal power allocation across the transmit antennas. CSIT is required for this mode. (Default)

  2. ‘eigenbeamforming’: Allocate all power to the best eigenchannel. The waterfilling algorithm is omitted and CSIT is not required for this mode.

  3. ‘equal’: Equally divide the available transmit power across all transmit antennas. The waterfilling algorithm is omitted and CSIT is not required for this mode.

There are two possible options for the bit allocation:
  1. ‘adaptive’: Determine the constellation size based on the eigenchannel capacities. CSIT 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)

  2. ‘fixed’: Use a constant constellation size for all transmit antennas. CSIT is not required for this mode. An extra key ‘constellation sizes’ must be provided in the dictionary to specify the constellation size on each transmit antenna (in case of equal constellation sizes across all transmit antennas, the value might be an integer instead of an array).

Parameters:

CSIT (dict) – The channel state information at the transmitter (SNR, H, U, S, Vh).

Returns:

  • Pi (1D numpy array (dtype: float, length: Nt)) – The power allocation for each transmit antenna.

  • Mi (1D numpy array (dtype: int, length: Nt)) – The constellation size for each transmit antenna.

bit_allocator(bitstream)[source]

Allocate the input bitstream across the transmit antennas based on the calculated constellation size for each antenna.

Every antenna will have to send an equal amount of data symbols. If the number of bits in the bitstream does not perfectly align with an an equal amount of symbols per antenna, it is padded with zeros. If zero power is allocated to an eigenchannel (or thus the used capacity of that eigenchannel equals zero), no bits will be allocated to that eigenchannel.

Parameters:

bitstream (1D numpy array (dtype: int, length: N_bits)) – Input - bitstream.

Returns:

b – Output - bit vectors.

Return type:

list of 1D numpy arrays (dtype: int, length: N_symbols * log2(Mi[tx_antenna]))

mapper(b)[source]

Convert bit vectors into the corresponding data symbol vectors according to the specified modulation constellation for each transmit antenna.

Parameters:

b (list of 1D numpy arrays (dtype: int, length: N_symbols * log2(Mi[tx_antenna]))) – Input - bit vectors.

Returns:

a – Output - data symbol vectors.

Return type:

2D numpy array (dtype: complex, shape: (Nt, N_symbols))

power_allocator(a)[source]

Allocate power across the transmit antennas based on the calculated power for each antenna.

Parameters:

a (2D numpy array (dtype: complex, shape: (Nt, N_symbols))) – Input - data symbol vectors.

Returns:

x_tilda – Output - powered data symbol vectors.

Return type:

2D numpy array (dtype: complex, shape: (Nt, N_symbols))

precoder(x_tilda, Vh)[source]

Precode the powered data symbol vectors using the right singular vectors of the channel matrix H.

Parameters:
  • x_tilda (2D numpy array (dtype: complex, shape: (Nt, N_symbols))) – Input - powered data symbol vectors.

  • Vh (2D numpy array (dtype: complex, shape: (Nt, Nt))) – Right singular vectors of the channel matrix H.

Returns:

x – Output - precoded data symbol vectors.

Return type:

2D numpy array (dtype: complex, shape: (Nt, N_symbols))

simulate(bitstream, CSIT)[source]

Simulate the transmitter operations:

  1. Get the channel state information.

  2. [resource_allocation] Determine and store the power allocation and constellation size for each transmit antenna, based on the given resource allocation strategy (RAS).

  3. [bit_allocator] Divide the input bits across the transmit antennas.

  4. [mapper] Map the input bit sequence to the corresponding data symbol sequence for each transmit antenna.

  5. [power_allocator] Allocate power across the transmit antennas.

  6. [precoder] Precode the data symbols using the right singular vectors of the channel matrix H.

  7. Transmit the precoded symbols through the MIMO channel.

The output signal is ready to be transmitted through the MIMO channel.

Parameters:
  • bitstream (1D numpy array (dtype=int, length=N_bits)) – Input - bitstream.

  • CSIT (dict) – The channel state information at the transmitter. - 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)).

Returns:

x – Output - transmitted signal.

Return type:

2D numpy array (dtype: complex, shape: (Nt, N_symbols))

plot_bit_allocation(CSIT)[source]

Plot the bit allocation across the transmit antennas as determined by the resource allocation strategy. On the x-axis, the transmit antennas are shown. On the y-axis, the number of bits allocated to each transmit antenna is shown, as well as the capacity of the eigenchannel corresponding to each transmit antenna.

Parameters:

CSIT (dict) – The channel state information (SNR, H, U, S, Vh).

Returns:

fig, ax – The figure and axis objects of the plot.

Return type:

tuple

plot_power_allocation(CSIT)[source]

Plot the power allocation across the transmit antennas, as determined by the resource allocation strategy. On the x-axis, the transmit antennas are shown. On the y-axis, the inverse channel gain is shown in grey and the amount of power allocated to each transmit antenna is shown in blue.

Parameters:

CSIT (dict) – The channel state information (SNR, H, U, S, Vh).

Returns:

fig, ax – The figure and axis objects of the plot.

Return type:

tuple

print_simulation_example(bitstream, CSIT, K=1) None[source]

Print a step-by-step example of the transmitter operations (see simulate() method) for given input bits and CSIT. Only the first K data symbols vectors are considered.

Parameters:
  • bitstream (1D numpy array (dtype: int, length: N_bits)) – The input bitstream.

  • CSIT (dict) – The channel state information (SNR, H, U, S, Vh).

  • K (int, optional) – The maximum number of data symbol vectors to consider in the example.

Returns:

x – The output precoded data symbol vectors (first K vectors only).

Return type:

2D numpy array (dtype=complex, shape=(Nt, K))

Notes

For demonstration purposes only.