PrecodedChannel#
- class sionna.phy.ofdm.PrecodedChannel(resource_grid: sionna.phy.ofdm.resource_grid.ResourceGrid, stream_management: sionna.phy.mimo.stream_management.StreamManagement, precision: Literal['single', 'double'] | None = None, device: str | None = None, **kwargs)[source]#
Bases:
sionna.phy.block.BlockAbstract base class to compute the effective channel after precoding.
Its output can be used to compute the
PostEqualizationSINR.Let \(\mathbf{H}_{i,j}\in\mathbb{C}^{\text{num\_rx\_ant}\times\text{num\_tx\_ant}}\) be the channel matrix between transmitter \(j\) and receiver \(i\) and let \(\mathbf{G}_{j}\in\mathbb{C}^{\text{num\_tx\_ant}\times\text{num\_streams\_per\_tx}}\) be the precoding matrix of transmitter \(j\).
The effective channel \(\widetilde{\mathbf{H}}_{i,j}\in\mathbb{C}^{\text{num\_rx\_ant}\times\text{num\_streams\_per\_tx}}\) after precoding is given by
(60)#\[\widetilde{\mathbf{H}}_{i,j} = \mathbf{H}_{i,j}\mathbf{G}_{j} \mathop{\text{diag}}(\sqrt{p_{j,1}},...,\sqrt{p_{j,\text{num\_streams\_per\_tx}}})\]where \(p_{j,s}\) is the transmit power of stream \(s\) of transmitter \(j\).
- Parameters:
resource_grid (sionna.phy.ofdm.ResourceGrid) – ResourceGrid to be used
stream_management (sionna.phy.mimo.StreamManagement) – StreamManagement to be used
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:
h – [batch_size, num_rx, num_rx_ant, num_tx, num_tx_ant, num_ofdm_symbols, fft_size], torch.complex. Actual channel realizations.
tx_power – [batch_size, num_tx, num_streams_per_tx, num_ofdm_symbols, fft_size] (or first n dims), torch.float. Power of each stream for each transmitter.
h_hat – None (default) | [batch_size, num_rx, num_rx_ant, num_tx, num_tx_ant, num_ofdm_symbols, fft_size], torch.complex. Channel knowledge based on which the precoding is computed. If set to None, the actual channel realizations are used.
- Outputs:
h_eff – [batch_size, num_rx, num_rx_ant, num_tx, num_streams_per_tx, num_ofdm_symbols, num_effective_subcarriers], torch.complex. The effective channel after precoding. Nulled subcarriers are automatically removed.
Methods
- get_desired_channels(h_hat: torch.Tensor) torch.Tensor[source]#
Get the desired channels for precoding.
- Parameters:
h_hat (torch.Tensor) – Channel knowledge with shape [batch_size, num_rx, num_rx_ant, num_tx, num_tx_ant, num_ofdm_symbols, fft_size]
- compute_effective_channel(h: torch.Tensor, g: torch.Tensor) torch.Tensor[source]#
Compute effective channel after precoding.
- Parameters:
h (torch.Tensor) – Actual channel realizations with shape [batch_size, num_rx, num_rx_ant, num_tx, num_tx_ant, num_ofdm_symbols, fft_size]
g (torch.Tensor) – Precoding matrix with shape [batch_size, num_tx, num_ofdm_symbols, fft_size, num_tx_ant, num_streams_per_tx]
- apply_tx_power(g: torch.Tensor, tx_power: torch.Tensor) torch.Tensor[source]#
Apply transmit power to precoding vectors.
- Parameters:
g (torch.Tensor) – Precoding vectors with shape [batch_size, num_tx, num_ofdm_symbols, fft_size, num_tx_ant, num_streams_per_tx]
tx_power (torch.Tensor) – Power of each stream for each transmitter with shape [batch_size, num_tx, num_streams_per_tx, num_ofdm_symbols, fft_size] (or first n dims)