SingleLinkChannel#
- class sionna.phy.utils.SingleLinkChannel(num_bits_per_symbol: int | None, num_info_bits: int | None, target_coderate: float | None, precision: Literal['single', 'double'] | None = None, device: str | None = None)[source]#
Bases:
sionna.phy.block.BlockClass template for simulating single-link, i.e., single-carrier and single-stream, channels.
Used for generating BLER tables in
new_bler_table().- Parameters:
num_bits_per_symbol (int | None) – Number of bits per symbol, i.e., modulation order.
num_info_bits (int | None) – Number of information bits per code block.
target_coderate (float | None) – Target code rate, i.e., the target ratio between the information and the coded bits within a block.
precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None,
precisionis used.device (str | None) – Device for computation. If None,
deviceis used.
- Inputs:
batch_size – int. Size of the simulation batches.
ebno_db – float. Eb/No value in dB.
- Outputs:
bits – [
batch_size,num_info_bits], torch.int. Transmitted bits.bits_hat – [
batch_size,num_info_bits], torch.int. Decoded bits.
Examples
# Create a channel (subclass implementation required) channel = SingleLinkChannel( num_bits_per_symbol=4, num_info_bits=1024, target_coderate=0.5 ) # Call returns (bits, bits_hat) bits, bits_hat = channel(batch_size=100, ebno_db=5.0)
Attributes
Methods