# Downsampling in GNURadio

**URL:** <https://www.ruby-forum.com/t/downsampling-in-gnuradio/232380>\
**Category:** GNU Radio\
**Created:** [October 6, 2014, 9:10pm UTC](https://www.ruby-forum.com/t/downsampling-in-gnuradio/232380 "2014-10-06T21:10:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 6, 2014, 9:10pm UTC](https://www.ruby-forum.com/t/downsampling-in-gnuradio/232380/1 "2014-10-06T21:10:25Z")

</div>

Hi,

I would like to downsample a signal from _390,625_ Hz to \*125 \*Hz. \*What  
is  
the best way to do this in GNURadio? \*

Please find below some issues I am having with this.

First, I used the Low Pass Filter block, in GNURadio, I set my  
Decimation  
to 3125, my Cutoff Freq to 125/2. But I am not sure about _the  
recommended  
value for the Transition Width parameter_?

On another note, to obtain accurate results for downsampling in Matlab  
(and  
for DSP generally) it is often recommended to split the big decimation  
factor into a cascade of smaller ones. If I was to do the downsampling  
from  
390625 to 125 Hz in Matlab I would do something like 5_5_5_5_5 (i.e.,  
five  
separate downsamplers). _How to optimally do this in GNURadio?_ By  
‘optimally’ I mean with less computational resources given that I need  
to  
do this for multiple channels simultaneously.

Finally, in another experiment for testing downsampling in GNURadio, I  
tried to use the Rational Resampler block with the _default settings_.  
However, my results were aliased. I think Low-Pass Filtering is not  
included in the Rational Resampler by default. _Is this right?_ \*How do  
I  
enable the low-pass filer? \*and

_what kind of filter is recommended?_  
Thanks in advance for your help.

Best regards,  
Khalid

---

<div class="post-metadata">

**Author:** ![khalide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3bc359/32.png) [@khalide](https://www.ruby-forum.com/u/khalide)\
**Post date:** [October 6, 2014, 11:57pm UTC](https://www.ruby-forum.com/t/downsampling-in-gnuradio/232380/2 "2014-10-06T23:57:28Z")

</div>

Hi Khalid,

if you happen to do the same filter for a larger set of subbands, look  
into the polyphase filters:

> **[PFB Channelizers and Synthesizers — Rondeau Research](http://www.trondeau.com/examples/2014/1/23/pfb-channelizers-and-synthesizers.html)**
>
> Building the Filters 
> Based on the paper presented at the  Karlsruhe Institute of Technology's  Workshop on Software Radio (WSR). 
> The paper starts off by explaining how to build the prototype filters and how these lead directly to the...

The question which method is the computationally best cannot be answered  
universally; in essence: go ahead and try.  
This is a really large sampling rate factor, so I assume a direct FIR  
filter will have a shipload of taps. You can try and compare the  
FFT-Filter with a cascade of smaller ones.

The question of “what filter is right for me” is as scientific as it is  
religious. There’s no way to know unless you know the spectrum you want  
to get.

Greetings,  
Marcus
