Resampling precision

Hello,

I run into some weird results on the
rational_resampler.rational_resampler_ccf output.

Look at picture 1 [1] bellow:

 Signal input : Carrier of 1,4 Mhz sampled at 640 Ksamp/s
 Interporlation resampler = 2
 Decimation resampler = 3

Manual extract:
fractional_bw: fractional bandwidth in (0, 0.5), measured at final freq
(use
0.4)
type fractional_bw: float

Can someone give me more informations on the “rational_bw” parameter?

Are there any files using resampling function that I can take a look at?

[1] - http://www.nabble.com/file/p18280898/resampler.JPG resampler.JPG

Regards,
Irene

View this message in context:
http://www.nabble.com/Resampling-precision-tp18280898p18280898.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Fri, Jul 04, 2008 at 07:52:56AM -0700, irene159 wrote:

 Decimation resampler = 3

Hi Irene,

from your rather short email I will have to guess the init code for
your resampler and the specs for your filter, but at first glance,
your spectrum does not look weird at all. Personally, I’d
choose a higher attenuation for the stop bands, but you might be content
with what you’ve got.

The pictures are not quite consistent with the data in your email (the
sampling rate in the above picture can’t be 640kS/s, or your FFT
couldn’t display ~6MHz of spectrum, perhaps it’s 6.4MHz = 6400kS/s?).
However, interpolating and decimating results in alias spectra, that’s
which you cancel out with the interpolation filter. Your filter
attenuates the aliases down by ~50dB, if that’s enough for you your done
:). In most practical applications, this would be well below noise level
anyway (unless you have really massive SNR levels).

If you want more control over the filter process, you could skip the
rational_resampler and write the resampler yourself. Unless requirements
force me otherwise, I use an FIR with 60-80dB stop band attenuation and
~1dB ripple, depending on how many taps I can afford. Your filter must
not allow frequencies beyond 1/2 the final sampling rate, which means it
must filter out everything above 1/6th the sampling rate after the
interpolator. Designing the filter yourself also has the advantage that
you can use knowledge of your signal to allow a wider transition band,
thus resulting in less taps. And you can use other tools to calculate
your filter taps - the last time I checked, equiripple filter design was
not available in GNU Radio (please correct me someone if I’m wrong).

I hope this was helpful. Regards,


Martin B.
Institut fuer Nachrichtentechnik
Universitaet Karlsruhe

http://www.int.uni-karlsruhe.de

On Fri, Jul 04, 2008 at 07:52:56AM -0700, irene159 wrote:

Can someone give me more informations on the “rational_bw” parameter?

I apologise for not answering the actual question. This parameter
controls how wide the transition band for the interpolation filter can
be and depends on the oversampling of your original signal.

Say you are resampling by factor 2/3 (i.e. your sampling rate becomes
smaller in the process). Say your signal is fairly narrow band, and even
with 2/3 the sampling rate, the highest available frequency is only 1/4
of your sampling frequency. Then you can have a fairly wide transition
width (rational_bw = 0.25). If you don’t know anything about your
signal, you must set rational_bw close to 0.5 to allow as many
frequencies
as possible, but that results in higher filter complexity.

Are there any files using resampling function that I can take a look at?

Sure, loads. Just search through the examples.


Martin B.
Institut fuer Nachrichtentechnik
Universitaet Karlsruhe

http://www.int.uni-karlsruhe.de

On Fri, Jul 04, 2008 at 07:52:56AM -0700, irene159 wrote:

Are there any files using resampling function that I can take a look at?

[eb@octo trunk]$ find . -name ‘*.py’ -print0 | xargs -0 grep -l
rational_resampler
./gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.py
./gnuradio-core/src/lib/filter/generate_all.py
./gnuradio-core/src/lib/filter/generate_gr_rational_resampler_base_XXX.py
./gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py
./gnuradio-core/src/python/gnuradio/blks2impl/rational_resampler.py
./gr-radio-astronomy/src/python/usrp_psr_receiver.py
./gnuradio-examples/python/audio/test_resampler.py
./gnuradio-examples/python/usrp/limbo/ayfabtu.py
./gr-cvsd-vocoder/src/python/encdec.py
./gr-cvsd-vocoder/src/python/qa_cvsd_vocoder.py
./gr-utils/src/python/usrp_rx_nogui.py
./gr-pager/src/flex_demod.py

I’d suggest looking at gr-pager/src/flex_demod.py

Eric