C-FSK¶

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:
PilotCommunicationWaveformChirp 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.
- classmethod Deserialize(process)[source]¶
Deserialize an object’s state.
Objects cannot be deserialized directly, instead a
Factorymust be instructed to carry out the deserialization process.- Parameters:
process (
DeserializationProcess) – The current stage of the deserialization process. This object is generated by theFactoryand provides an interface to deserialization methods supporting multiple backends.- Return type:
- Returns:
The deserialized object.
- demodulate(signal, bandwidth, oversampling_factor)[source]¶
Demodulate a base-band signal stream to data symbols.
- Parameters:
- Return type:
- Returns:
The demodulated communication symbols
- 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:
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:
- Return type:
- 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:
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:
- Return type:
Returns: The pilot sequence.
- place(symbols)[source]¶
Place the mapped symbols within the communicaton frame.
Additionally interleaves pilot 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.
- samples_per_frame(bandwidth, oversampling_factor)[source]¶
Number of time-domain samples per processed communication frame.
- Parameters:
Note that the overall sampling rate is defined as bandwidth * oversampling_factor.
- Returns:
Number of samples per frame.
- Return type:
- serialize(process)[source]¶
Serialize this object’s state.
Objects cannot be serialized directly, instead a
Factorymust be instructed to carry out the serialization process.- Parameters:
process (
SerializationProcess) – The current stage of the serialization process. This object is generated by theFactoryand provides an interface to serialization methods supporting multiple backends.- Return type:
- symbol_energy(bandwidth, oversampling_factor)[source]¶
Expected energy of a single communication symbol within the modulated baseband-signal.
- Parameters:
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:
- DERIVE_FREQ_DIFFERENCE: float = 0.0[source]¶
Magic number to derive the frequency difference from the modulation order.
- 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 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.
- class ChirpFSKSynchronization(waveform=None)[source]¶
Bases:
Synchronization[ChirpFSKWaveform],SerializableSynchronization 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.