comnum.Css#
- class comnum.Css(sf, *, oversampling=1, waveform='lora')#
Chirp spread spectrum, the frequency-shift chirp modulation of LoRa (Chiani and Elzanaty 2019; Afisiadis et al. 2020):
M = 2^SFchirps ofMchips, a noncoherent DFT receiver. LoRa is a trademark of Semtech; this models the published descriptions for research.- Parameters:
- Raises:
ValueError – for an invalid parameter (the message names it).
Examples
>>> import comnum >>> css = comnum.Css(7) >>> s = css.modulate([0, 5, 127]) >>> s.size, css.demodulate(s).tolist() (384, [0, 5, 127])
- demodulate(samples)#
The noncoherent decisions.
- Parameters:
samples (array_like) – a multiple of
J Msamples.- Returns:
one symbol per
J Msamples.- Return type:
- Raises:
ValueError – for an invalid parameter or input (the message names it).
- energies(samples)#
The energy of the
Mcandidates of every received symbol (squared magnitudes of the DFT of the dechirped samples).- Parameters:
samples (array_like) – a multiple of
J Msamples.- Returns:
Menergies per symbol.- Return type:
- Raises:
ValueError – for an invalid parameter or input (the message names it).
- interferer(s1, s2, tau)#
One symbol of a same-SF interferer offset by
tauchips: the end of its symbols1, then its symbols2(Afisiadis et al. 2020, eq. (21)).- Parameters:
- Returns:
Msamples.- Return type:
- Raises:
ValueError – for an invalid parameter (the message names it).
- modulate(symbols)#
The samples of a sequence of symbols.
- Parameters:
symbols (array_like) – integers in
[0, M).- Returns:
J Msamples per symbol.- Return type:
- Raises:
ValueError – for an invalid parameter or input (the message names it).
- symbol(a)#
The samples of one symbol.
- Parameters:
a (int) – the symbol,
0 ≤ a < M.- Returns:
J Munit-envelope samples.- Return type:
- Raises:
ValueError – for an invalid parameter (the message names it).