Channel State Information¶
- 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 modem.
- __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:
np.ndarray
- __num_delay_taps¶
Number of delay taps in impulse-response mode. Recovers the 4th matrix dimension during conversions.
- Type:
- __num_frequency_bins¶
Number of discrete frequency bins in frequency-selectivity mode. Recovers the 4th matrix dimension during conversions.
- Type:
Channel State Information object initialization.
- Parameters:
state_format (ChannelStateFormat) – Format of the state from which to initialize the channel state information.
state (np.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 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:
- Returns:
Ideal channel state information of a non-distorting channel.
- Return type:
- 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:
- plot()[source]¶
Visualize the internal channel state information.
Plots the absolute values of all channel state weights.
- Return type:
- 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.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:
- 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 (np.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:
- 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:
- 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:
- 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:
- property num_receive_streams: int¶
Number of receive streams within this channel state.
- Returns:
Number of receive streams.
- Return type:
- property num_samples: int¶
Number of time-domain samples within this channel state.
- Returns:
Number of samples.
- Return type:
- property num_symbols: int¶
Number of symbols considered within this channel state.
- Returns:
Number of symbols.
- Return type:
- property num_transmit_streams: int¶
Number of transmit streams within this channel state.
- Returns:
Number of transmit streams.
- Return type:
- 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