Channel State Information

Inheritance diagram of hermespy.core.channel.ChannelStateInformation

Channel state information is HermesPy’s representation of the information describing a wireless propagation channel between two devices and their respective antenna arrays.

class ChannelStateInformation(state_format, state=None, num_delay_taps=None, num_frequency_bins=None)[source]

Bases: HDFSerializable

State of a single wireless link between a transmitting and receiving device.

__state_format

The current format of the channel state information. The format may change depending on the most recent format requests.

Type:

ChannelStateFormat

__state

The current channel state. A numpy tensor of dimension num_receive_streams`x`num_transmit_streams`x`num_samples`x`state_information.

If the state is currently in the format impulse response, num_samples is the time domain of the channel state and state_information the delay taps.

If the state is currently in frequency selectivity format, num_samples discrete frequency domain bins and state_information is of length one, containing the respective Fourier weights.

Type:

numpy.ndarray

__num_delay_taps

Number of delay taps in impulse-response mode. Recovers the 4th matrix dimension during conversions.

Type:

int

__num_frequency_bins

Number of discrete frequency bins in frequency-selectivity mode. Recovers the 4th matrix dimension during conversions.

Type:

int

Channel State Information object initialization.

Parameters:
  • state_format (ChannelStateFormat) – Format of the state from which to initialize the channel state information.

  • state (numpy.ndarray | sparse.SparseArray, optional) – Channel state matrix. A numpy tensor of dimension num_receive_streams`x`num_transmit_streams`x`num_samples`x`state_information.

  • num_delay_taps (int, optional) – Number of delay taps in impulse-response mode.

  • num_frequency_bins (int) – Number of discrete frequency bins in frequency-selectivity mode..

Raises:

ValueError – If state dimensions are invalid.

static Ideal(num_samples, num_receive_streams=1, num_transmit_streams=1)[source]

Initialize an ideal channel state.

Parameters:
  • num_samples (int) – Number of timestamps at which the channel state has been sampled.

  • num_receive_streams (int, optional) – Number of emerging data streams after channel propagation.

  • num_transmit_streams (int, optional) – Number of data streams feeding into the channel before propagation.

Returns:

Ideal channel state information of a non-distorting channel.

Return type:

ChannelStateInformation

static concatenate(elements, dimension)[source]
Return type:

ChannelStateInformation

dense_state()[source]

Return the channel state in dense format.

Note that this method will convert the channel state to dense format if it is currently in sparse format. This operation may be computationally expensive and should be avoided if possible.

Returns: The channel state tensor in dense format.

Return type:

ndarray

plot()[source]

Visualize the internal channel state information.

Plots the absolute values of all channel state weights.

Return type:

None

propagate(signal)[source]

Propagate a single signal model over this channel state information.

This method should generally be avoided, since it’s computationally costly. Instead, whenever there is access to a ChannelRealization, ChannelRealization.propagate() should always be preferred.

Parameters:

signal (Signal) – Signal model to be propagated.

Return type:

Signal

Returns: Propagated signal model.

received_streams()[source]

Iterate over the received streams slices within this channel state.

Returns:

Generator.

Return type:

Generator

reciprocal()[source]

Compute the reciprocal channel state.

Returns: The reciprocal channel state information.

Return type:

ChannelStateInformation

samples()[source]

Iterate over the sample slices within this channel state.

Returns:

Generator.

Return type:

Generator

set_state(state_format, state=None, num_delay_taps=None, num_frequency_bins=None)[source]

Set a new channel state.

Parameters:
  • state_format (ChannelStateFormat) – Format of the state from which to initialize the channel state information.

  • state (numpy.ndarray | SparseArray, optional) – Channel state matrix. A numpy tensor of dimension num_receive_streams`x`num_transmit_streams`x`num_samples`x`state_information.

  • num_delay_taps (int, optional) – Number of delay taps.

  • num_frequency_bins (int, optional) – Number of discrete frequency bins.

Raises:

ValueError – If state dimensions are invalid.

Return type:

None

to_frequency_selectivity(num_bins=None)[source]

Access the channel state in frequency-domain.

May convert the internal state format via FFT.

Parameters:

num_bins (int, optional) – Number of discrete frequency bins. By default, this will be the number of time samples, i.e. a FFT without zero-padding will be performed.

Returns:

The current channel tensor of dimensions num_receive_streams`x`num_transmit_streams`x`num_samples`x`num_frequency_bins.

Return type:

ChannelStateInformation

to_impulse_response()[source]

Access the channel state in time-domain.

May convert the internal state format via FFT.

Returns:

The current channel tensor of dimensions num_receive_streams`x`num_transmit_streams`x`num_samples`x`num_delay_taps.

Return type:

ChannelStateInformation

property linear: SparseArray

Convert the channel state to a linear transformation tensor.

Returns:

Sparse linear transformation tensor of dimension N_Rx x N_Tx x N_out x N_in.

property num_delay_taps: int

Number of taps within the delay response of the channel state.

Returns:

Number of taps.

Return type:

int

property num_receive_streams: int

Number of receive streams within this channel state.

Returns:

Number of receive streams.

Return type:

int

property num_samples: int

Number of time-domain samples within this channel state.

Returns:

Number of samples.

Return type:

int

property num_symbols: int

Number of symbols considered within this channel state.

Returns:

Number of symbols.

Return type:

int

property num_transmit_streams: int

Number of transmit streams within this channel state.

Returns:

Number of transmit streams.

Return type:

int

property state: ndarray | SparseArray

Current channel state tensor.

Returns:

The current channel state tensor.

Return type:

np.ndarray

property state_format: ChannelStateFormat

Current channel state format.

Returns:

The current channel state format.

Return type:

ChannelStateFormat

class ChannelStateFormat(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Format flag for wireless transmission link states.

FREQUENCY_SELECTIVITY = 1
IMPULSE_RESPONSE = 0
class ChannelStateDimension(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Dimension selection of channel state information.

INFORMATION = 3
RECEIVE_STREAMS = 0
SAMPLES = 2
TRANSMIT_STREAMS = 1