Analysis_filterbank problem


#1

Hi

I looked at usrp_flex_band.py to see how blks2.analysis_filterbank is
implemented. The example runs on my PC.

I wrote a simple app where I want to decimate by 16 in the FPGA (no
HBF). So I have samples coming in at 4Msps. I then want to send this
stream to a 20 channel channeliser, resulting in output streams of
200ksps each. I want to test this by connecting an FM demodulator and
see if I can channelise a part of the FM band. Here is some of my
code.

self.u = usrp.source_c(decim_rate=16,fpga_filename=“std_2rx_0tx.rbf”)

if options.rx_subdev_spec is None:
options.rx_subdev_spec = pick_subdevice(self.u)

self.subdev = usrp.selected_subdev(self.u,options.rx_subdev_spec)
self.u.set_mux(usrp.determine_rx_mux_value(self.u,options.rx_subdev_spec))

print “Using RX d’board %s” % (self.subdev.side_and_name(),)

self.set_freq(options.freq)

taps = []

f1 = open(‘fir_lowpass.txt’,‘r’)

for line in f1:
tap = float(line)
taps.append(tap)
f1.close()

#taps = optfir.low_pass(1,usrp_rate,70e3,100e3,0.1,60)

pfb = blks2.analysis_filterbank(20,taps)

self.connect(self.u,pfb)

The application works until I try to connect the usrp source to the
filterbank. I get a Segmentation fault when I try to do this. Does
anyone know what might be wrong?

Thanks in advance.

Sebastiaan


Sebastiaan H.
Radar and Remote Sensing Group, University of Cape Town
Tel: +27 83 305 5667


#2

On Wed, Jan 07, 2009 at 01:53:03PM +0200, Sebastiaan H. wrote:

code.

Thanks in advance.

Sebastiaan

Run gdb to find out where the segfault is occurring.
http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html#debugging

Are you sure you want the half-band disabled?
You can run decim=16 with it on. The pass band will be flatter.

Eric


#3

On Wed, Jan 7, 2009 at 11:03 AM, Sebastiaan H. removed_email_address@domain.invalid
wrote:

Regarding the halfband filter. I’m in the process of investigating
ways of improving the response of the CIC or whichever technique I
implement in the end. I’ve tried a 4 stage CIC with compensator as
well as an 8 stage one. I get a nice flat passband in the end, but my
supervisor wants at least 40dB of SNR by the time the signal is
processed. I’ve only managed around 33. That’s why I’ve been playing
around with HBF/no HBF.

There is some Matlab code to calculate taps for a compensation filter
in the tree, that may perhaps be of use:

http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/utils/cic_comp_taps.m

-Johnathan


#4

Eric

Thanks, I’ll try gdb. I used the same code with decim=16, only this
time connecting the USRP source to an FFT sink. It works fine. The
code definitely breaks when I try to connect the USRP to the
filterbank.

Regarding the halfband filter. I’m in the process of investigating
ways of improving the response of the CIC or whichever technique I
implement in the end. I’ve tried a 4 stage CIC with compensator as
well as an 8 stage one. I get a nice flat passband in the end, but my
supervisor wants at least 40dB of SNR by the time the signal is
processed. I’ve only managed around 33. That’s why I’ve been playing
around with HBF/no HBF.

Sebastiaan

On Wed, Jan 7, 2009 at 8:44 PM, Eric B. removed_email_address@domain.invalid wrote:

see if I can channelise a part of the FM band. Here is some of my
print “Using RX d’board %s” % (self.subdev.side_and_name(),)
f1.close()

You can run decim=16 with it on. The pass band will be flatter.

Eric


Sebastiaan H.
Radar and Remote Sensing Group, University of Cape Town
Tel: +27 83 305 5667