kaira.modulations.BaseModulator

Inheritance diagram of BaseModulator

Inheritance diagram for BaseModulator

class kaira.modulations.BaseModulator(bits_per_symbol: int | None = None, *args, **kwargs)[source]

Bases: Module, ABC

Abstract base class for all modulators.

A modulator maps bit sequences to complex symbols according to a specific modulation scheme.

constellation

Complex-valued tensor of constellation points

Methods

__init__

Initialize the modulator.

forward

Modulate bits to symbols.

plot_constellation

Plot the constellation diagram.

reset_state

Reset any stateful components.

Attributes

bits_per_symbol

Number of bits per symbol.

Examples using kaira.modulations.BaseModulator

Fading Channels in Wireless Communications

Fading Channels in Wireless Communications

Nonlinear Channel Distortion Effects

Nonlinear Channel Distortion Effects

Phase Noise Effects on Signal Constellations

Phase Noise Effects on Signal Constellations

Rician Fading vs Rayleigh Fading Channels

Rician Fading vs Rayleigh Fading Channels

Modulation Schemes Comparison

Modulation Schemes Comparison

Differential Phase-Shift Keying (DPSK)

Differential Phase-Shift Keying (DPSK)

Higher-Order PSK Modulation

Higher-Order PSK Modulation

Higher-Order QAM Modulation

Higher-Order QAM Modulation

Modulation Schemes for Digital Communication Systems

Modulation Schemes for Digital Communication Systems

Offset QPSK Modulation

Offset QPSK Modulation

Pulse Amplitude Modulation (PAM)

Pulse Amplitude Modulation (PAM)

π/4-QPSK Modulation

π/4-QPSK Modulation

Phase-Shift Keying (PSK) Modulation

Phase-Shift Keying (PSK) Modulation

Quadrature Amplitude Modulation (QAM)

Quadrature Amplitude Modulation (QAM)

Signal and Error Rate Metrics

Signal and Error Rate Metrics

Channel Capacity Analysis with Kaira

Channel Capacity Analysis with Kaira
__init__(bits_per_symbol: int | None = None, *args, **kwargs) None[source]

Initialize the modulator.

Parameters:
  • bits_per_symbol – Number of bits to encode in each symbol

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

property bits_per_symbol: int

Number of bits per symbol.

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

Modulate bits to symbols.

Parameters:
  • x – Input tensor of bits with shape (…, K*N), where K is bits_per_symbol

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

Returns:

Modulated symbols with shape (…, N)

plot_constellation(**kwargs)[source]

Plot the constellation diagram.

Parameters:

**kwargs – Additional arguments for plotting

Returns:

Matplotlib figure object

reset_state() None[source]

Reset any stateful components.

For modulators with memory (like differential schemes).