CodedAWGNChannelNR#
- class sionna.phy.nr.utils.CodedAWGNChannelNR(num_bits_per_symbol: int | None = None, num_info_bits: int | None = None, target_coderate: float | None = None, num_iter_decoder: int = 20, cn_update_decoder: str = 'boxplus-phi', precision=None, device=None, **kwargs)[source]#
Bases:
sionna.phy.utils.misc.SingleLinkChannelSimulates a 5G-NR compliant single-link coded AWGN channel. Inherits from
SingleLinkChannel.- 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.
num_iter_decoder (int) – Number of decoder iterations. See
LDPC5GDecoderfor more details.cn_update_decoder (str) – Check node update rule. See
LDPC5GDecoderfor more details.precision – Precision for internal calculations. If None,
precisionis used.device – Device for computation. If None,
deviceis used.kwargs – Additional keyword arguments for
LDPC5GDecoder.
- 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.int32. Transmitted bits.bits_hat – [
batch_size,num_info_bits], torch.int32. Decoded bits.
Examples
from sionna.phy.nr.utils import CodedAWGNChannelNR channel = CodedAWGNChannelNR( num_bits_per_symbol=4, num_info_bits=1024, target_coderate=0.5 ) bits, bits_hat = channel(batch_size=100, ebno_db=5.0)