Channel (Detailed Documentation)

This page provides a complete documentation of the channel component of the SU-MIMO digital communication system.

class Channel(Nt, Nr, SNR=None, H=None)[source]
Nt

The number of transmitting antennas.

Type:

int

Nr

The number of receiving antennas.

Type:

int

SNR

The signal-to-noise ratio (SNR) in dB.

Type:

float

H

The MIMO channel matrix (shape: Nr x Nt).

Type:

2D numpy array (dtype: complex)

U

The left singular vectors of the channel matrix H (shape: Nr x Nr).

Type:

2D numpy array (dtype: complex)

S

The singular values of the channel matrix H (shape: (Rank(H),)).

Type:

1D numpy array (dtype: float)

Vh

The right singular vectors of the channel matrix H (shape: Nt x Nt).

Type:

2D numpy array (dtype: complex)

__init__()[source]

Initialize the channel object.

__str__()[source]

Return a string representation of the channel object.

__call__()[source]

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

get_CSI()[source]

Get the current channel state information (CSI), in terms of the SNR, the channel matrix H and its SVD (U, S, Vh).

Returns:

CSI – The current channel state information (CSI). - SNR : the signal-to-noise ratio (SNR) in dB. (float) - H : the MIMO channel matrix. (2D numpy array, dtype: complex, shape: (Nr, Nt)) - U : the left singular vectors of the channel matrix H. (2D numpy array, dtype: complex, shape: (Nr, Nr)) - S : the singular values of the channel matrix H. (1D numpy array, dtype: float, shape: (Rank(H),)) - Vh : the right singular vectors of the channel matrix H. (2D numpy array, dtype: complex, shape: (Nt, Nt))

Return type:

dict

set_CSI(SNR=None, H=None)[source]

Set the SNR value and the channel matrix. Compute the singular-value-decomposition (SVD) of the channel matrix and store it.

If no new value is provided, the old value is left unchanged.

Parameters:
  • SNR (float, optional) – The signal-to-noise ratio (SNR) in dB.

  • H (2D numpy array (dtype: complex, shape: (Nr, Nt)), optional) – The channel matrix.

reset_CSI(SNR=None, H=None)[source]

Reset the SNR value and the channel matrix. Compute the singular-value-decomposition (SVD) of the channel matrix and store it.

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.

Parameters:
  • SNR (float, optional) – The signal-to-noise ratio (SNR) in dB.

  • H (2D numpy array (dtype: complex, shape: (Nr, Nt)), optional) – The channel matrix.

generate_noise(x)[source]

Generate complex proper, circularly-symmetric additive white Gaussian noise (AWGN) vectors (w[k]) for every transmitted symbol vector, based on the current SNR of the channel.

Parameters:

x (2D numpy array (dtype: complex, shape=(Nt, N_symbols))) – The input signal.

Returns:

noise – The generated noise vectors. Shape: (Nr, N_symbols)

Return type:

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

simulate(x)[source]

Simulate the channel operations:

  1. Transmit the precoded symbols through the MIMO channel. This is modeled as a matrix multiplication between the channel matrix H and the precoded symbols.

  2. Add complex proper, circularly-symmetric additive white Gaussian noise (AWGN) to the received symbols, based on the current SNR of the channel.

Parameters:

x (2D numpy array (dtype: complex, shape=(Nt, N_symbols))) – The input signal.

Returns:

y – The output signal.

Return type:

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

print_simulation_example(x, K=1)[source]

Print a step-by-step example of the channel operations (see simulate() method) for a given input signal x. Only the first K symbol vectors are considered for illustration.

Parameters:
  • x (2D numpy array (dtype: complex, shape=(Nt, N_symbols))) – The input signal.

  • K (int, optional) – The maximum number of symbol vectors to consider for illustration.

Returns:

y – The output signal.

Return type:

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

Notes

For demonstration purposes only.