Chirp Frequency Shift Keying

class WaveformGeneratorChirpFsk(chirp_duration=1e-08, chirp_bandwidth=1000000000.0, freq_difference=None, num_pilot_chirps=14, num_data_chirps=50, guard_interval=0.0, **kwargs)

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

Implements a chirp FSK waveform generator.

Frequency Shift Keying Waveform Generator object initialization.

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

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

  • freq_difference (Optional[float], optional) – Frequency difference of two adjacent chirp symbols.

  • num_pilot_chirps (int, optional) – Number of pilot symbols within a single frame.

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

  • guard_interval (float, optional) – Frame guard interval in seconds.

  • kwargs – Base waveform generator initialization arguments.

yaml_tag: str = 'ChirpFsk'

YAML serialization tag.

symbol_type

alias of int

classmethod to_yaml(representer, node)

Serialize an WaveformGenerator 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 (WaveformGenerator) – The WaveformGeneratorChirpFsk instance to be serialized.

Returns

The serialized YAML node

Return type

Node

classmethod from_yaml(constructor, node)

Recall a new WaveformGeneratorChirpFsk instance from YAML.

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

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

Returns

Newly created WaveformGeneratorChirpFsk instance.

Return type

WaveformGenerator

property frame_duration: float

Length of one data frame in seconds.

Returns

Frame length in seconds.

Return type

float

property chirp_duration: float

Duration of a single chirp within a frame.

Returns

Chirp duration in seconds.

Return type

float

Raises

ValueError – If the duration is less or equal to zero.

property chirp_bandwidth: float

Access the chirp bandwidth.

Returns

The chirp bandwidth in Hz.

Return type

float

property freq_difference: float

The frequency offset between neighbouring chirp symbols.

Returns

The frequency difference in Hz.

Return type

float

Raises

ValueError – If freq_difference is smaller or equal to zero.

property num_pilot_chirps: int

Access the number of pilot chirps.

Returns

The number of pilot chirps.

Return type

int

property num_data_chirps: int

Access the number of data chirps.

Returns

The number of data chirps.

Return type

int

property guard_interval: float

Access the guard interval.

Returns

The guard interval in seconds.

Return type

float

property bits_per_symbol: int

The number of bits per generated symbol.

Returns

The number of bits.

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 symbols_per_frame: int

Number of dat symbols per transmitted frame.

Returns

Number of data symbols

Return type

int

property samples_in_chirp: int

The number of discrete samples per generated chirp.

Returns

The number of samples.

Return type

int

property chirps_in_frame: int

The number of chirps per generated frame.

Returns

The number of chirps.

Return type

int

property chirp_time: numpy.ndarray

Chirp timestamps.

Returns

Chirp timestamps.

Return type

array

property samples_in_frame: int

The number of discrete samples per generated frame.

Returns

The number of samples.

Return type

int

property symbol_energy: float

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

Energy of 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 bit_energy: float

Theoretical average bit energy of the modulated signal.

Return type

float

Returns

The average bit energy in UNIT.

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

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)

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)

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

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 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 modulation_order: int

Access the modulation order.

Returns

The modulation order.

Return type

int

property sampling_rate: float

Rate at which the waveform generator signal is internally sampled.

Returns

Sampling rate in Hz.

Return type

float

property pilot_signal: hermespy.core.signal_model.Signal

Samples of the frame’s pilot section.

Returns

Pilot samples.

Return type

samples (np.ndarray)

class ChirpFskSynchronization(waveform_generator=None)

Bases: hermespy.modem.waveform_generator.Synchronization[hermespy.modem.waveform_generator_chirp_fsk.WaveformGeneratorChirpFsk]

Synchronization for chirp-based frequency shift keying communication waveforms.

Parameters

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

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

Bases: hermespy.modem.waveform_correlation_synchronization.CorrelationSynchronization[hermespy.modem.waveform_generator_chirp_fsk.WaveformGeneratorChirpFsk]

Correlation-based clock-synchronization for Chirp-FSK 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.