I have been wondering about the implementation of timing recovery blocks in gnuradio. In literature, for asynchronous sampling, all that is needed are error detector (MM, ML, Gardner etc), a loop filter (2nd order), interpolation control (modulo-1 counter etc) and an interpolator. An example of a timing recovery scheme with ML error detector is shown below. I have two questions regarding the implementation in GNU Radio

  1. All blocks I have seen (MM, Andy Walls Symbol Sync )seem to be approximating the number of samples per symbol and use it to update the rate of the block in the forecast function. My question is why do we need to use variable rate? Can't a scheme like the one below with fixed rate work? Isn't this supposed to be asynchronous sampling?
  2. Out of curiosity: Can one use a third-order PLL instead? Or will this just be an overkill?

Regards, M.

Timing recovery


Interpolation control: Text Modulo-1 counter

Matlab code Matlab code

  • $\begingroup$ Your objective is to match rates; so, you'll need to be able to match rates. The "underflow" signal there is effectively a "proxy" for variable rate. $\endgroup$ Jul 26, 2018 at 11:59
  • $\begingroup$ @MarcusMüller The underflow signal (strobe) or overflow (in case of incrementing modulo-1) counter is used to identify the basepoint index (and ultimately) the fractioal interval. I get it that we have to match rates. But ss it can be seen in the diagram and the source code, the rate N is fixed. $\endgroup$ Jul 26, 2018 at 12:26
  • $\begingroup$ It's really not. $\endgroup$ Jul 26, 2018 at 12:33
  • $\begingroup$ @MarcusMüller I have added the text from Michael Rice's "Digital communications: A discrete time approach". Only the counter value, basepoint index, and fractional interval are updated. I still don't get it when you say N is also getting updated. Please clarify. $\endgroup$ Jul 26, 2018 at 12:50
  • 1
    $\begingroup$ look at it this way: what you posted is a closed loop thing designed to follow a dynamically changing quantity. What you posted would make no sense for a fixed ratio - if you've got that, just use a rational resampler. $\endgroup$ Jul 26, 2018 at 13:19

2 Answers 2


Symbol timing offset and symbol frequency offset are two different distortions. Like a carrier phase offset and a carrier frequency offset. The difference is that a carrier frequency offset imposes itself on the demodulated signal on the scale of a symbol time quite harshly due to the high frequencies of operation. The symbol rates are comparatively low and hence symbol frequency offset manifests itself slowly within a few symbol times. This is in regards to our modelling. Any real oscillator will probably exhibit a random component over this first order approximation.

Now Michael Rice is considering a case of fixed symbol timing offset in this figure. So the loop is just finding the optimal clock phase after asynchronous sampling. Considering that he's using a second order loop, a simple mechanism of stuffing and deleting samples is needed to adapt it to a varying symbol timing phase offset. GNU radio code runs on real signals so it has to adapt to that symbol frequency offset plus any small random variations over a period of time.

Finally, a 3rd order loop would ideally generate a steady state zero error for a changing frequency offset (sometimes called drift) but not many systems encounter such a scenario with a few exceptions. Higher order loops are used less in practice due to more complex stability issues. See Gardner's book Phase Lock Techniques for details.

  • $\begingroup$ This clears everything. Thank you. Just to be clear, the "Michael Rice" approach can't be used "as-is" on GNU Radio? $\endgroup$ Jul 28, 2018 at 11:12
  • 1
    $\begingroup$ It can be used for a very small packet size where you ignore any deviations from the mean timing phase. Not for other cases. $\endgroup$
    – QMC
    Jul 28, 2018 at 20:52

In your post, you are referring to Modulo-1 interpolation control. GNU Radio instead uses Recursive interpolation control. That is the next sub-chapter after Modulo-1 sub-chapter. So, investigating that alternative approach will I believe help you more understand the GNU Radio implementation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.