GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
iir_filter_ccd.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004,2012,2014 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_IIR_FILTER_CCD_H
12 #define INCLUDED_IIR_FILTER_CCD_H
13 
14 #include <gnuradio/filter/api.h>
15 #include <gnuradio/sync_block.h>
16 
17 namespace gr {
18 namespace filter {
19 
20 /*!
21  * \brief IIR filter with complex input, complex output, and
22  * double taps.
23  * \ingroup filter_blk
24  *
25  * \details
26  * This filter uses the Direct Form I implementation, where \p
27  * fftaps contains the feed-forward taps, and \p fbtaps the
28  * feedback ones.
29  *
30  * \p oldstyle: The old style of the IIR filter uses feedback
31  * taps that are negative of what most definitions use (scipy
32  * and Matlab among them). This parameter keeps using the old
33  * GNU Radio style and is set to TRUE by default. When taps
34  * generated from scipy, Matlab, or gr_filter_design, use the
35  * new style by setting this to FALSE.
36  *
37  * The input and output satisfy a difference equation of the form
38  \f[
39  y[n] - \sum_{k=1}^{M} a_k y[n-k] = \sum_{k=0}^{N} b_k x[n-k]
40  \f]
41 
42  \xmlonly
43  y[n] - \sum_{k=1}^{M} a_k y[n-k] = \sum_{k=0}^{N} b_k x[n-k]
44  \endxmlonly
45 
46  * with the corresponding rational system function
47  \f[
48  H(z) = \frac{\sum_{k=0}^{M} b_k z^{-k}}{1 - \sum_{k=1}^{N} a_k z^{-k}}
49  \f]
50 
51  \xmlonly
52  H(z) = \ frac{\sum_{k=0}^{M} b_k z^{-k}}{1 - \sum_{k=1}^{N} a_k z^{-k}}
53  \endxmlonly
54 
55  */
56 class FILTER_API iir_filter_ccd : virtual public sync_block
57 {
58 public:
59  // gr::filter::iir_filter_ccd::sptr
60  typedef std::shared_ptr<iir_filter_ccd> sptr;
61 
62  static sptr make(const std::vector<double>& fftaps,
63  const std::vector<double>& fbtaps,
64  bool oldstyle = true);
65 
66  virtual void set_taps(const std::vector<double>& fftaps,
67  const std::vector<double>& fbtaps) = 0;
68 };
69 
70 } /* namespace filter */
71 } /* namespace gr */
72 
73 #endif /* INCLUDED_IIR_FILTER_CCD_H */
IIR filter with complex input, complex output, and double taps.
Definition: iir_filter_ccd.h:57
std::shared_ptr< iir_filter_ccd > sptr
Definition: iir_filter_ccd.h:60
static sptr make(const std::vector< double > &fftaps, const std::vector< double > &fbtaps, bool oldstyle=true)
virtual void set_taps(const std::vector< double > &fftaps, const std::vector< double > &fbtaps)=0
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29