base class template for Infinite Impulse Response filter (IIR) More...
#include <gnuradio/filter/iir_filter.h>
Public Member Functions | |
iir_filter (const std::vector< tap_type > &fftaps, const std::vector< tap_type > &fbtaps, bool oldstyle=true) throw (std::invalid_argument) | |
Construct an IIR with the given taps. More... | |
iir_filter () | |
~iir_filter () | |
o_type | filter (const i_type input) |
compute a single output value. More... | |
void | filter_n (o_type output[], const i_type input[], long n) |
compute an array of N output values. input must have N valid entries. More... | |
unsigned | ntaps_ff () const |
unsigned | ntaps_fb () const |
void | set_taps (const std::vector< tap_type > &fftaps, const std::vector< tap_type > &fbtaps) throw (std::invalid_argument) |
install new taps. More... | |
template<> | |
gr_complex | filter (const gr_complex input) |
template<> | |
gr_complex | filter (const gr_complex input) |
template<> | |
gr_complex | filter (const gr_complex input) |
Protected Attributes | |
bool | d_oldstyle |
std::vector< tap_type > | d_fftaps |
std::vector< tap_type > | d_fbtaps |
int | d_latest_n |
int | d_latest_m |
std::vector< o_type > | d_prev_output |
std::vector< i_type > | d_prev_input |
base class template for Infinite Impulse Response filter (IIR)
|
inline |
Construct an IIR with the given taps.
This filter uses the Direct Form I implementation, where fftaps
contains the feed-forward taps, and fbtaps
the feedback ones.
fftaps
and fbtaps
must have equal numbers of taps
oldstyle:
The old style of the IIR filter uses feedback taps that are negative of what most definitions use (scipy and Matlab among them). This parameter keeps using the old GNU Radio style and is set to TRUE by default. When taps generated from scipy, Matlab, or gr_filter_design, use the new style by setting this to FALSE.
The input and output satisfy a difference equation of the form
with the corresponding rational system function
References gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::d_oldstyle, and gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::set_taps().
|
inline |
|
inline |
o_type gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::filter | ( | const i_type | input | ) |
compute a single output value.
gr_complex gr::filter::kernel::iir_filter< gr_complex, gr_complex, float >::filter | ( | const gr_complex | input | ) |
gr_complex gr::filter::kernel::iir_filter< gr_complex, gr_complex, double >::filter | ( | const gr_complex | input | ) |
gr_complex gr::filter::kernel::iir_filter< gr_complex, gr_complex, gr_complexd >::filter | ( | const gr_complex | input | ) |
void gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::filter_n | ( | o_type | output[], |
const i_type | input[], | ||
long | n | ||
) |
compute an array of N output values. input
must have N valid entries.
|
inline |
|
inline |
References gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::d_fftaps.
|
inline |
install new taps.
References gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::d_fbtaps, gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::d_fftaps, gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::d_latest_m, gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::d_latest_n, gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::d_oldstyle, gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::d_prev_input, and gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::d_prev_output.
Referenced by gr::filter::kernel::iir_filter< i_type, o_type, tap_type >::iir_filter().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |