Channel State Information¶

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:
Serializable
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:
- __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.
- __num_delay_taps¶
Number of delay taps in impulse-response mode. Recovers the 4th matrix dimension during conversions.
- __num_frequency_bins¶
Number of discrete frequency bins in frequency-selectivity mode. Recovers the 4th matrix dimension during conversions.
Channel State Information object initialization.
- Parameters:
state_format (
ChannelStateFormat
) – Format of the state from which to initialize the channel state information.state (
ndarray
|SparseArray
) – 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
|None
) – Number of delay taps in impulse-response mode.num_frequency_bins (
int
|None
) – Number of discrete frequency bins in frequency-selectivity mode..
- Raises:
ValueError – If state dimensions are invalid.
- classmethod Deserialize(process)[source]¶
Deserialize an object’s state.
Objects cannot be deserialized directly, instead a
Factory
must be instructed to carry out the deserialization process.- Parameters:
process (
DeserializationProcess
) – The current stage of the deserialization process. This object is generated by theFactory
and provides an interface to deserialization methods supporting multiple backends.- Return type:
- Returns:
The deserialized object.
- static Ideal(num_samples, num_receive_streams=1, num_transmit_streams=1)[source]¶
Initialize an ideal channel state.
- Parameters:
- Return type:
Returns: Ideal channel state information of a non-distorting channel.
- 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.
Returns: Propagated signal model.
- received_streams()[source]¶
Iterate over the received streams slices within this channel state.
Returns: Generator iterating over the received streams.
- Return type:
Generator
[ChannelStateInformation
,ChannelStateInformation
,None
]
- 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 iterating over the sample slices.
- Return type:
Generator
[ChannelStateInformation
,ChannelStateInformation
,None
]
- serialize(process)[source]¶
Serialize this object’s state.
Objects cannot be serialized directly, instead a
Factory
must be instructed to carry out the serialization process.- Parameters:
process (
SerializationProcess
) – The current stage of the serialization process. This object is generated by theFactory
and provides an interface to serialization methods supporting multiple backends.- Return type:
- 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 (
ndarray
|SparseArray
) – Channel state matrix. A numpy tensor of dimension num_receive_streams`x`num_transmit_streams`x`num_samples`x`state_information.num_frequency_bins (
int
|None
) – 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
|None
) – 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.- Return type:
- Returns:
The current channel tensor of dimensions num_receive_streams`x`num_transmit_streams`x`num_samples`x`num_frequency_bins.
- to_impulse_response()[source]¶
Access the channel state in time-domain.
May convert the internal state format via FFT.
- Return type:
- Returns:
The current channel tensor of dimensions num_receive_streams`x`num_transmit_streams`x`num_samples`x`num_delay_taps.
- 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.
- property num_receive_streams: int¶
Number of receive streams within this channel state.
Returns: Number of receive streams.
- property num_samples: int¶
Number of time-domain samples within this channel state.
Returns: Number of samples.
- property num_symbols: int¶
Number of symbols considered within this channel state.
Returns: Number of symbols.
- property num_transmit_streams: int¶
Number of transmit streams within this channel state.
Returns: Number of transmit streams.
- property state: ndarray | SparseArray¶
Current channel state tensor.
- property state_format: ChannelStateFormat¶
Current channel state format.
Returns: The current channel state format.