# Hierarchical polyphase channelizer vs polyphase channelizer blocks in GRC

**URL:** <https://www.ruby-forum.com/t/hierarchical-polyphase-channelizer-vs-polyphase-channelizer-blocks-in-grc/242529>\
**Category:** GNU Radio\
**Created:** [June 30, 2015, 7:15pm UTC](https://www.ruby-forum.com/t/hierarchical-polyphase-channelizer-vs-polyphase-channelizer-blocks-in-grc/242529 "2015-06-30T19:15:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [June 30, 2015, 7:15pm UTC](https://www.ruby-forum.com/t/hierarchical-polyphase-channelizer-vs-polyphase-channelizer-blocks-in-grc/242529/1 "2015-06-30T19:15:29Z")

</div>

Does anyone have any knowledge of how the parameters need to be set in  
the  
hierarchical pfb channelizer? There’s no documentation that I can find.

I HAVE gotten the regular channelizer to work and it’s awesome  
(screenshots  
included), I was just hoping to use a hierarchical version that would be  
able to use multiple blocks and therefore utilize multiple processors.

otherwise I have to design my own, which is not on my ‘fun list’.

thanks,  
-b

[http://imgur.com/nh53Ryw](http://imgur.com/nh53Ryw)

---

<div class="post-metadata">

**Author:** ![ben\_Gee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@ben\_Gee](https://www.ruby-forum.com/u/ben_Gee)\
**Post date:** [June 30, 2015, 7:48pm UTC](https://www.ruby-forum.com/t/hierarchical-polyphase-channelizer-vs-polyphase-channelizer-blocks-in-grc/242529/2 "2015-06-30T19:48:47Z")

</div>

Hi ben,

> otherwise I have to design my own, which is not on my ‘fun list’.  
> What? that sounds like such an awesome project!

The point is that polyphase channelizers inherently make use of the fact  
that you can a) split the sample stream into multiple polyphase  
components, b) do the same with the filter taps, c) run the individual  
filters at the lower rate and d) use the FFT amongst a lot of  
permutations. This complexity makes it desirable to do this in one  
block.

Looking at pfb\_channelizer\_ccf:

189 while(i \>= 0) {  
190 in = (gr\_complex\*)input\_items[j];  
191 d\_fft-\>get\_inbuf()[d\_idxlut[j]] =  
d\_fir\_filters[i]-\>filter(&in[n]);  
192 j++;  
193 i–;  
194 }  
195  
196 i = d\_nfilts-1;  
197 while(i \> last) {  
198 in = (gr\_complex\*)input\_items[j];  
199 d\_fft-\>get\_inbuf()[d\_idxlut[j]] =  
d\_fir\_filters[i]-\>filter(&in[n-1]);  
200 j++;  
201 i–;  
202 }

both while loops could lend themself to parallelization, if d\_idxlut has  
j unique elements; but that’s the case (for this particular  
implementation, this might be different for channelizers that map the  
same stream to multiple frequencies):

87 for(unsigned int i = 0; i \< d\_nfilts; i++) {  
88 d\_idxlut[i] = d\_nfilts - ((i + d\_rate\_ratio) % d\_nfilts) -  
1;  
89 }

The easiest solution would be modifying polyphase\_filterbank.cc, and  
adding something like d\_thread\_workers. I’d recommend not overdoing  
parallelization, a single filter(float) step doesn’t really justify the  
synchronization overhead. I’d start with just wrapping the two while  
loops in two separate threads.

Best regards,  
Marcus
