GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
gr::filter::firdes Class Reference

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static std::vector< gr_complexcomplex_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. More...
 
static std::vector< gr_complexcomplex_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. More...
 
static std::vector< gr_complexcomplex_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. More...
 
static std::vector< gr_complexcomplex_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. More...
 
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. More...
 
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. More...
 
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 More...
 
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?) More...
 
static std::vector< float > gaussian (double gain, double spb, double bt, int ntaps)
 design a Gaussian filter More...
 

Detailed Description

Finite Impulse Response (FIR) filter design functions.

Member Function Documentation

◆ band_pass()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
low_cutoff_freqcenter of transition band (Hz)
high_cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz).
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ band_pass_2()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
low_cutoff_freqcenter of transition band (Hz)
high_cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz).
attenuation_dBout of band attenuation
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ band_reject()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
low_cutoff_freqcenter of transition band (Hz)
high_cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz)
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ band_reject_2()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
low_cutoff_freqcenter of transition band (Hz)
high_cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz).
attenuation_dBout of band attenuation
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ complex_band_pass()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
low_cutoff_freqcenter of transition band (Hz)
high_cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz)
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ complex_band_pass_2()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
low_cutoff_freqcenter of transition band (Hz)
high_cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz)
attenuation_dBout of band attenuation
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ complex_band_reject()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
low_cutoff_freqcenter of transition band (Hz)
high_cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz)
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ complex_band_reject_2()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
low_cutoff_freqcenter of transition band (Hz)
high_cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz)
attenuation_dBout of band attenuation
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ gaussian()

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

design a Gaussian filter

Parameters
gainoverall gain of filter (typically 1.0)
spbsymbol rate, must be a factor of sample rate
btbandwidth to bitrate ratio
ntapsnumber of taps

◆ high_pass()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz)
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ high_pass_2()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz).
attenuation_dBout of band attenuation
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ hilbert()

static 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
ntapsnumber of taps, must be odd
windowtypeone kind of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ low_pass()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
cutoff_freqcenter of transition band (Hz)
transition_widthwidth of transition band (Hz)
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ low_pass_2()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
cutoff_freqbeginning of transition band (Hz)
transition_widthwidth of transition band (Hz)
attenuation_dBrequired stopband attenuation
windowone of fft::window::win_type
paramparameter for Kaiser, Exp., Gaussian, Tukey windows

◆ root_raised_cosine()

static 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
gainoverall gain of filter (typically 1.0)
sampling_freqsampling freq (Hz)
symbol_ratesymbol rate, must be a factor of sample rate
alphaexcess bandwidth factor
ntapsnumber of taps

◆ window()

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

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