GNU Radio 3.6.5 C++ API
|
Polyphase filterbank interpolator with gr_complex input, gr_complex output and float taps. More...
#include <pfb_interpolator_ccf.h>
Public Types | |
typedef boost::shared_ptr < pfb_interpolator_ccf > | sptr |
Public Member Functions | |
virtual void | set_taps (const std::vector< float > &taps)=0 |
virtual std::vector < std::vector< float > > | taps () const =0 |
virtual void | print_taps ()=0 |
Static Public Member Functions | |
static sptr | make (unsigned int interp, const std::vector< float > &taps) |
Polyphase filterbank interpolator with gr_complex input, gr_complex output and float taps.
This block takes in a signal stream and performs interger up- sampling (interpolation) with a polyphase filterbank. The first input is the integer specifying how much to interpolate by. The second input is a vector (Python list) of floating-point taps of the prototype filter.
The filter's taps should be based on the interpolation rate specified. That is, the bandwidth specified is relative to the bandwidth after interpolation.
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, which is also specified as the interpolation rate so that the output levels are the same as the input (this creates an overall increase in power).
self._taps = filter.firdes.low_pass_2(interp, interp*fs, BW, TB, attenuation_dB=ATT, window=filter.firdes.WIN_BLACKMAN_hARRIS)
The PFB interpolator code takes the taps generated above and builds a set of filters. The set contains interp number of filters and each filter contains ceil(taps.size()/interp) number of 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.
The theory behind this block can be found in Chapter 7.1 of the following book.
f. harris, "Multirate Signal Processing for Communication Systems</EM>," Upper Saddle River, NJ: Prentice Hall, Inc. 2004.
static sptr gr::filter::pfb_interpolator_ccf::make | ( | unsigned int | interp, |
const std::vector< float > & | taps | ||
) | [static] |
Build the polyphase filterbank interpolator.
interp | (unsigned integer) Specifies the interpolation rate to use |
taps | (vector/list of floats) The prototype filter to populate the filterbank. The taps should be generated at the interpolated sampling rate. |
virtual void gr::filter::pfb_interpolator_ccf::print_taps | ( | ) | [pure virtual] |
Print all of the filterbank taps to screen.
Implemented in gr::filter::pfb_interpolator_ccf_impl.
virtual void gr::filter::pfb_interpolator_ccf::set_taps | ( | const std::vector< float > & | taps | ) | [pure virtual] |
Resets the filterbank's filter taps with the new prototype filter
taps | (vector/list of floats) The prototype filter to populate the filterbank. The taps should be generated at the interpolated sampling rate. |
Implemented in gr::filter::pfb_interpolator_ccf_impl.
virtual std::vector<std::vector<float> > gr::filter::pfb_interpolator_ccf::taps | ( | ) | const [pure virtual] |
Return a vector<vector<>> of the filterbank taps
Implemented in gr::filter::pfb_interpolator_ccf_impl.