Module rustradio::wpcr

source ·
Expand description

Whole packet clock recovery block.

This is a pretty cool way to take a burst of NRZ floating point samples, and turn them into bits.

Instead of a bunch of timing error detectors, symbol shapes, and loop bandwidths, this takes the burst as a whole, and extracts the bits according to what the whole packet looks like.

You don’t even have to specify the baud rate! Though a possible improvement could be to discard baud rates that are outside an accepted range.

The method is this:

  1. Generate a new vector marking zero crossings with 1.0, and everything else as 0.0.
  2. Take FFT of this vector.
  3. Select the “best” FFT bin, giving you both frequency and clock phase.
  4. Extract symbols according to this frequency and clock phase.

See Michael Ossmann’s excellent presentation for a better description.

Drawbacks of this method:

  • Probably less efficient.
  • Probably less able to dig values out of the noise.
  • Higher latency, as it needs the whole burst before it can start decoding.
  • Uses more memory, since the whole burst needs to be in a buffer before decoding can start.
  • Will work poorly if frequency drifts during the packet burst.

Structs§

  • Midpointer is a block re-center a NRZ burst around 0.
  • Whole packet clock recovery block.
  • Builder for Wpcr blocks.