discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Demod not working with Deinterleave


From: William Sherman
Subject: [Discuss-gnuradio] Demod not working with Deinterleave
Date: Wed, 13 May 2009 11:38:05 +0200

Hi.

1)
I have modified benchmark_rx.py/receive_path.py to allow it to receive
two channels from two RFX2400 daughterboards (I aim to use the second
channel for sensing).

As suggested by the examples/mailing list, I inserted a deinterleave
block after the source to retrieve streams from each channel, like so
[my two receive channels are RFX2400 "A" side, TX/RX plug as channel 0,
RFX2400 "B" side, TX/RX plug as channel 1.)

self.u = usrp.source_c(which = 0, decim_rate = self._decim, nchan = 2,
mux = gru.hexint(0x10321032), fusb_block_size = self._fusb_block_size,
fusb_nblocks = self._fusb_nblocks, fpga_filename="std_2rxhb_2tx.rbf")
self.di = gr.deinterleave(gr.sizeof_gr_complex)

....
(rx_receive_path = essentially receive_path without the source at the
front)

self.rx_receive_path = rx_receive_path(self._demod_class,
self._rx_callback, options)

....

self.connect(self.u, self.di)
self.connect( (self.di, self._rx_chan), self.rx_receive_path)

I can get this to run.

However when my transmitter usrp runs, my new receiver picks up junk
packets. The receiver demodulates the packets so that all the data is
messed up (ok = False, data nonsense). I have confirmed the transmitter
and receiver have matched bitrates and I am certain my mux setting is
correct. I suspect there is a problem with dbpsk demodulation of the
source stream.

My rx_receive_path is (i.e. receive_path):

        # Get demod_kwargs
        demod_kwargs = demod_class.extract_kwargs_from_options(options)

        # Design filter to get actual channel we want
        sw_decim = 1 #sw_decim stands for "software decimation"
        chan_coeffs = gr.firdes.low_pass (1.0,                  # gain
                                          sw_decim *
options.samples_per_symbol, # sampling rate
                                          1.0,                  #
midpoint of trans. band
                                          0.5,                  # width
of trans. band
                                          gr.firdes.WIN_HANN)   # filter
type

  '''
  vector< float > gr.firdes::low_pass ( double      gain,
                                      double      sampling_freq,
                                      double      cutoff_freq,
                                      double      transition_width,
                                      win_type    window = WIN_HAMMING,
                                      double      beta = 6.76)
[static]
  '''

        # Decimating channel filter
        # complex in and out, float taps
        self.chan_filt = gr.fft_filter_ccc(sw_decim, chan_coeffs)

        # receiver
        self.packet_receiver = \
            blks2.demod_pkts(demod_class(**demod_kwargs),
                             access_code=None,
                             callback=rx_callback, #no doubt this object
calls rx_callback's function whenever a packet arrives, and sets the
packet
                             threshold=-1)     #blks2 is calling a
function in gnuradio/gnuradio-core/src/python/ gnuradio/blksimpl/pkt.py

        self.connect(self, self.chan_filt, self.packet_receiver) #io
signature

This is identical to receive_path.py.

Why would this receiver code not work when I introduce
deinterleaving/two channels? (receiver demodulates to give junk data)








2)
Also I will want to have my two RX channels operate at different
decimation rates. I will want to introduce extra software decimation in
rx_receive_path. This is achieved by modifying chan_filt.

Can someone explain the chan_coeffs in chan_filt. Specifically how have
the chan_coeffs arguments (sampling rate, cutoff frequency, etc.) been
derived for receive_path?

Will it be sufficient for instance if my usrp decim is 16 and I want a
rx decim of 32, to specify e.g.: (sw_decim = 32/16 = 2 -> extra software
decimation factor)

        # Design filter to get actual channel we want
        sw_decim = 2 #sw_decim stands for "software decimation"
        chan_coeffs = gr.firdes.low_pass (1.0,                  # gain
                                          2 *
options.samples_per_symbol, # sampling rate
                                          1.0,                  #
midpoint of trans. band
                                          0.5,                  # width
of trans. band
                                          gr.firdes.WIN_HANN)   # filter
type

  '''
  vector< float > gr.firdes::low_pass ( double      gain,
                                      double      sampling_freq,
                                      double      cutoff_freq,
                                      double      transition_width,
                                      win_type    window = WIN_HAMMING,
                                      double      beta = 6.76)
[static]
  '''

        # Decimating channel filter
        # complex in and out, float taps
        self.chan_filt = gr.fft_filter_ccc(2, chan_coeffs)
-- 
Posted via http://www.ruby-forum.com/.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]