Analysis_filterbank question

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

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

On Mon, Jan 5, 2009 at 8:52 AM, Sebastiaan H. [email protected]
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-pager/src/usrp_flex_band.py

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

-Johnathan

On Sat, May 30, 2009 at 11:25:06AM +0000, feldmaus wrote:

Eric B. <eb 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

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. :slight_smile:

Eric B. <eb 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

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

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

This is the same reason why Matlab has an ‘fftshift’ function.

Sebastiaan