GNU Radio 3.7.1 C++ API
|
Adaptive FIR filter with gr_complex input, gr_complex output and gr_complex taps. More...
#include <adaptive_fir_ccc.h>
Public Types | |
typedef boost::shared_ptr < adaptive_fir_ccc > | sptr |
Public Member Functions | |
virtual void | set_taps (const std::vector< gr_complex > &taps)=0 |
virtual std::vector< gr_complex > | taps () const =0 |
Static Public Member Functions | |
static sptr | make (const char *name, int decimation, const std::vector< gr_complex > &taps) |
Adaptive FIR filter with gr_complex input, gr_complex output and gr_complex taps. |
Adaptive FIR filter with gr_complex input, gr_complex output and gr_complex taps.
This is a base class to implement an adaptive FIR filter. Generally, another block will inherit from this one to build a new type of adaptive filter such as an equalizer.
This class implements two functions that are designed to be overloaded by the child class: error(gr_complex out) and update_tap(gr_complex tap, gr_complex in).
The error() function calculates the error value that will be used to adjust the taps. The update_tap function then uses the error and the input signal value to update a particular tap. Typically, the error is calculated for a given output and then this is used in a loop to update all of the filter taps in a loop:
d_error = error(sum);
for(k = 0; k < l; k++) {
update_tap(d_taps[ntaps-k-1], in[i+k]);
}
See digital::cma_equalizer_cc and digital::lms_dd_equalizer_cc for example usage.
static sptr gr::filter::adaptive_fir_ccc::make | ( | const char * | name, |
int | decimation, | ||
const std::vector< gr_complex > & | taps | ||
) | [static] |
Adaptive FIR filter with gr_complex input, gr_complex output and gr_complex taps.
name | Provides a name to identify this type of algorithm |
decimation | (interger) decimation rate of the filter |
taps | (complex) filter taps |
virtual void gr::filter::adaptive_fir_ccc::set_taps | ( | const std::vector< gr_complex > & | taps | ) | [pure virtual] |
virtual std::vector<gr_complex> gr::filter::adaptive_fir_ccc::taps | ( | ) | const [pure virtual] |