commpy.channels.MIMOFlatChannel

class MIMOFlatChannel(nb_tx, nb_rx, noise_std=None, fading_param=None)

Constructs a MIMO channel with a flat fading based on the Kronecker model. The channel coefficient are normalized i.e. the mean magnitude is 1.

Parameters:
  • nb_tx (int >= 1) – Number of Tx antennas.
  • nb_rx (int >= 1) – Number of Rx antennas.
  • noise_std (float, optional) – Noise standard deviation. Default value is None and then the value must set later.
  • fading_param (tuple of 3 floats, optional) – Parameters of the fading. The complete tuple must be set each time. Default value is (zeros((nb_rx, nb_tx)), identity(nb_tx), identity(nb_rx)) i.e. Rayleigh fading.
fading_param

Parameters of the fading. Raise ValueError when sets with value that would lead to a non-normalized channel.

  • fading_param[0] refers to the mean of the channel gain (Line Of Sight component).
  • fading_param[1] refers to the transmit-side spatial correlation matrix of the channel.
  • fading_param[2] refers to the receive-side spatial correlation matrix of the channel.

Classical fadings:

  • (zeros((nb_rx, nb_tx)), identity(nb_tx), identity(nb_rx)): Rayleigh fading.
  • Others: rician fading.
Type:tuple of 2 floats
noise_std

Noise standard deviation. None is the value has not been set yet.

Type:float
isComplex

True if the channel is complex, False if not. The value is set together with fading_param based on the type of fading_param[0].

Type:Boolean, Read-only
k_factor

Fading k-factor, the power ratio between LOS and NLOS.

Type:positive float, Read-only
nb_tx

Number of Tx antennas.

Type:int
nb_rx

Number of Rx antennas.

Type:int
noises

Last noise generated. None if no noise has been generated yet. noises[i] is the noise vector of size nb_rx for the i-th message vector.

Type:2D ndarray
channel_gains

Last channels gains generated. None if no channels has been generated yet. channel_gains[i] is the channel matrix of size (nb_rx x nb_tx) for the i-th message vector.

Type:2D ndarray
unnoisy_output

Last transmitted message without noise. None if no message has been propageted yet. unnoisy_output[i] is the transmitted message without noise of size nb_rx for the i-th message vector.

Type:1D ndarray
Raises:

ValueError – If the fading parameters would lead to a non-normalized channel. The condition is \(NLOS + LOS = nb_{tx} * nb_{rx}\) where

  • \(NLOS = tr(param[1]^T \otimes param[2])\)
  • \(LOS = \sum|param[0]|^2\)
__init__(nb_tx, nb_rx, noise_std=None, fading_param=None)

x.__init__(…) initializes x; see help(type(x)) for signature

Methods

__init__(nb_tx, nb_rx[, noise_std, fading_param]) x.__init__(…) initializes x; see help(type(x)) for signature
generate_noises(dims) Generates the white gaussian noise with the right standard deviation and saves it.
propagate(msg) Propagates a message through the channel.
set_SNR_dB(SNR_dB[, code_rate, Es]) Sets the the noise standard deviation based on SNR expressed in dB.
set_SNR_lin(SNR_lin[, code_rate, Es]) Sets the the noise standard deviation based on SNR expressed in its linear form.

Attributes

fading_param Parameters of the fading (see class attribute for details).
isComplex Read-only - True if the channel is complex, False if not.
k_factor Read-only - Fading k-factor, the power ratio between LOS and NLOS