discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] resample ratio for fractional_resampler


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] resample ratio for fractional_resampler
Date: Mon, 23 Oct 2017 11:47:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Hi Yang,

for questions of performance, it's usually best to consult the source code itself. By the way, fractional_resampler_** has been renamed mmse_resampler_** on git's "next" branch.

You'll notice the code in {mmse_|fractional_}resampler_cc_impl.cc is:

        while(oo < noutput_items) {
          out[oo++] = d_resamp->interpolate(&in[ii], d_mu);

          double s = d_mu + d_mu_inc;
          double f = floor(s);
          int incr = (int)f;
          d_mu = s - f;
          ii += incr;
        }

        consume_each(ii);
        return noutput_items;

Which means there's one iteration per output sample, invariably, no matter what your resampling ratio is.
What would increase the performance is reducing NTAPS in {mmse_|fractional_}interpolator, but since that is already only 8, which, with a bit of SIMD, your CPU does in a single instruction, I don't seem that much room for improvement there.
The other thing would be reducing NSTEPS, but it's already but a 7 bit quantization of the q in rᵣₑₛₐₘₚₗₑ = n + q, n∈ℕ₀, 0≤q∈ℚ, so I'm not convinced you'd want to do that; the jitter you get for a b bit quantization (i.e. b=log₂ NSTEPS) has a variance of (-20b log₁₀ 2-10 log₁₀ 12) dB ≈ -(6b + 10.8) dB (hoping that I do the math right). If I juggle Cauchy's mean value theorem correctly in my head, that means you basically get that (times the signal power) as the worst-case power in the phase noise introduced by the timing approximation with a critically sampled signal. If I'm right (really, haven't taken the time to write this down), then that means e.g. for NSTEPS=128, that you get -52.8 dB phase noise, whereas a reduction to let's say NSTEPS=16 gives you 24 dB more noise – and -28.8 dB phase noise isn't all that great.

What are the resampling ratios you're working with?

Best regards,
Marcus

On 2017-10-23 05:31, Yang Liu wrote:
Dear all, 

I used fractional resampler(gr::filter::fractional_resampler_cc) at transmitter side to help up sample the signal to the device sample rate before sending it out. In the experiment, I found that this resampler works well for some resample ratio (in terms of speed), and the performance (speed) doesn't necessarily improve as the resample ratio decreases.

Therefore, I am wondering whether this resampling block indeed works better for some sets of resampling ratio? If yes, what are these sets? Knowing this will help me to set the parameters at tx properly especially when the sample rate is high :)

Thanks a lot for your help.

Best, 
Yang


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]