Forum: GNU Radio analysis_filterbank question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sebastiaan H. (Guest)
on 2009-01-05 18:53
(Received via mailing list)
Hi

I'm trying to use blks2.analysis_filterbank.  I assume that I need to
instantiate it like this:

self.channeliser = blks2.analysis_filterbank(num_fft,taps)

where num_fft refers to the number of channels and taps can be left
empty.

I tried self.channeliser = blks2,analysis_filterbank(16) (and 8 and
20).  None of these work.  I get the following error:

terminate called after throwing an instance of 'std::out_of_range'
  what():  gri_fftw: invalid fft_size
Aborted

Does anyone know what's wrong?  If I get it to work, do I just connect
each output path that I'm interested in to a block, similar to when
using a mixer in the fm examples?

Thanks a lot.

Sebastiaan

--
Sebastiaan H.
Radar and Remote Sensing Group, University of Cape Town
Tel:  +27 83 305 5667
Eric B. (Guest)
on 2009-01-05 19:16
(Received via mailing list)
On Mon, Jan 05, 2009 at 06:52:56PM +0200, Sebastiaan H. wrote:
> 20).  None of these work.  I get the following error:
>
> Sebastiaan

Unlike what the code would lead you to believe, you have to provide
the filter taps.  See gr-pager/src/usrp_flex_band.py for a working
example.

Eric
Johnathan C. (Guest)
on 2009-01-05 19:19
(Received via mailing list)
On Mon, Jan 5, 2009 at 8:52 AM, Sebastiaan H. 
<removed_email_address@domain.invalid>
wrote:

> Does anyone know what's wrong?  If I get it to work, do I just connect
> each output path that I'm interested in to a block, similar to when
> using a mixer in the fm examples?

Take a look at one of the scripts in the gr-pager component:

http://gnuradio.org/trac/browser/gnuradio/trunk/gr...

It uses the analysis filterbank to decode up to 40 baseband channels
out of a 1 MHz swath of spectrum.

-Johnathan
feldmaus (Guest)
on 2009-05-30 15:26
(Received via mailing list)
Eric B. <eb <at> comsec.com> writes:

>
> On Mon, Jan 05, 2009 at 06:52:56PM +0200, Sebastiaan H. wrote:
>
> Unlike what the code would lead you to believe, you have to provide
> the filter taps.  See gr-pager/src/usrp_flex_band.py for a working example.
>
I found some API Docu about the analysis filterbank, but still
have some questions to it.

First i post a clipping from the api docu about the analysis filterbank:
00043     def __init__(self, mpoints, taps=None):
00044         """
00045         Takes M complex streams in, produces single complex stream
out
00046         that runs at M times the input sample rate
00047
00048         @param mpoints: number of freq bins/interpolation
factor/subbands
00049         @param taps:    filter taps for subband filter
00050
00051         The channel spacing is equal to the input sample rate.
00052         The total bandwidth and output sample rate are equal the
input
00053         sample rate * nchannels.
00054
00055         Output stream to frequency mapping:
00056
00057           channel zero is at zero frequency.
00058
00059           if mpoints is odd:
00060
00061             Channels with increasing positive frequencies come
from
00062             channels 1 through (N-1)/2.
00063
00064             Channel (N+1)/2 is the maximum negative frequency, and
00065             frequency increases through N-1 which is one channel
lower
00066             than the zero frequency.

What do you mean in line 61 + 62 ?
If i have 3 Mpoints, then my first channel comes from 1 to 0 ?
channel 2 comes from 1 to 0.5 ?
Channel 3 comes from 1 to 1 ?
If i have 3 mpoints than i have 3 channels, right ?

can somebody give a more detailed explanation ?

regards Markus
Eric B. (Guest)
on 2009-05-30 23:42
(Received via mailing list)
On Sat, May 30, 2009 at 11:25:06AM +0000, feldmaus wrote:
> Eric B. <eb <at> comsec.com> writes:
>
> > On Mon, Jan 05, 2009 at 06:52:56PM +0200, Sebastiaan H. wrote:
> >
> > Unlike what the code would lead you to believe, you have to provide
> > the filter taps.  See gr-pager/src/usrp_flex_band.py for a working example.
> >
> I found some API Docu about the analysis filterbank, but still
> have some questions to it.

You may want to consider just using 3 instances of
gr.freq_xlating_fir_filter_ccf

Eric
Markus F. (Guest)
on 2009-06-03 03:47
(Received via mailing list)
Attachment: analysis-band1.eps (0 Bytes)
Attachment: analysis-band2.eps (0 Bytes)
Attachment: analysis-cband1.eps (0 Bytes)
Attachment: analysis-cband2.eps (0 Bytes)
Attachment: analysis-cband3.eps (0 Bytes)
Eric B. schrieb:
>
> You may want to consider just using 3 instances of gr.freq_xlating_fir_filter_ccf
>
thank you,

only a gift to the community.

i made some graphs of a analysis filterbank with different filters.
I hope some developer can insert it to the documentation for the
analysis filterbank. :-)
Markus F. (Guest)
on 2009-06-10 19:22
(Received via mailing list)
feldmaus schrieb:
> 00051         The channel spacing is equal to the input sample rate.
> 00062             channels 1 through (N-1)/2.
> 00063
> 00064             Channel (N+1)/2 is the maximum negative frequency, and
> 00065             frequency increases through N-1 which is one channel lower
> 00066             than the zero frequency.
>
I am now working on a Report, it would be nice if some of the developers
explain what they mean with <channels 1 through (N-1)/2> ?
What means <Channel (N+1)/2 is the maximum negative frequency> ?

Does this formula above also valid with a bandpass_filter ?

Or how should the algorithmus be for a bandpass ?

Regards markus
Eric B. (Guest)
on 2009-06-12 20:26
(Received via mailing list)
On Wed, Jun 10, 2009 at 05:18:37PM +0200, Markus F. wrote:
>> 00050 00051         The channel spacing is equal to the input sample
>> frequency, and
> Regards markus
Marcus,

This ordering is just the normal result of computing an FFT.
You might consider taking a look at the FFTW docs.  They do a good job
of explaining what they're actually computing and give an
interpretation of "negative frequencies".

Eric
Sebastiaan H. (Guest)
on 2009-06-13 04:27
(Received via mailing list)
This is the same reason why Matlab has an 'fftshift' function.

Sebastiaan
This topic is locked and can not be replied to.