discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] DDC and Polyphase Channelizer


From: Jimmy Richardson
Subject: [Discuss-gnuradio] DDC and Polyphase Channelizer
Date: Mon, 27 Dec 2010 16:48:11 +0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7

Hi,:

I'm learning about polyphase channelizer, and I have been reading fred harris' paper "Digital Receivers and Transmitters Using Polyphase Filter Banks for Wireless Communications". I have also played with the Matlab programs at the end of the paper. What I'm trying to do next is to use GNURadio to do the channelization. I made two attempts, one uses freq_xlating_fir_filter_ccf to implement a DDC channelizer, another uses pfb_channelizer_ccf, running against the data in appendix III of harris' paper. I'm hoping the channelizer result from GNURadio code would match the result from Matlab, but I failed on both, I wonder if someone could help me spot the problem.

1. DDC Channelizer:
1.1 Code: The following is the core part of the code (input parsing and various other stuff are omitted), the value for the variables can be found in 1.2 self._filter_taps = gr.firdes.low_pass(1, self._input_rate, self._cutoff_freq, self._trans_width, window=gr.firdes.WIN_BLACKMAN_hARRIS)
        print "Number of taps:   _filter_taps = ", len(self._filter_taps)

        # Blocks
        self.ddc_filter = list()
        # i = 0 to M-1
        for i in xrange(self._M):
            offset = self._channel_bandwidth * (float(self._M)/2 - i)
            print "Channel ", i, "'s offset (Hz): ", offset
self.ddc_filter.append(gr.freq_xlating_fir_filter_ccf(self._resampling_ratio, self._filter_taps, offset, self._input_rate)) self.connect(self.head, self.ddc_filter[i], self.output_files[i])

1.2 Variable values:
Input sampling freq (Hz):  _input_rate =  1120000000.0
Resampling ratio:          _resampling_ratio =  28
Output sampling freq (Hz): _output_rate =  40000000.0
Transition width (Hz):     _trans_width =  2000000.0
Number of channels:        _M =  40
Number of samples:         _N =  11200
Oversample rate:           _oversample_rate =  1.42857142857
Channel bandwidth (HZ):    _channel_bandwidth =  28000000.0
Cutoff freq (HZ):          _cutoff_freq =  13000000.0
Number of taps:   _filter_taps =  561
Channel  0 's offset (Hz):  560000000.0
Channel  1 's offset (Hz):  532000000.0
...
1.3 Result: The result from GNURadio code is saved to output files, one for each channel. Then the results time-domain are plotted in Matlab (-10 to +10, time 1 to 200), and compared to the result plot from harris' code, they are similar, but not the same. Channel 0 to 5, 17, 18, 34 to 39 do not have any strong signal, this is reflected in both plots, channel 20's signal is exactly the same, but all other channels' plot are different.

2. Polyphase Channelizer:
2.1 Code:
self._filter_taps = gr.firdes.low_pass(1, self._input_rate, self._cutoff_freq, self._trans_width, window=gr.firdes.WIN_BLACKMAN_hARRIS)
        # Calculate the number of taps per channel for our own information
self._taps_per_channel = scipy.ceil(float(len(self._filter_taps)) / float(self._M))
        print "Number of taps:   _filter_taps = ", len(self._filter_taps)
print "Taps per channel: _taps_per_channel = ", self._taps_per_channel

        # Construct the channelizer filter
self.pfb = blks2.pfb_channelizer_ccf(self._M, self._filter_taps, self._oversample_rate)

        # Connect the blocks
        self.connect(self.head, self.pfb)
        # i = 0 to M-1
        for i in xrange(self._M):
            self.connect((self.pfb, i), self.output_files[i])

2.2 Variable values:
Input sampling freq (Hz):  _input_rate =  1120000000.0
Resampling ratio:          _resampling_ratio =  28
Output sampling freq (Hz): _output_rate =  40000000.0
Transition width (Hz):     _trans_width =  2000000.0
Number of channels:        _M =  40
Number of samples:         _N =  11200
Oversample rate:           _oversample_rate =  1.42857142857
Channel bandwidth (HZ):    _channel_bandwidth =  28000000.0
Cutoff freq (HZ):          _cutoff_freq =  13000000.0
Number of taps:   _filter_taps =  561
Taps per channel: _taps_per_channel =  15.0

2.3 Result: The GNURadio program failed with:
"terminate called after throwing an instance of 'std::invalid_argument'
  what():  gr_pfb_channelizer: oversample rate must be N/i for i in [1, N]

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information."

This doesn't seem to make sense, since in this case N = 40, oversample rate =1.42857142857, i = 28

Thanks



reply via email to

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