kaira.constraints.utils.create_mimo_constraints

kaira.constraints.utils.create_mimo_constraints(num_antennas: int, uniform_power: float | None = None, max_papr: float | None = None, spectral_mask: Tensor | None = None, total_power: float | None = None) CompositeConstraint[source]

Create constraints commonly used in MIMO systems.

Configures constraints appropriate for Multiple-Input Multiple-Output (MIMO) systems, focusing on either maintaining equal power distribution across antennas or controlling total power across all antennas, while optionally controlling PAPR and spectral characteristics.

Parameters:
  • num_antennas (int) – Number of antennas in the MIMO system

  • uniform_power (float, optional) – Power per antenna in linear units. If None and total_power is provided, will use a total power constraint instead. Defaults to None.

  • max_papr (float, optional) – Maximum allowed PAPR in linear units (not dB). If None, no PAPR constraint is applied. Defaults to None.

  • spectral_mask (torch.Tensor, optional) – If provided, adds a spectral mask constraint. Defaults to None.

  • total_power (float, optional) – If provided, uses a total power constraint instead of per-antenna power constraints. This is useful when the total transmit power is limited, but power can be allocated flexibly across antennas. Defaults to None.

Returns:

Combined MIMO constraints ready to be applied to signals

Return type:

CompositeConstraint

Raises:

ValueError – If both uniform_power and total_power are None, or if both are provided

Example

>>> # Example with per-antenna power constraint
>>> mimo_constraints = create_mimo_constraints(
...     num_antennas=4, uniform_power=0.25, max_papr=4.0
... )
>>> # Example with total power constraint
>>> mimo_constraints = create_mimo_constraints(
...     num_antennas=4, total_power=1.0, max_papr=4.0
... )
>>> constrained_signal = mimo_constraints(input_signal)