Phase Shift Keying / Quadrature Amplitude Modulation

class WaveformGeneratorPskQam(symbol_rate=100000000.0, tx_filter=None, rx_filter=None, chirp_duration=1e-06, chirp_bandwidth=100000000.0, num_preamble_symbols=2, num_data_symbols=100, num_postamble_symbols=0, pilot_rate=1000000.0, guard_interval=0.0, complex_modulation=True, pilot_symbol_sequence=None, repeat_pilot_symbol_sequence=True, **kwargs)

Bases: hermespy.modem.waveform_generator.ConfigurablePilotWaveform, hermespy.core.factory.Serializable

This method provides a class for a generic PSK/QAM modem.

The modem has the following characteristics: - root-raised cosine filter with arbitrary roll-off factor - arbitrary constellation, as defined in modem.tools.psk_qam_mapping:PskQamMapping

This implementation has currently the following limitations: - hard output only (no LLR) - no reference signal - ideal channel estimation - equalization of ISI with FMCW in AWGN channel only - no equalization (only amplitude and phase of first propagation path is compensated)

Waveform Generator PSK-QAM initialization.

Parameters
  • symbol_rate (float, optional) – Rate at which symbols are being generated.

  • tx_filter (ShapingFilter, optional) – The shaping filter applied during signal generation.

  • rx_filter (ShapingFilter, optional) – The shaping filter applied during signal reception.

  • chirp_duration (float, optional) – Duration of a single chirp in seconds.

  • chirp_bandwidth (float, optional) – Bandwidth of a single chirp in Hz.

  • num_preamble_symbols (int, optional) – Number of preamble symbols within a single communication frame.

  • num_data_symbols (int, optional) – Number of data symbols within a single communication frame.

  • num_postamble_symbols (int, optional) – Number of postamble symbols within a single communication frame.

  • pilot_rate (int, optional) – Pilot symbol rate.

  • pilot_ymbol_sequence (Optional[PilotSymbolSequence], optional) – The configured pilot symbol sequence. Uniform by default.

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

  • kwargs (Any) – Waveform generator base class initialization parameters.

yaml_tag: str = 'PskQam'

YAML serialization tag.

complex_modulation: bool
tx_filter: ShapingFilter
rx_filter: ShapingFilter
property chirp_duration: float

Access the chirp duration.

Returns

Chirp duration in seconds.

Return type

float

property symbol_rate: float

Rate of symbols.

Inverse of the chirp duration.

Returns

Symbol rate in Hz.

Return type

float

property chirp_bandwidth: float

Access the chirp bandwidth.

Returns

The chirp bandwidth in Hz.

Return type

float

property modulation_order: int

Access the modulation order.

Returns

The modulation order.

Return type

int

property pilot_signal: hermespy.core.signal_model.Signal

Model of the pilot sequence within this communication waveform.

Returns

The pilot sequence.

Return type

Signal

map(data_bits)

Map a stream of bits to data symbols.

Parameters

data_bits (np.ndarray) – Vector containing a sequence of L hard data bits to be mapped onto data symbols.

Returns

Mapped data symbols.

Return type

Symbols

unmap(data_symbols)

Map a stream of data symbols to data bits.

Parameters

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

Returns

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

Return type

np.ndarray

modulate(data_symbols)

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.

Returns

Signal model of a single modulate data frame.

Return type

Signal

demodulate(baseband_signal, channel_state, noise_variance=0.0)

Demodulate a base-band signal stream to data symbols.

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

  • channel_state (ChannelStateInformation) – Channel state information of a single communication frame.

  • noise_variance (float) – Variance of the thermal noise introduced during reception.

Returns

Tuple of 3 vectors of equal-length first dimension num_symbols. The demodulated data symbols, their channel estimates and their noise variance.

Return type

(np.ndarray, ChannelStateInformation, np.ndarray)

property bandwidth: float

Bandwidth of the frame generated by this generator.

Used to estimate the minimal sampling frequency required to adequately simulate the scenario.

Returns

Bandwidth in Hz.

Return type

float

property num_pilot_samples: int

Number of samples within the pilot section of a frame.

Returns

Number of pilot samples.

Return type

int

property num_guard_samples: int

Number of samples within the guarding section of a frame.

Returns

Number of samples.

Return type

int

property guard_interval: float

Frame guard interval.

Returns

Interval in seconds.

Return type

float

property pilot_rate: float

Frame pilot symbol rate.

Returns

Rate in seconds.

Return type

float

property symbol_samples_in_frame: int

Number of samples per frame without filtering.

Returns

Number of samples.

Return type

int

property samples_in_frame: int

The number of discrete samples per generated frame.

Returns

The number of samples.

Return type

int

property num_data_symbols: int

Number of data symbols per frame.

Returns

Number of data symbols.

Return type

int

property bits_per_frame: int

Number of bits required to generate a single data frame.

Returns

Number of bits

Return type

int

property samples_overhead_in_frame: int

Number of samples appended to frame due to filtering impulse responses.

Returns

Number of samples.

Return type

int

property symbols_per_frame: int

Number of dat symbols per transmitted frame.

Returns

Number of data symbols

Return type

int

property bit_energy: float

Returns the theoretical average (discrete-time) bit energy of the modulated baseband_signal.

Energy of baseband_signal x[k] is defined as sum{|x[k]}^2 Only data bits are considered, i.e., reference, guard intervals are ignored.

Return type

float

property symbol_energy: float

The theoretical average symbol (discrete-time) energy of the modulated baseband_signal.

Energy of baseband_signal x[k] is defined as sum{|x[k]}^2 Only data bits are considered, i.e., reference, guard intervals are ignored.

Return type

float

Returns

The average symbol energy in UNIT.

property power: float

Returns the theoretical average symbol (unitless) power,

Power of baseband_signal x[k] is defined as sum_{k=1}^N{|x[k]|}^2 / N Power is the average power of the data part of the transmitted frame, i.e., bit energy x raw bit rate

Return type

float

property sampling_rate: float

Rate at which the waveform generator signal is internally sampled.

Returns

Sampling rate in Hz.

Return type

float

classmethod to_yaml(representer, node)

Serialize an WaveformGeneratorPskQam object to YAML.

Parameters
  • representer (SafeRepresenter) – A handle to a representer used to generate valid YAML code. The representer gets passed down the serialization tree to each node.

  • node (WaveformGeneratorPskQam) – The WaveformGeneratorPskQam instance to be serialized.

Returns

The serialized YAML node

Return type

Node

classmethod from_yaml(constructor, node)

Recall a new WaveformGeneratorPskQam instance from YAML.

Parameters
  • constructor (SafeConstructor) – A handle to the constructor extracting the YAML information.

  • node (Node) – YAML node representing the WaveformGeneratorPskQam serialization.

Returns

Newly created WaveformGeneratorPskQam instance.

Return type

WaveformGeneratorPskQam

class PskQamSynchronization(waveform_generator=None, *args)

Bases: hermespy.modem.waveform_generator.Synchronization[hermespy.modem.waveform_generator_psk_qam.WaveformGeneratorPskQam]

Synchronization for chirp-based frequency shift keying communication waveforms.

Parameters

waveform_generator (WaveformGenerator, optional) – The waveform generator this synchronization routine is attached to.

class PskQamCorrelationSynchronization(threshold=0.9, guard_ratio=0.8, *args, **kwargs)

Bases: hermespy.modem.waveform_correlation_synchronization.CorrelationSynchronization[hermespy.modem.waveform_generator_psk_qam.WaveformGeneratorPskQam]

Correlation-based clock-synchronization for PSK-QAM waveforms.

Parameters
  • threshold (float, optional) – Correlation threshold at which a pilot signal is detected.

  • guard_ratio (float, optional) – Guard ratio of frame duration.

  • *args – Synchronization base class initialization parameters.

yaml_tag: Optional[str] = 'PskQamCorrelationSynchronization'

YAML serialization tag.

class PskQamChannelEstimation(waveform_generator=None, *args)

Bases: hermespy.modem.waveform_generator.ChannelEstimation[hermespy.modem.waveform_generator_psk_qam.WaveformGeneratorPskQam], abc.ABC

Channel estimation for Psk Qam waveforms.

Parameters

waveform_generator (WaveformGenerator, optional) – The waveform generator this synchronization routine is attached to.

class PskQamLeastSquaresChannelEstimation(waveform_generator=None, *args)

Bases: hermespy.core.factory.Serializable, hermespy.modem.waveform_generator_psk_qam.PskQamChannelEstimation

Least-Squares channel estimation for Psk Qam waveforms.

Parameters

waveform_generator (WaveformGenerator, optional) – The waveform generator this synchronization routine is attached to.

yaml_tag: Optional[str] = 'PskQamLS'

YAML serialization tag

estimate_channel(signal, csi=None)

Estimate the wireless channel of a received communication frame.

Parameters
  • signal (Signal) – Signal model of the communication frame waveform.

  • csi (ChannelStateInformation, optional) – Ideal channel state information. May be required for some routines.

Raises

ValueError – If csi is required but not provided.

Return type

ChannelStateInformation

class PskQamChannelEqualization(waveform_generator=None)

Bases: hermespy.modem.waveform_generator.ChannelEqualization[hermespy.modem.waveform_generator_psk_qam.WaveformGeneratorPskQam], abc.ABC

Channel estimation for Psk Qam waveforms.

Parameters

waveform_generator (WaveformGenerator, optional) – The waveform generator this equalization routine is attached to.

class PskQamZeroForcingChannelEqualization(waveform_generator=None)

Bases: hermespy.core.factory.Serializable, hermespy.modem.waveform_generator_psk_qam.PskQamChannelEqualization, abc.ABC

Zero-Forcing Channel estimation for Psk Qam waveforms.

Parameters

waveform_generator (WaveformGenerator, optional) – The waveform generator this equalization routine is attached to.

yaml_tag: Optional[str] = 'PskQamZF'

YAML serialization tag

equalize_channel(signal, csi, snr=inf)

Equalize the wireless channel of a received communication frame.

Parameters
  • signal (Signal) – Signal model of the communication frame waveform.

  • csi (ChannelStateInformation) – Channel state estimation

  • snr (float) – Assumed signal to noise ratio. May be required by some routines, infinite by default.

Returns

The equalized signal model.

Return type

Signal

class PskQamMinimumMeanSquareChannelEqualization(waveform_generator=None)

Bases: hermespy.core.factory.Serializable, hermespy.modem.waveform_generator_psk_qam.PskQamChannelEqualization, abc.ABC

Minimum-Mean-Square Channel estimation for Psk Qam waveforms.

Parameters

waveform_generator (WaveformGenerator, optional) – The waveform generator this equalization routine is attached to.

yaml_tag: Optional[str] = 'PskQamMMSE'

YAML serialization tag

equalize_channel(signal, csi, snr=inf)

Equalize the wireless channel of a received communication frame.

Parameters
  • signal (Signal) – Signal model of the communication frame waveform.

  • csi (ChannelStateInformation) – Channel state estimation

  • snr (float) – Assumed signal to noise ratio. May be required by some routines, infinite by default.

Returns

The equalized signal model.

Return type

Signal

class RootRaisedCosine(roll_off=0.9, oversampling_factor=1, *args, **kwargs)

Bases: hermespy.modem.waveform_generator_psk_qam.WaveformGeneratorPskQam

Root Raise Cosine Filter Modulation Scheme.

Waveform Generator PSK-QAM initialization.

Parameters
  • symbol_rate (float, optional) – Rate at which symbols are being generated.

  • tx_filter (ShapingFilter, optional) – The shaping filter applied during signal generation.

  • rx_filter (ShapingFilter, optional) – The shaping filter applied during signal reception.

  • chirp_duration (float, optional) – Duration of a single chirp in seconds.

  • chirp_bandwidth (float, optional) – Bandwidth of a single chirp in Hz.

  • num_preamble_symbols (int, optional) – Number of preamble symbols within a single communication frame.

  • num_data_symbols (int, optional) – Number of data symbols within a single communication frame.

  • num_postamble_symbols (int, optional) – Number of postamble symbols within a single communication frame.

  • pilot_rate (int, optional) – Pilot symbol rate.

  • pilot_ymbol_sequence (Optional[PilotSymbolSequence], optional) – The configured pilot symbol sequence. Uniform by default.

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

  • kwargs (Any) – Waveform generator base class initialization parameters.

tx_filter: ShapingFilter
rx_filter: ShapingFilter
complex_modulation: bool
pilot_symbol_sequence: PilotSymbolSequence

The configured pilot symbol sequence.

repeat_pilot_symbol_sequence: bool

Allow the repetition of pilot symbol sequences.

class RaisedCosine(roll_off=0.9, oversampling_factor=1, *args, **kwargs)

Bases: hermespy.modem.waveform_generator_psk_qam.WaveformGeneratorPskQam

Raise Cosine Filter Modulation Scheme.

Waveform Generator PSK-QAM initialization.

Parameters
  • symbol_rate (float, optional) – Rate at which symbols are being generated.

  • tx_filter (ShapingFilter, optional) – The shaping filter applied during signal generation.

  • rx_filter (ShapingFilter, optional) – The shaping filter applied during signal reception.

  • chirp_duration (float, optional) – Duration of a single chirp in seconds.

  • chirp_bandwidth (float, optional) – Bandwidth of a single chirp in Hz.

  • num_preamble_symbols (int, optional) – Number of preamble symbols within a single communication frame.

  • num_data_symbols (int, optional) – Number of data symbols within a single communication frame.

  • num_postamble_symbols (int, optional) – Number of postamble symbols within a single communication frame.

  • pilot_rate (int, optional) – Pilot symbol rate.

  • pilot_ymbol_sequence (Optional[PilotSymbolSequence], optional) – The configured pilot symbol sequence. Uniform by default.

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

  • kwargs (Any) – Waveform generator base class initialization parameters.

tx_filter: ShapingFilter
rx_filter: ShapingFilter
complex_modulation: bool
pilot_symbol_sequence: PilotSymbolSequence

The configured pilot symbol sequence.

repeat_pilot_symbol_sequence: bool

Allow the repetition of pilot symbol sequences.

class Rectangular(bandwidth_factor=1.0, oversampling_factor=1, *args, **kwargs)

Bases: hermespy.modem.waveform_generator_psk_qam.WaveformGeneratorPskQam

Rectangular Filter Modulation Scheme.

Waveform Generator PSK-QAM initialization.

Parameters
  • symbol_rate (float, optional) – Rate at which symbols are being generated.

  • tx_filter (ShapingFilter, optional) – The shaping filter applied during signal generation.

  • rx_filter (ShapingFilter, optional) – The shaping filter applied during signal reception.

  • chirp_duration (float, optional) – Duration of a single chirp in seconds.

  • chirp_bandwidth (float, optional) – Bandwidth of a single chirp in Hz.

  • num_preamble_symbols (int, optional) – Number of preamble symbols within a single communication frame.

  • num_data_symbols (int, optional) – Number of data symbols within a single communication frame.

  • num_postamble_symbols (int, optional) – Number of postamble symbols within a single communication frame.

  • pilot_rate (int, optional) – Pilot symbol rate.

  • pilot_ymbol_sequence (Optional[PilotSymbolSequence], optional) – The configured pilot symbol sequence. Uniform by default.

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

  • kwargs (Any) – Waveform generator base class initialization parameters.

tx_filter: ShapingFilter
rx_filter: ShapingFilter
complex_modulation: bool
pilot_symbol_sequence: PilotSymbolSequence

The configured pilot symbol sequence.

repeat_pilot_symbol_sequence: bool

Allow the repetition of pilot symbol sequences.

class FMCW(bandwidth_factor=1.0, oversampling_factor=1, *args, **kwargs)

Bases: hermespy.modem.waveform_generator_psk_qam.WaveformGeneratorPskQam

Frequency Modulated Continuous Waveform Filter Modulation Scheme.

Waveform Generator PSK-QAM initialization.

Parameters
  • symbol_rate (float, optional) – Rate at which symbols are being generated.

  • tx_filter (ShapingFilter, optional) – The shaping filter applied during signal generation.

  • rx_filter (ShapingFilter, optional) – The shaping filter applied during signal reception.

  • chirp_duration (float, optional) – Duration of a single chirp in seconds.

  • chirp_bandwidth (float, optional) – Bandwidth of a single chirp in Hz.

  • num_preamble_symbols (int, optional) – Number of preamble symbols within a single communication frame.

  • num_data_symbols (int, optional) – Number of data symbols within a single communication frame.

  • num_postamble_symbols (int, optional) – Number of postamble symbols within a single communication frame.

  • pilot_rate (int, optional) – Pilot symbol rate.

  • pilot_ymbol_sequence (Optional[PilotSymbolSequence], optional) – The configured pilot symbol sequence. Uniform by default.

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

  • kwargs (Any) – Waveform generator base class initialization parameters.

tx_filter: ShapingFilter
rx_filter: ShapingFilter
complex_modulation: bool
pilot_symbol_sequence: PilotSymbolSequence

The configured pilot symbol sequence.

repeat_pilot_symbol_sequence: bool

Allow the repetition of pilot symbol sequences.