discriminateur_fm

Polar discrimination for FM demodulation.

Namespace: dsp::telecom

Prototype

sptr<FilterGen<cfloat, float>> discriminateur_fm()

Returns

Filter cfloat (baseband signal, complex) to float (instantaneous frequnency, as a normalized pulsation (between \(-\pi\) and \(\pi\))).

Description

Implement a polar discriminator (computes the instantaneous frequency for a baseband signal), which can serve as a building block for a FM demodulator: \[ y(t) = \frac{d\arg x}{dt}(t) \]

The implementation si based on https://www.embedded.com/dsp-tricks-frequency-demodulation-algorithms/, which enable an efficient, arc-tangent free, computing: \[ y(t) = \frac{\mathcal{Re}(x(t)) \frac{d\mathcal{Im}(x(t))}{dt} - \mathcal{Im}(x(t)) \frac{d\mathcal{Re}(x(t))}{dt}}{\left|x(t)\right|^2} \]

The derivative is approximated at the first order: \[ \frac{dx}{dt}(k) \sim \frac{x_{k+1}-x_{k-1}}{2} \]

Warning
Because of the aproximation done for derivative computation, this block insert a delay of 1 sample.


Example


  // Signal test
  soit x = siggauss(1000) / 10;

  // Modulation FM
  soit y = polar(cumsum(x));

  // Démod
  soit discri = discriminateur_fm();
  soit z = discri->step(y);

  Figures f;
  f.subplot().plot(x, "", "Signal test");
  f.subplot().plot(y, "", "Signal modulé FM");
  f.subplot().plot(z, "", "Sortie discriminateur");