Thursday, February 4, 2016

Re: [Discuss-gnuradio] Fractional Resampler discards samples

Hi Andrej,

03.02.2016 22:36, Andrej Rode wrote:
(with a resampling rate of 1 and a phase offset) also
I presume that's "... and a ZERO phase offset", right?

So I used the source, Luke, and
  1. these are not the resamplers you're looking for (probably), unless you're really going for non-rational () or really really-close-to-1 ratios, and
  2. the point where the phase delay is implemented is by using the MMSE interpolator[1], which really is just a set of FIRs, from which the right one is selected by definition of the ยต to use.

So, point is that d_mu of the fractional resampler is always increased by resample_ratio[2], which in your case is 1, which means that the MMSE interpolator always uses the same set of taps[3]. Assuming your phase_offset == 0, that's always going to be the 0th from [4]:

 { 0.00000e+00, 0.00000e+00, 0.00000e+00, 0.00000e+00, 1.00000e+00, 0.00000e+00, 0.00000e+00, 0.00000e+00 }, //   0/128

which immediately explains a certain delay; but not really a dropping of samples.
I thing the stream tag behaviour might be a bug that Tom was actually working on; maybe he can comment.

Cheers,
Marcus

[1] https://github.com/gnuradio/gnuradio/blob/master/gr-filter/lib/fractional_resampler_cc_impl.cc#L87 , #L47
[2] https://github.com/gnuradio/gnuradio/blob/master/gr-filter/lib/fractional_resampler_cc_impl.cc#L89 , #L46
[3] https://github.com/gnuradio/gnuradio/blob/master/gr-filter/lib/mmse_fir_interpolator_cc.cc#L66 , #L72
[4] https://github.com/gnuradio/gnuradio/blob/master/gr-filter/include/gnuradio/filter/interpolator_taps.h#L11

No comments:

Post a Comment