gr::filter::kernel::polyphase_filterbank
gnuradio/filter/polyphase_filterbank.h
unsigned int unsigned int gr::filter::kernel::polyphase_filterbank::d_nfilts d_nfilts gr::filter::kernel::polyphase_filterbank::d_nfilts
std::vector< kernel::fir_filter_ccf > std::vector<kernel::fir_filter_ccf> gr::filter::kernel::polyphase_filterbank::d_fir_filters d_fir_filters gr::filter::kernel::polyphase_filterbank::d_fir_filters
std::vector< kernel::fft_filter_ccf > std::vector<kernel::fft_filter_ccf> gr::filter::kernel::polyphase_filterbank::d_fft_filters d_fft_filters gr::filter::kernel::polyphase_filterbank::d_fft_filters
std::vector< std::vector< float > > std::vector<std::vector<float> > gr::filter::kernel::polyphase_filterbank::d_taps d_taps gr::filter::kernel::polyphase_filterbank::d_taps
unsigned int unsigned int gr::filter::kernel::polyphase_filterbank::d_taps_per_filter d_taps_per_filter gr::filter::kernel::polyphase_filterbank::d_taps_per_filter
fft::fft_complex_rev fft::fft_complex_rev gr::filter::kernel::polyphase_filterbank::d_fft d_fft gr::filter::kernel::polyphase_filterbank::d_fft
gr::filter::kernel::polyphase_filterbank::polyphase_filterbank
(unsigned int nfilts, const std::vector< float > &taps)
polyphase_filterbank
gr::filter::kernel::polyphase_filterbank::polyphase_filterbank
unsigned int nfilts
const std::vector< float > & taps

Build the polyphase filterbank decimator. nfilts

(unsigned integer) Specifies the number of channels M

taps

(vector/list of floats) The prototype filter to populate the filterbank.

taps
virtual gr::filter::kernel::polyphase_filterbank::~polyphase_filterbank
()=default
~polyphase_filterbank
gr::filter::kernel::polyphase_filterbank::~polyphase_filterbank
void virtual void gr::filter::kernel::polyphase_filterbank::set_taps (const std::vector< float > &taps) set_taps gr::filter::kernel::polyphase_filterbank::set_taps const std::vector< float > & taps

Update the filterbank's filter taps from a prototype filter.

taps

(vector/list of floats) The prototype filter to populate the filterbank.

taps
void void gr::filter::kernel::polyphase_filterbank::print_taps () print_taps gr::filter::kernel::polyphase_filterbank::print_taps

Print all of the filterbank taps to screen.

std::vector< std::vector< float > > std::vector< std::vector< float > > gr::filter::kernel::polyphase_filterbank::taps () const taps gr::filter::kernel::polyphase_filterbank::taps

Return a vector<vector<>> of the filterbank taps

polyphase_filterbank
set_taps

Polyphase filterbank parent class.

This block takes in complex inputs and channelizes it to M channels of equal bandwidth. Each of the resulting channels is decimated to the new rate that is the input sampling rate fs divided by the number of channels, M.

The PFB channelizer code takes the taps generated above and builds a set of filters. The set contains M filters and each filter contains ceil(taps.size()/decim) taps. Each tap from the filter prototype is sequentially inserted into the next filter. When all of the input taps are used, the remaining filters in the filterbank are filled out with 0's to make sure each filter has the same number of taps.

Each filter operates using the gr::filter::fir_filter_XXX class of GNU Radio, which takes the input stream at i and performs the inner product calculation to i+(n-1) where n is the number of filter taps. To efficiently handle this in the GNU Radio structure, each filter input must come from its own input stream. So the channelizer must be provided with M streams where the input stream has been deinterleaved. This is most easily done using the gr::blocks::stream_to_streams block.

The output is then produced as a vector, where index i in the vector is the next sample from the ith channel. This is most easily handled by sending the output to a gr::blocks::vector_to_streams block to handle the conversion and passing M streams out.

The input and output formatting is done using a hier_block2 called pfb_channelizer_ccf. This can take in a single stream and outputs M streams based on the behavior described above.

The filter's taps should be based on the input sampling rate.

For example, using the GNU Radio's firdes utility to building filters, we build a low-pass filter with a sampling rate of fs, a 3-dB bandwidth of BW and a transition bandwidth of TB. We can also specify the out-of-band attenuation to use, ATT, and the filter window function (a Blackman-harris window in this case). The first input is the gain of the filter, which we specify here as unity.

self._taps = filter.firdes.low_pass_2(1, fs, BW, TB, attenuation_dB=ATT, window=fft.window.WIN_BLACKMAN_hARRIS)

More on the theory of polyphase filterbanks can be found in the following book:

f. harris, "Multirate Signal Processing for Communication Systems," Upper Saddle River, NJ: Prentice Hall, Inc. 2004.

gr::filter::kernel::fft_filter_ccf
gr::filter::kernel::fir_filter< gr_complex, gr_complex, float >
gr::filter::kernel::polyphase_filterbank
d_fir_filters
d_fft_filters
d_taps
std::vector< float >
std::vector< gr::filter::kernel::fft_filter_ccf >
elements
p
std::vector< gr::filter::kernel::fir_filter< gr_complex, gr_complex, float > >
elements
p
std::vector< std::vector< float > >
elements
p
- gr::filter::kernel::polyphase_filterbank
  d_fft
- gr::filter::kernel::polyphase_filterbank
  d_fft_filters
- gr::filter::kernel::polyphase_filterbank
  d_fir_filters
- gr::filter::kernel::polyphase_filterbank
  d_nfilts
- gr::filter::kernel::polyphase_filterbank
  d_taps
- gr::filter::kernel::polyphase_filterbank
  d_taps_per_filter
- gr::filter::kernel::polyphase_filterbank
  polyphase_filterbank
- gr::filter::kernel::polyphase_filterbank
  print_taps
- gr::filter::kernel::polyphase_filterbank
  set_taps
- gr::filter::kernel::polyphase_filterbank
  taps
- gr::filter::kernel::polyphase_filterbank
  ~polyphase_filterbank