comnum.Fbmc#

class comnum.Fbmc(n_fft, *, overlap=4)#

FBMC/OQAM (staggered multitone) with the PHYDYAS prototype filter.

n_fft subcarriers carry real symbols every half symbol on pulses of unit energy, orthogonal in the real sense; oqam_stagger splits complex symbols into them. The modulator and the demodulator are polyphase (one FFT per half symbol).

Parameters:
  • n_fft (int) – the number of subcarriers M, even.

  • overlap (int) – the overlapping factor K of the prototype (2, 3 or 4).

Raises:

ValueError – for an invalid parameter (the message names it).

Examples

>>> import comnum, numpy as np
>>> f = comnum.Fbmc(16, overlap=4)
>>> c = np.exp(2j * np.pi * np.arange(16 * 6) / 7)
>>> y = f.demodulate(f.modulate(comnum.oqam_stagger(c, 16)))
>>> back = comnum.oqam_destagger(y.real, 16)
>>> bool(np.max(np.abs(back - c)) < 1e-2)
True
demodulate(r)#

Project the samples on every pulse: the real parts estimate the symbols, the imaginary parts hold the intrinsic interference.

Parameters:

r (array_like) – the received samples, n_samples(n) for n half-symbols.

Returns:

y[n * M + m] (complex128).

Return type:

numpy.ndarray

Raises:

ValueError – for an invalid parameter or input (the message names it).

interference(m, n, dm, dn)#

The intrinsic interference that the symbol (m + dm, n + dn) leaves on the estimate of (m, n) (Bouhadda et al. 2014, Table 1).

Parameters:
  • m (int) – subcarrier.

  • n (int) – half-symbol.

  • dm (int) – subcarrier offset.

  • dn (int) – half-symbol offset.

Returns:

1 at the symbol itself, purely imaginary elsewhere.

Return type:

complex

modulate(a)#

Modulate real symbols laid out half-symbol after half-symbol (a[n * M + m]).

Parameters:

a (array_like) – the real symbols.

Returns:

the samples (complex128).

Return type:

numpy.ndarray

Raises:

ValueError – for an invalid parameter or input (the message names it).

n_samples(half_symbols)#

The number of samples of half_symbols half-symbols.

Parameters:

half_symbols (int) – real symbols per subcarrier.

Returns:

(n - 1) M / 2 + KM - 1.

Return type:

int

n_fft#

The number of subcarriers M.

Type:

int

overlap#

The overlapping factor K.

Type:

int

taps#

The prototype filter (unit energy, KM - 1 taps).

Type:

numpy.ndarray