Waveforms

Communication waveforms are the central configuration option of Modems. They describe the signal processing steps required to generate base-band waveforms carrying information during transmission and, inversely, the signal processing steps required to estimate information from base-band signals during reception.

The following waveforms are currently supported:

Waveform

Synchronization

Channel Estimation

Channel Equalization

Root Raised Cosine

Yes

Yes

Yes

Raised Cosine

Yes

Yes

Yes

Rectangular

Yes

Yes

Yes

FMCW

Yes

Yes

Yes

OFDM

Yes

Yes

Yes

OCDM

Yes

Yes

Yes

OTFS

Yes

Yes

Yes

Chirp FSK

Yes

No

No

5GNR Slot

Yes

Yes

Yes

5GNR Subframe

Yes

Yes

Yes

5GNR Frame

Yes

Yes

Yes

class CommunicationWaveform(modulation_order=16, channel_estimation=None, channel_equalization=None, synchronization=None)[source]

Bases: ABC, Serializable

Abstract base class for all communication waveform descriptions.

Parameters:
  • modulation_order (int) – Order of modulation. Must be a non-negative power of two. By default, a modulation order of \(16\) is assumed.

  • channel_estimation (ChannelEstimation | None) – Channel estimation algorithm. If not specified, no channel estimation is performed, which implicitly assumes an ideal channel.

  • channel_equalization (ChannelEqualization | None) – Channel equalization algorithm. If not specified, no symbol equalization is performed.

  • synchronization (Synchronization | None) – Time-domain synchronization routine. If not specified, no synchronization is performed, which implicitly assumes a channel without delay.

bit_energy(bandwidth, oversampling_factor)[source]

Expected energy of a single data bit within the modulated baseband-signal.

Typically denoted by \(E_b\). Can be derived from the symbol_energy via the modulation order:

\[E_b = \frac{E_s}{\log_2(M)}\]

where \(M\) is the modulation order, i.e. the number of unique symbols.

Returns:

The expected bit energy.

Return type:

float

bits_per_frame(num_data_symbols=None)[source]

Number of bits required to generate a single data frame.

Parameters:

num_data_symbols (int | None) – Number of unique data symbols contained within the frame. If not specified, the waveform’s default number of data symbols will be assumed.

Return type:

int

Returns: Number of bits.

data_rate(num_data_symbols, bandwidth)[source]

Data rate theoretically achieved by this waveform configuration.

Parameters:
  • num_data_symbols (int) – Number of data symbols contained within the frame.

  • bandwidth (float) – Target bandwidth of the communication waveform in Hz.

Return type:

float

Returns: Bits per second.

abstract demodulate(signal, bandwidth, oversampling_factor)[source]

Demodulate a base-band signal stream to data symbols.

Parameters:
  • signal (ndarray) – Vector of complex-valued base-band samples of a single communication frame.

  • bandwidth (float) – Bandwidth of the communication waveform in Hz.

  • oversampling_factor (int) – Oversampling factor of the communication waveform.

Return type:

Symbols

Returns:

The demodulated communication symbols

equalize_symbols(symbols)[source]
Return type:

Symbols

estimate_channel(symbols, bandwidth, oversampling_factor, delay=0.0)[source]

Estimate the wireless channel of a received communication frame.

Wrapper around the channel estimation rountine assigned to this waveform via the channel_estimation property.

Parameters:
  • symbols (Symbols) – Demodulated communication symbols.

  • bandwidth (float) – Bandwidth of the communication waveform in Hz.

  • oversampling_factor (int) – Oversampling factor of the communication waveform.

  • delay (float) – The considered frame’s delay offset to the drop start in seconds.

Return type:

StatedSymbols

Returns:

The symbols and their respective channel states.

abstract frame_duration(bandwidth)[source]

Duration of a single communication frame in seconds.

Parameters:

bandwidth (float) – Target bandwidth of the communication waveform in Hz.

Returns:

Duration of a single communication frame in seconds.

Return type:

float

abstract map(data_bits)[source]

Map a stream of bits to data symbols.

Parameters:

data_bits (ndarray[tuple[int], dtype[uint8]]) – Vector containing a sequence of L hard data bits to be mapped onto data symbols.

Return type:

Symbols

Returns: Mapped data symbols.

abstract modulate(data_symbols, bandwidth, oversampling_factor)[source]

Modulate a stream of data symbols to a base-band signal containing a single data frame.

Parameters:
  • data_symbols (Symbols) – Singular stream of data symbols to be modulated by this waveform.

  • bandwidth (float) – Bandwidth of the communication waveform in Hz.

  • oversampling_factor (int) – Oversampling factor of the communication waveform.

Return type:

ndarray

Returns:

Samples of the modulated base-band signal.

abstract pick(placed_symbols)[source]

Pick the mapped symbols from the communicaton frame.

Additionally removes interleaved pilot symbols.

Parameters:

placed_symbols (StatedSymbols) – The placed symbols.

Return type:

StatedSymbols

Returns: The symbols with the mapped symbols picked from the frame.

abstract place(symbols)[source]

Place the mapped symbols within the communicaton frame.

Additionally interleaves pilot symbols.

Parameters:

symbols (Symbols) – The mapped symbols.

Return type:

Symbols

Returns: The symbols with the mapped symbols placed within the frame.

abstract samples_per_frame(bandwidth, oversampling_factor)[source]

Number of time-domain samples per processed communication frame.

Parameters:
  • bandwidth (float) – Bandwidth of the communication waveform in Hz.

  • oversampling_factor (int) – Oversampling factor of the communication waveform.

Note that the overall sampling rate is defined as bandwidth * oversampling_factor.

Returns:

Number of samples per frame.

Return type:

int

serialize(process)[source]

Serialize this object’s state.

Objects cannot be serialized directly, instead a Factory must be instructed to carry out the serialization process.

Parameters:

process (SerializationProcess) – The current stage of the serialization process. This object is generated by the Factory and provides an interface to serialization methods supporting multiple backends.

Return type:

None

abstract symbol_energy(bandwidth, oversampling_factor)[source]

Expected energy of a single communication symbol within the modulated baseband-signal.

Parameters:
  • bandwidth (float) – Bandwidth of the communication waveform in Hz.

  • oversampling_factor (int) – Oversampling factor of the communication waveform.

Typically denoted by \(E_s\). HermesPy defines the symbol energy as the expected sum of squared magnitudes

\[E_s = \sum_{n=0}^{N-1} |x[n]|^2\]

where \(x[n]\) are the complex base-band samples of a single communication symbol.

Returns:

The expected symbol energy.

Return type:

float

abstract unmap(symbols)[source]

Map a stream of data symbols to data bits.

Parameters:

symbols (Symbols) – Sequence of K data symbols to be mapped onto bit sequences.

Return type:

ndarray[tuple[int], dtype[uint8]]

Returns:

Vector containing the resulting sequence of L data bits In general, L is greater or equal to K.

property bits_per_symbol: int[source]

Number of bits transmitted per modulated symbol.

Returns:

Number of bits per symbol

Return type:

int

property channel_equalization: ChannelEqualization[source]

Channel estimation routine.

property channel_estimation: ChannelEstimation[source]

Channel estimation routine.

property modulation_order: int[source]

Access the modulation order.

Returns:

The modulation order.

Return type:

int

abstract property num_data_symbols: int[source]

Number of bit-mapped symbols contained within each communication frame.

abstract property power: float[source]

Expected in-band power of the generated baseband-signal for within given target bandwidth.

Typically denoted by \(P\).

Returns:

The expected power of the modulated signal.

property symbol_precoding_support: bool[source]

Flag indicating if this waveforms supports symbol precodings.

Returns: Boolean support flag.

property synchronization: Synchronization[source]

Synchronization routine.

class PilotCommunicationWaveform(modulation_order=16, channel_estimation=None, channel_equalization=None, synchronization=None)[source]

Bases: CommunicationWaveform

Abstract base class of communication waveform generators generating a pilot signal.

Parameters:
  • modulation_order (int) – Order of modulation. Must be a non-negative power of two. By default, a modulation order of \(16\) is assumed.

  • channel_estimation (ChannelEstimation | None) – Channel estimation algorithm. If not specified, no channel estimation is performed, which implicitly assumes an ideal channel.

  • channel_equalization (ChannelEqualization | None) – Channel equalization algorithm. If not specified, no symbol equalization is performed.

  • synchronization (Synchronization | None) – Time-domain synchronization routine. If not specified, no synchronization is performed, which implicitly assumes a channel without delay.

abstract pilot_signal(bandwidth, oversampling_factor)[source]

Model of the pilot sequence within this communication waveform.

Parameters:
  • bandwidth (float) – Bandwidth of the communication waveform in Hz.

  • oversampling_factor (int) – Oversampling factor of the communication waveform.

Return type:

Signal

Returns: The pilot sequence.

class ConfigurablePilotWaveform(symbol_sequence=None, repeat_symbol_sequence=True, **kwargs)[source]

Bases: PilotCommunicationWaveform

Parameters:
  • symbol_sequence (PilotSymbolSequence | None) – The configured pilot symbol sequence. Uniform by default.

  • repeat_symbol_sequence (bool) – Allow the repetition of pilot symbol sequences. Enabled by default.

  • kwargs – Additional CommunicationWaveform initialization parameters.

pilot_symbols(num_symbols)[source]

Sample a pilot symbol sequence.

Parameters:

num_symbols (int) – The expected number of symbols within the sequence.

Return type:

ndarray

Returns: A pilot symbol sequence of length num_symbols.

Raises:

RuntimeError – If a repetition of the symbol sequence is required but not allowed.

pilot_symbol_sequence: PilotSymbolSequence[source]

The configured pilot symbol sequence.

repeat_pilot_symbol_sequence: bool[source]

Allow the repetition of pilot symbol sequences.

class CWT[source]

Communication waveform type.

alias of TypeVar(‘CWT’, bound=CommunicationWaveform)