kaira.modulations.OQPSKModulator

Inheritance diagram of OQPSKModulator

Inheritance diagram for OQPSKModulator

class kaira.modulations.OQPSKModulator(normalize: bool = True, *args, **kwargs)[source]

Bases: BaseModulator

Offset Quadrature Phase-Shift Keying (OQPSK) modulator.

Similar to QPSK but with a half-symbol delay in the quadrature component, which results in only single-bit transitions and improved spectral properties.

Methods

__init__

Initialize the OQPSK modulator.

forward

Modulate bit pairs to OQPSK symbols.

plot_constellation

Plot the OQPSK constellation diagram.

reset_state

Reset internal state (delayed quadrature value).

Attributes

bits_per_symbol

Number of bits per symbol.

constellation

bit_patterns

constellation: Tensor
bit_patterns: Tensor
__init__(normalize: bool = True, *args, **kwargs) None[source]

Initialize the OQPSK modulator.

Parameters:
  • normalize – If True, normalize constellation to unit energy

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

forward(x: Tensor, *args, **kwargs) Tensor[source]

Modulate bit pairs to OQPSK symbols.

Parameters:
  • x – Input tensor of bits with shape (…, 2*N)

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

Returns:

Complex tensor of OQPSK symbols with shape (…, N)

Note

For simplicity, this implementation models the offset by applying the delay at the symbol level rather than at the pulse shaping level, which would be done in a real system.

reset_state() None[source]

Reset internal state (delayed quadrature value).

plot_constellation(**kwargs) Figure[source]

Plot the OQPSK constellation diagram.

Parameters:

**kwargs – Additional arguments passed to plot_constellation

Returns:

Matplotlib figure object

property bits_per_symbol: int

Number of bits per symbol.