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.Block

Class 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, precision is used.

  • device (str | None) – Device for computation. If None, device is used.

Inputs:
  • batch_sizeint. Size of the simulation batches.

  • ebno_dbfloat. 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

property num_bits_per_symbol: int | None#

Get/set the modulation order.

property num_info_bits: int | None#

Get/set the number of information bits per code block.

property target_coderate: float | None#

Get/set the target coderate.

property num_coded_bits: float | None#

Number of coded bits in a code block (read-only).

Methods

set_num_coded_bits() None[source]#

Compute the number of coded bits per code block.