PFSchedulerSUMIMO#

class sionna.sys.PFSchedulerSUMIMO(num_ut: int, num_freq_res: int, num_ofdm_sym: int, batch_size: List[int] | int | None = None, num_streams_per_ut: int = 1, beta: float = 0.98, precision: Literal['single', 'double'] | None = None, device: str | None = None)[source]#

Bases: sionna.phy.block.Block

Proportional fairness (PF) scheduler for single-user MIMO (SU-MIMO) systems.

Schedules users according to a proportional fairness (PF) metric in a single-user (SU) multiple-input multiple-output (MIMO) system, i.e., at most one user is scheduled per time-frequency resource.

Fixing the time slot \(t\), \(\tilde{R}_t(u,i)\) is the achievable rate for user \(u\) on the time-frequency resource \(i\) during the current slot. Let \(T_{t-1}(u)\) denote the throughput achieved by user \(u\) up to and including slot \(t-1\). Resource \(i\) is assigned to the user with the highest PF metric, as defined in [Jalali00]:

\[\operatorname{argmax}_{u} \frac{\tilde{R}_{t}(u,i)}{T_{t-1}(u)}.\]

All streams within a scheduled resource element are assigned to the selected user.

Let \(R_t(u)\) be the rate achieved by user \(u\) in slot \(t\). The throughput \(T\) by each user \(u\) is updated via geometric discounting:

\[T_t(u) = \beta \, T_{t-1}(u) + (1-\beta) \, R_t(u)\]

where \(\beta\in(0,1)\) is the discount factor.

Parameters:
  • num_ut (int) – Number of user terminals

  • num_freq_res (int) – Number of available frequency resources. A frequency resource is the smallest frequency unit that can be allocated to a user, typically a physical resource block (PRB).

  • num_ofdm_sym (int) – Number of OFDM symbols in a slot

  • batch_size (List[int] | int | None) – Batch size or shape. It can account for multiple sectors in which scheduling is performed simultaneously. If None, the batch size is set to [].

  • num_streams_per_ut (int) – Number of streams per user. Defaults to 1.

  • beta (float) – Discount factor for computing the time-averaged achieved rate. Must be within (0,1). Defaults to 0.98.

  • 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:
  • rate_last_slot – [batch_size, num_ut], torch.float. Rate achieved by each user in the last slot.

  • rate_achievable_curr_slot – [batch_size, num_ofdm_sym, num_freq_res, num_ut], torch.float. Achievable rate for each user across the OFDM grid in the current slot.

Outputs:

is_scheduled – [batch_size, num_ofdm_sym, num_freq_res, num_ut, num_streams_per_ut], torch.bool. Whether a user is scheduled for transmission for each available resource.

Examples

import torch
from sionna.sys import PFSchedulerSUMIMO

num_ut = 4
num_freq_res = 52
num_ofdm_sym = 14
batch_size = 10

# Create PF scheduler
scheduler = PFSchedulerSUMIMO(
    num_ut,
    num_freq_res,
    num_ofdm_sym,
    batch_size=batch_size
)

# Generate random achievable rates and last slot rates
rate_last_slot = torch.rand(batch_size, num_ut) * 100
rate_achievable_curr_slot = torch.rand(
    batch_size, num_ofdm_sym, num_freq_res, num_ut
) * 100

# Get scheduling decisions
is_scheduled = scheduler(rate_last_slot, rate_achievable_curr_slot)
print(is_scheduled.shape)
# torch.Size([10, 14, 52, 4, 1])

Attributes

property rate_achieved_past: torch.Tensor#

[batch_size, num_ut] (read-only) : \(\beta\)-discounted time-averaged achieved rate for each user

property pf_metric: torch.Tensor#

[batch_size, num_ofdm_sym, num_freq_res, num_ut] (read-only) : Proportional fairness (PF) metric in the last slot

property beta: float#

Get/set the discount factor for computing the time-averaged achieved rate. Must be within (0,1).