gnuradio.filter: Resamplers

gnuradio.filter.fractional_interpolator_cc(float phase_shift, float interp_ratio) → sptr

Interpolating MMSE filter with complex input, complex output.

Constructor Specific Documentation:

Build the interpolating MMSE filter (complex input, complex output)

Parameters:
  • phase_shift – The phase shift of the output signal to the input
  • interp_ratio – The interpolation ratio = input_rate / output_rate.
fractional_interpolator_cc_sptr.active_thread_priority(self) → int
fractional_interpolator_cc_sptr.interp_ratio(self) → float
fractional_interpolator_cc_sptr.mu(self) → float
fractional_interpolator_cc_sptr.set_interp_ratio(self, float interp_ratio)
fractional_interpolator_cc_sptr.set_mu(self, float mu)
fractional_interpolator_cc_sptr.set_thread_priority(self, int priority) → int
fractional_interpolator_cc_sptr.thread_priority(self) → int
gnuradio.filter.fractional_interpolator_ff(float phase_shift, float interp_ratio) → sptr

Interpolating MMSE filter with float input, float output.

Constructor Specific Documentation:

Build the interpolating MMSE filter (float input, float output)

Parameters:
  • phase_shift – The phase shift of the output signal to the input
  • interp_ratio – The interpolation ratio = input_rate / output_rate.
fractional_interpolator_ff_sptr.active_thread_priority(self) → int
fractional_interpolator_ff_sptr.interp_ratio(self) → float
fractional_interpolator_ff_sptr.mu(self) → float
fractional_interpolator_ff_sptr.set_interp_ratio(self, float interp_ratio)
fractional_interpolator_ff_sptr.set_mu(self, float mu)
fractional_interpolator_ff_sptr.set_thread_priority(self, int priority) → int
fractional_interpolator_ff_sptr.thread_priority(self) → int
gnuradio.filter.fractional_resampler_cc(float phase_shift, float resamp_ratio) → sptr

resampling MMSE filter with complex input, complex output

Constructor Specific Documentation:

Build the resampling MMSE filter (complex input, complex output)

Parameters:
  • phase_shift – The phase shift of the output signal to the input
  • resamp_ratio – The resampling ratio = input_rate / output_rate.
fractional_resampler_cc_sptr.active_thread_priority(self) → int
fractional_resampler_cc_sptr.mu(self) → float
fractional_resampler_cc_sptr.resamp_ratio(self) → float
fractional_resampler_cc_sptr.set_mu(self, float mu)
fractional_resampler_cc_sptr.set_resamp_ratio(self, float resamp_ratio)
fractional_resampler_cc_sptr.set_thread_priority(self, int priority) → int
fractional_resampler_cc_sptr.thread_priority(self) → int
gnuradio.filter.fractional_resampler_ff(float phase_shift, float resamp_ratio) → sptr

Resampling MMSE filter with float input, float output.

Constructor Specific Documentation:

Build the resampling MMSE filter (float input, float output)

Parameters:
  • phase_shift – The phase shift of the output signal to the input
  • resamp_ratio – The resampling ratio = input_rate / output_rate.
fractional_resampler_ff_sptr.active_thread_priority(self) → int
fractional_resampler_ff_sptr.mu(self) → float
fractional_resampler_ff_sptr.resamp_ratio(self) → float
fractional_resampler_ff_sptr.set_mu(self, float mu)
fractional_resampler_ff_sptr.set_resamp_ratio(self, float resamp_ratio)
fractional_resampler_ff_sptr.set_thread_priority(self, int priority) → int
fractional_resampler_ff_sptr.thread_priority(self) → int
gnuradio.filter.pfb_arb_resampler_ccf(float rate, pmt_vector_float taps, unsigned int filter_size = 32) → sptr

Polyphase filterbank arbitrary resampler with gr_complex input, gr_complex output and float taps.

This block takes in a signal stream and calls gr::filter::kernel::pfb_arb_resampler_ccf to perform arbitrary resampling on the stream.

Output sampling rate is * input rate.

Constructor Specific Documentation:

Build the polyphase filterbank arbitray resampler.

Parameters:
  • rate – (float) Specifies the resampling rate to use
  • taps – (vector/list of floats) The prototype filter to populate the filterbank. The taps should be generated at the filter_size sampling rate.
  • filter_size – (unsigned int) The number of filters in the filter bank. This is directly related to quantization noise introduced during the resampling. Defaults to 32 filters.
pfb_arb_resampler_ccf_sptr.active_thread_priority(self) → int
pfb_arb_resampler_ccf_sptr.decimation_rate(self) → unsigned int

Gets the decimation rate of the filter.

pfb_arb_resampler_ccf_sptr.fractional_rate(self) → float

Gets the fractional rate of the filter.

pfb_arb_resampler_ccf_sptr.group_delay(self) → int

Get the group delay of the filter.

pfb_arb_resampler_ccf_sptr.interpolation_rate(self) → unsigned int

Gets the interpolation rate of the filter.

pfb_arb_resampler_ccf_sptr.phase(self) → float

Gets the current phase of the resampler in radians (2 to 2pi).

pfb_arb_resampler_ccf_sptr.phase_offset(self, float freq, float fs) → float

Calculates the phase offset expected by a sine wave of frequency and sampling rate (assuming input sine wave has 0 degree phase).

pfb_arb_resampler_ccf_sptr.print_taps(self)

Print all of the filterbank taps to screen.

pfb_arb_resampler_ccf_sptr.set_phase(self, float ph)

Sets the current phase offset in radians (0 to 2pi).

pfb_arb_resampler_ccf_sptr.set_rate(self, float rate)

Sets the resampling rate of the block.

pfb_arb_resampler_ccf_sptr.set_taps(self, pmt_vector_float taps)

Resets the filterbank’s filter taps with the new prototype filter

pfb_arb_resampler_ccf_sptr.set_thread_priority(self, int priority) → int
pfb_arb_resampler_ccf_sptr.taps(self) → __dummy_16__

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

pfb_arb_resampler_ccf_sptr.taps_per_filter(self) → unsigned int

Gets the number of taps per filter.

pfb_arb_resampler_ccf_sptr.thread_priority(self) → int
gnuradio.filter.pfb_arb_resampler_fff(float rate, pmt_vector_float taps, unsigned int filter_size = 32) → sptr

Polyphase filterbank arbitrary resampler with float input, float output and float taps.

This block takes in a signal stream and performs arbitrary resampling. The resampling rate can be any real number . The resampling is done by constructing filters where is the interpolation rate. We then calculate where .

Using and , we can perform rational resampling where is a rational number close to the input rate where we have filters and we cycle through them as a polyphase filterbank with a stride of so that .

To get the arbitrary rate, we want to interpolate between two points. For each value out, we take an output from the current filter, , and the next filter and then linearly interpolate between the two based on the real resampling rate we want.

The linear interpolation only provides us with an approximation to the real sampling rate specified. The error is a quantization error between the two filters we used as our interpolation points. To this end, the number of filters, , used determines the quantization error; the larger , the smaller the noise. You can design for a specified noise floor by setting the filter size (parameters ). The size defaults to 32 filters, which is about as good as most implementations need.

The trick with designing this filter is in how to specify the taps of the prototype filter. Like the PFB interpolator, the taps are specified using the interpolated filter rate. In this case, that rate is the input sample rate multiplied by the number of filters in the filterbank, which is also the interpolation rate. All other values should be relative to this rate.

For example, for a 32-filter arbitrary resampler and using the GNU Radio’s firdes utility to build the filter, we build a low-pass filter with a sampling rate of , a 3-dB bandwidth of and a transition bandwidth of . We can also specify the out-of-band attenuation to use, , 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 the interpolation rate ().

The theory behind this block can be found in Chapter 7.5 of the following book.

Constructor Specific Documentation:

Build the polyphase filterbank arbitray resampler.

Parameters:
  • rate – (float) Specifies the resampling rate to use
  • taps – (vector/list of floats) The prototype filter to populate the filterbank. The taps should be generated at the filter_size sampling rate.
  • filter_size – (unsigned int) The number of filters in the filter bank. This is directly related to quantization noise introduced during the resampling. Defaults to 32 filters.
pfb_arb_resampler_fff_sptr.active_thread_priority(self) → int
pfb_arb_resampler_fff_sptr.decimation_rate(self) → unsigned int

Gets the decimation rate of the filter.

pfb_arb_resampler_fff_sptr.fractional_rate(self) → float

Gets the fractional rate of the filter.

pfb_arb_resampler_fff_sptr.group_delay(self) → int

Get the group delay of the filter.

pfb_arb_resampler_fff_sptr.interpolation_rate(self) → unsigned int

Gets the interpolation rate of the filter.

pfb_arb_resampler_fff_sptr.phase(self) → float

Gets the current phase of the resampler in radians (2 to 2pi).

pfb_arb_resampler_fff_sptr.phase_offset(self, float freq, float fs) → float

Calculates the phase offset expected by a sine wave of frequency and sampling rate (assuming input sine wave has 0 degree phase).

pfb_arb_resampler_fff_sptr.print_taps(self)

Print all of the filterbank taps to screen.

pfb_arb_resampler_fff_sptr.set_phase(self, float ph)

Sets the current phase offset in radians (0 to 2pi).

pfb_arb_resampler_fff_sptr.set_rate(self, float rate)

Sets the resampling rate of the block.

pfb_arb_resampler_fff_sptr.set_taps(self, pmt_vector_float taps)

Resets the filterbank’s filter taps with the new prototype filter

pfb_arb_resampler_fff_sptr.set_thread_priority(self, int priority) → int
pfb_arb_resampler_fff_sptr.taps(self) → __dummy_16__

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

pfb_arb_resampler_fff_sptr.taps_per_filter(self) → unsigned int

Gets the number of taps per filter.

pfb_arb_resampler_fff_sptr.thread_priority(self) → int

Previous topic

gnuradio.filter: Channelizers

Next topic

gnuradio.filter: Filters

This Page