GNU Radio C++ API Reference: gr::filter::firdes Class Reference

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
gr::filter::firdes Class Reference
Digital Filter Design

Finite Impulse Response (FIR) filter design functions. More...

`#include <gnuradio/filter/firdes.h>`

## Static Public Member Functions
static std::vector< float > | window (fft::window::win_type type, int ntaps, double param)
static std::vector< float > | low_pass (double gain, double sampling_freq, double cutoff_freq, double transition_width, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use "window method" to design a low-pass FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. Window type determines maximum attenuation and passband ripple.
static std::vector< float > | low_pass_2 (double gain, double sampling_freq, double cutoff_freq, double transition_width, double attenuation_dB, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use "window method" to design a low-pass FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps More attenuation --> more taps. The window type determines maximum attenuation and passband ripple.
static std::vector< float > | high_pass (double gain, double sampling_freq, double cutoff_freq, double transition_width, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use "window method" to design a high-pass FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. The window determines maximum attenuation and passband ripple.
static std::vector< float > | high_pass_2 (double gain, double sampling_freq, double cutoff_freq, double transition_width, double attenuation_dB, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use "window method" to design a high-pass FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps More attenuation --> more taps. The window determines maximum attenuation and passband ripple.
static std::vector< float > | band_pass (double gain, double sampling_freq, double low_cutoff_freq, double high_cutoff_freq, double transition_width, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use "window method" to design a band-pass FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. The window determines maximum attenuation and passband ripple.
static std::vector< float > | band_pass_2 (double gain, double sampling_freq, double low_cutoff_freq, double high_cutoff_freq, double transition_width, double attenuation_dB, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use "window method" to design a band-pass FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps. More attenuation --> more taps. Window type determines maximum attenuation and passband ripple.
static std::vector< gr_complex > | complex_band_reject (double gain, double sampling_freq, double low_cutoff_freq, double high_cutoff_freq, double transition_width, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use the "window method" to design a complex band-reject FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. The window type determines maximum attenuation and passband ripple.
static std::vector< gr_complex > | complex_band_reject_2 (double gain, double sampling_freq, double low_cutoff_freq, double high_cutoff_freq, double transition_width, double attenuation_dB, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use "window method" to design a complex band-reject FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps More attenuation --> more taps. Window type determines maximum attenuation and passband ripple.
static std::vector< gr_complex > | complex_band_pass (double gain, double sampling_freq, double low_cutoff_freq, double high_cutoff_freq, double transition_width, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use the "window method" to design a complex band-pass FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. The window type determines maximum attenuation and passband ripple.
static std::vector< gr_complex > | complex_band_pass_2 (double gain, double sampling_freq, double low_cutoff_freq, double high_cutoff_freq, double transition_width, double attenuation_dB, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use "window method" to design a complex band-pass FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps More attenuation --> more taps. Window type determines maximum attenuation and passband ripple.
static std::vector< float > | band_reject (double gain, double sampling_freq, double low_cutoff_freq, double high_cutoff_freq, double transition_width, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use "window method" to design a band-reject FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. Window type determines maximum attenuation and passband ripple.
static std::vector< float > | band_reject_2 (double gain, double sampling_freq, double low_cutoff_freq, double high_cutoff_freq, double transition_width, double attenuation_dB, fft::window::win_type window=fft::window::win_type::WIN_HAMMING, double param=6.76)
| Use "window method" to design a band-reject FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps More attenuation --> more taps. Window type determines maximum attenuation and passband ripple.
static std::vector< float > | hilbert (unsigned int ntaps=19, fft::window::win_type windowtype=fft::window::win_type::WIN_RECTANGULAR, double param=6.76)
| design a Hilbert Transform Filter
static std::vector< float > | root_raised_cosine (double gain, double sampling_freq, double symbol_rate, double alpha, int ntaps)
| design a Root Cosine FIR Filter (do we need a window?)
static std::vector< float > | gaussian (double gain, double spb, double bt, int ntaps)
| design a Gaussian filter

## Detailed Description

Finite Impulse Response (FIR) filter design functions.

## Member Function Documentation

## ◆ band_pass()

std::vector< float > gr::filter::firdes::band_pass | ( | double | gain,
|  | double | sampling_freq,
|  | double | low_cutoff_freq,
|  | double | high_cutoff_freq,
|  | double | transition_width,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use "window method" to design a band-pass FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. The window determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  low_cutoff_freq | center of transition band (Hz)
  high_cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz).
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ band_pass_2()

std::vector< float > gr::filter::firdes::band_pass_2 | ( | double | gain,
|  | double | sampling_freq,
|  | double | low_cutoff_freq,
|  | double | high_cutoff_freq,
|  | double | transition_width,
|  | double | attenuation_dB,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use "window method" to design a band-pass FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps. More attenuation --> more taps. Window type determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  low_cutoff_freq | center of transition band (Hz)
  high_cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz).
  attenuation_dB | out of band attenuation
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ band_reject()

std::vector< float > gr::filter::firdes::band_reject | ( | double | gain,
|  | double | sampling_freq,
|  | double | low_cutoff_freq,
|  | double | high_cutoff_freq,
|  | double | transition_width,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use "window method" to design a band-reject FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. Window type determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  low_cutoff_freq | center of transition band (Hz)
  high_cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz)
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ band_reject_2()

std::vector< float > gr::filter::firdes::band_reject_2 | ( | double | gain,
|  | double | sampling_freq,
|  | double | low_cutoff_freq,
|  | double | high_cutoff_freq,
|  | double | transition_width,
|  | double | attenuation_dB,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use "window method" to design a band-reject FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps More attenuation --> more taps. Window type determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  low_cutoff_freq | center of transition band (Hz)
  high_cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz).
  attenuation_dB | out of band attenuation
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ complex_band_pass()

std::vector< gr_complex > gr::filter::firdes::complex_band_pass | ( | double | gain,
|  | double | sampling_freq,
|  | double | low_cutoff_freq,
|  | double | high_cutoff_freq,
|  | double | transition_width,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use the "window method" to design a complex band-pass FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. The window type determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  low_cutoff_freq | center of transition band (Hz)
  high_cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz)
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ complex_band_pass_2()

std::vector< gr_complex > gr::filter::firdes::complex_band_pass_2 | ( | double | gain,
|  | double | sampling_freq,
|  | double | low_cutoff_freq,
|  | double | high_cutoff_freq,
|  | double | transition_width,
|  | double | attenuation_dB,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use "window method" to design a complex band-pass FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps More attenuation --> more taps. Window type determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  low_cutoff_freq | center of transition band (Hz)
  high_cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz)
  attenuation_dB | out of band attenuation
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ complex_band_reject()

std::vector< gr_complex > gr::filter::firdes::complex_band_reject | ( | double | gain,
|  | double | sampling_freq,
|  | double | low_cutoff_freq,
|  | double | high_cutoff_freq,
|  | double | transition_width,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use the "window method" to design a complex band-reject FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. The window type determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  low_cutoff_freq | center of transition band (Hz)
  high_cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz)
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ complex_band_reject_2()

std::vector< gr_complex > gr::filter::firdes::complex_band_reject_2 | ( | double | gain,
|  | double | sampling_freq,
|  | double | low_cutoff_freq,
|  | double | high_cutoff_freq,
|  | double | transition_width,
|  | double | attenuation_dB,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use "window method" to design a complex band-reject FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps More attenuation --> more taps. Window type determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  low_cutoff_freq | center of transition band (Hz)
  high_cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz)
  attenuation_dB | out of band attenuation
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ gaussian()

std::vector< float > gr::filter::firdes::gaussian | ( | double | gain,
|  | double | spb,
|  | double | bt,
|  | int | ntaps )
| static

design a Gaussian filter

Parameters

  gain | overall gain of filter (typically 1.0)
  spb | symbol rate, must be a factor of sample rate
  bt | bandwidth to bitrate ratio
  ntaps | number of taps

## ◆ high_pass()

std::vector< float > gr::filter::firdes::high_pass | ( | double | gain,
|  | double | sampling_freq,
|  | double | cutoff_freq,
|  | double | transition_width,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use "window method" to design a high-pass FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. The window determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz)
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ high_pass_2()

std::vector< float > gr::filter::firdes::high_pass_2 | ( | double | gain,
|  | double | sampling_freq,
|  | double | cutoff_freq,
|  | double | transition_width,
|  | double | attenuation_dB,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use "window method" to design a high-pass FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps More attenuation --> more taps. The window determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz).
  attenuation_dB | out of band attenuation
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ hilbert()

std::vector< float > gr::filter::firdes::hilbert | ( | unsigned int | ntaps = 19,
|  | fft::window::win_type | windowtype = fft::window::win_type::WIN_RECTANGULAR,
|  | double | param = 6.76 )
| static

design a Hilbert Transform Filter

Parameters

  ntaps | number of taps, must be odd
  windowtype | one kind of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_RECTANGULAR.

## ◆ low_pass()

std::vector< float > gr::filter::firdes::low_pass | ( | double | gain,
|  | double | sampling_freq,
|  | double | cutoff_freq,
|  | double | transition_width,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use "window method" to design a low-pass FIR filter. The normalized width of the transition band is what sets the number of taps required. Narrow --> more taps. Window type determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  cutoff_freq | center of transition band (Hz)
  transition_width | width of transition band (Hz)
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ low_pass_2()

std::vector< float > gr::filter::firdes::low_pass_2 | ( | double | gain,
|  | double | sampling_freq,
|  | double | cutoff_freq,
|  | double | transition_width,
|  | double | attenuation_dB,
|  | fft::window::win_type | window = fft::window::win_type::WIN_HAMMING,
|  | double | param = 6.76 )
| static

Use "window method" to design a low-pass FIR filter. The normalized width of the transition band and the required stop band attenuation is what sets the number of taps required. Narrow --> more taps More attenuation --> more taps. The window type determines maximum attenuation and passband ripple.

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  cutoff_freq | beginning of transition band (Hz)
  transition_width | width of transition band (Hz)
  attenuation_dB | required stopband attenuation
  window | one of fft::window::win_type
  param | parameter for Kaiser, Exp., Gaussian, Tukey windows

References gr::fft::window::WIN_HAMMING, and window().

## ◆ root_raised_cosine()

std::vector< float > gr::filter::firdes::root_raised_cosine | ( | double | gain,
|  | double | sampling_freq,
|  | double | symbol_rate,
|  | double | alpha,
|  | int | ntaps )
| static

design a Root Cosine FIR Filter (do we need a window?)

Parameters

  gain | overall gain of filter (typically 1.0)
  sampling_freq | sampling freq (Hz)
  symbol_rate | symbol rate, must be a factor of sample rate
  alpha | excess bandwidth factor
  ntaps | number of taps

## ◆ window()

std::vector< float > gr::filter::firdes::window | ( | fft::window::win_type | type,
|  | int | ntaps,
|  | double | param )
| static

Referenced by band_pass(), band_pass_2(), band_reject(), band_reject_2(), complex_band_pass(), complex_band_pass_2(), complex_band_reject(), complex_band_reject_2(), high_pass(), high_pass_2(), low_pass(), and low_pass_2().

The documentation for this class was generated from the following file:

- firdes.h