C-FSK

Inheritance diagram of hermespy.modem.waveform_chirp_fsk.ChirpFSKWaveform, hermespy.modem.waveform_chirp_fsk.ChirpFSKSynchronization, hermespy.modem.waveform_chirp_fsk.ChirpFSKCorrelationSynchronization

Chirp Frequency Shift Keying (C-FSK) is a modulation scheme that encodes information in the start and stop frequency of an FMCW ramp.

The waveform can be configured by specifying the number of number of pilot- and data chirps contained within each frame, as well as the duration and bandwidth each of the chirps:

1# Initialize the waveform description
2waveform = ChirpFSKWaveform(
3    chirp_duration=1e-8,
4    num_pilot_chirps=16,
5    num_data_chirps=64,
6)
7

Afterwards, additional processing steps such as synchronization can be added to the waveform description:

1waveform.synchronization = ChirpFSKCorrelationSynchronization()
2

In order to generate and evaluate communication transmissions or receptions, waveforms should be added to modem implementations. Refer to Transmitting Modem, Receiving Modem or Simplex Link for more information. For instructions how to implement custom waveforms, refer to Implementing Communication Waveforms.

class ChirpFSKWaveform(chirp_duration=1e-08, freq_difference=0.0, num_pilot_chirps=14, num_data_chirps=50, guard_interval=0.0, **kwargs)[source]

Bases: PilotCommunicationWaveform

Chirp Frequency Shift Keying communication waveform description.

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

  • freq_difference (float) – Frequency difference of two adjacent chirp symbols.

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

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

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

  • kwargs – Base waveform generator initialization arguments.

symbol_type[source]

alias of int64

classmethod Deserialize(process)[source]

Deserialize an object’s state.

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

Parameters:

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

Return type:

ChirpFSKWaveform

Returns:

The deserialized object.

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

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

map(data_bits)[source]

Map a stream of bits to data symbols.

Parameters:

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

Return type:

Symbols

Returns: Mapped data symbols.

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.

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.

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.

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.

samples_in_chirp(bandwidth, oversampling_factor)[source]

The number of discrete samples per generated chirp.

Parameters:
  • bandwidth (float) – The bandwidth of the chirp in Hz.

  • oversampling_factor (int) – The oversampling factor of the waveform.

Return type:

int

Returns:

The number of samples per chirp.

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

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

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

Returns:

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

DERIVE_FREQ_DIFFERENCE: float = 0.0[source]

Magic number to derive the frequency difference from the modulation order.

property bits_per_symbol: int[source]

The number of bits per generated symbol.

property chirp_duration: float[source]

Duration of a single chirp within a frame.

Returns: Chirp duration in seconds.

Raises:

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

property chirps_in_frame: int[source]

The number of chirps per generated frame.

property freq_difference: float[source]

The frequency offset between neighbouring chirp symbols in Hz.

If set to zero, the frequency offset will be calculated automatically based on the modulation order.

Raises:

ValueError – If freq_difference is smaller than zero.

property guard_interval: float[source]

Access the guard interval.

Returns: The guard interval in seconds.

property num_data_chirps: int[source]

Access the number of data chirps.

Returns: The number of data chirps.

property num_data_symbols: int[source]

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

property num_pilot_chirps: int[source]

Access the number of pilot chirps.

Returns: The number of pilot chirps.

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.

class ChirpFSKSynchronization(waveform=None)[source]

Bases: Synchronization[ChirpFSKWaveform], Serializable

Synchronization for chirp-based frequency shift keying communication waveforms.

Parameters:

waveform (ChirpFSKWaveform | None) – The waveform generator this synchronization routine is attached to.

class ChirpFSKCorrelationSynchronization(threshold=0.9, guard_ratio=0.8, peak_prominence=0.2, *args, **kwargs)[source]

Bases: CorrelationSynchronization[ChirpFSKWaveform]

Correlation-based clock-synchronization for Chirp-FSK waveforms.

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

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

  • peak_prominence (float) – Minimum peak prominence for peak detection in the interval (0, 1]. \(0.2\) is a good default value for most applications.

  • *args (Any) – Synchronization base class initialization parameters.