PUSCHTransmitter#
- class sionna.phy.nr.PUSCHTransmitter(pusch_configs: sionna.phy.nr.pusch_config.PUSCHConfig | List[sionna.phy.nr.pusch_config.PUSCHConfig], return_bits: bool = True, output_domain: str = 'freq', precision: str | None = None, verbose: bool = False, device: str | None = None, **kwargs)[source]#
Bases:
sionna.phy.block.BlockGenerates batches of 5G NR PUSCH slots for multiple transmitters.
This block generates batches of 5G NR PUSCH slots for multiple transmitters with random or provided payloads. Frequency- or time-domain outputs can be generated.
It combines multiple processing blocks into a single layer. Blocks with dashed lines are optional and depend on the configuration.
Information bits \(\mathbf{b}\) that are either randomly generated or provided as input are encoded into a transport block by the
TBEncoder. The encoded bits are then mapped to QAM constellation symbols by theMapper. TheLayerMappersplits the modulated symbols into different layers which are then mapped onto OFDM resource grids by theResourceGridMapper. If precoding is enabled in thePUSCHConfig, the resource grids are further precoded so that there is one for each transmitter and antenna port. Ifoutput_domainequals “freq”, these are the outputs \(\mathbf{x}\). Ifoutput_domainis chosen to be “time”, the resource grids are transformed into time-domain signals by theOFDMModulator.- Parameters:
pusch_configs (sionna.phy.nr.pusch_config.PUSCHConfig | List[sionna.phy.nr.pusch_config.PUSCHConfig]) – PUSCH configurations according to which the resource grid and pilot pattern will be created. One configuration is needed for each transmitter.
return_bits (bool) – If True, the block generates random information bits to be transmitted and returns them together with the transmit signal. Defaults to True.
output_domain (str) – Domain of the output. Must be “freq” (default) or “time”.
precision (str | None) – Precision used for internal calculations and outputs. If set to None,
precisionis used. Defaults to None.verbose (bool) – If True, additional parameters are printed during initialization. Defaults to False.
device (str | None) – Device for computation. Defaults to None.
One of:
- Inputs:
batch_size – int. Batch size of random transmit signals to be generated, if
return_bitsis True.b – [batch_size, num_tx, tb_size], torch.float. Information bits to be transmitted, if
return_bitsis False.
- Outputs:
x – [batch_size, num_tx, num_tx_ant, num_ofdm_symbols, fft_size], torch.complex or [batch_size, num_tx, num_tx_ant, num_time_samples], torch.complex. Transmit signal in either frequency or time domain, depending on
output_domain.b – [batch_size, num_tx, tb_size], torch.float. Transmitted information bits. Only returned if
return_bitsis True.
- Parameters:
pusch_configs (sionna.phy.nr.pusch_config.PUSCHConfig | List[sionna.phy.nr.pusch_config.PUSCHConfig])
return_bits (bool)
output_domain (str)
precision (str | None)
verbose (bool)
device (str | None)
Examples
>>> pusch_config = PUSCHConfig() >>> pusch_transmitter = PUSCHTransmitter(pusch_config) >>> x, b = pusch_transmitter(16) >>> print("Shape of x:", x.shape) Shape of x: torch.Size([16, 1, 1, 14, 48]) >>> print("Shape of b:", b.shape) Shape of b: torch.Size([16, 1, 1352])
Attributes
- property resource_grid: sionna.phy.ofdm.resource_grid.ResourceGrid#
OFDM resource grid underlying the PUSCH transmissions
- property pilot_pattern: sionna.phy.nr.pusch_pilot_pattern.PUSCHPilotPattern#
Aggregate pilot pattern of all transmitters
Methods